Skip to content

Commit

Permalink
Initial commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas-Piter committed Jul 15, 2024
0 parents commit 83c7959
Show file tree
Hide file tree
Showing 64 changed files with 12,733 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# .coveragerc to control coverage.py
[run]
branch = False
concurrency = multiprocessing
parallel = True
omit = */site-packages/*,*/tests/*,*/.eggs/*

[report]
show_missing = True

# Regexes for lines to exclude from consideration
exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover

# Don't complain if tests don't hit defensive assertion code:
raise AssertionError
raise NotImplementedError

# Don't complain if non-runnable code isn't run:
if 0:
if __name__ == .__main__.:

ignore_errors = True

[html]
directory = htmlcov
21 changes: 21 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# http://editorconfig.org

root = true

[*]
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true
charset = utf-8
end_of_line = lf

[*.bat]
indent_style = tab
end_of_line = crlf

[LICENSE]
insert_final_newline = false

[Makefile]
indent_style = tab
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# *.h5 filter=lfs diff=lfs merge=lfs -text
# *.png filter=lfs diff=lfs merge=lfs -text
225 changes: 225 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,225 @@
name: CI

on:
push:
branches:
- main
- githubci

env:
SKIP: true

jobs:
before_script:
runs-on: self-hosted

strategy:
matrix:
node-version: [ 20.x ]

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Install dependencies
run: |
conda init bash
source ~/.bashrc
conda info
source activate ci_env
shell: bash

test_sarvey:
runs-on: self-hosted
needs: before_script
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Run tests
if: env.SKIP == 'false'
run: |
conda init bash
source ~/.bashrc
source activate ci_env
rm -rf tests/testdata
wget -c https://seafile.projekt.uni-hannover.de/f/4b3be399dffa488e98db/?dl=1 -P tests/
unzip tests/testdata.zip
ls tests/testdata
make pytest
shell: bash

- name: create docs
run: |
conda init bash
source ~/.bashrc
source activate ci_env
make docs
shell: bash

- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: htmlcov/

- name: Upload report.html
uses: actions/upload-artifact@v4
with:
name: test-report
path: report.html

- name: Upload docs
uses: actions/upload-artifact@v4
with:
name: docs
path: docs/_build/html/

- name: Upload cobertura coverage report
uses: actions/upload-artifact@v4
with:
name: cobertura-coverage
path: coverage.xml

- name: Upload junit report
uses: actions/upload-artifact@v4
with:
name: junit-report
path: report.xml

test_styles:
runs-on: self-hosted
needs: before_script
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Install dependencies
run: |
conda init bash
source ~/.bashrc
conda info
source activate ci_env
make lint
shell: bash

- name: Upload flake8 log
uses: actions/upload-artifact@v4
with:
name: flake8-log
path: tests/linting/flake8.log

- name: Upload pycodestyle log
uses: actions/upload-artifact@v4
with:
name: pycodestyle-log
path: tests/linting/pycodestyle.log

- name: Upload pydocstyle log
uses: actions/upload-artifact@v4
with:
name: pydocstyle-log
path: tests/linting/pydocstyle.log

test_urls:
runs-on: self-hosted
needs: before_script
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Install dependencies
run: |
conda init bash
source ~/.bashrc
conda info
source activate ci_env
make urlcheck
shell: bash

test_sarvey_install:
runs-on: self-hosted
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Install dependencies
run: |
conda init bash
source ~/.bashrc
mamba update -n base mamba conda
mamba info
mamba env remove --name sarvey_testinstall --yes || echo "Environment sarvey_testinstall does not exist"
pip install conda-merge
wget https://raw.githubusercontent.com/insarlab/MiaplPy/main/conda-env.yml
conda-merge conda-env.yml tests/CI_docker/context/environment_sarvey.yml > env.yml
mamba env create --name sarvey_testinstall -f env.yml
source activate sarvey_testinstall
pip install git+https://github.com/insarlab/MiaplPy.git
pip install .
pip check
cd ..
python -c "import sarvey; print(sarvey)"
shell: bash

deploy_pages:
runs-on: self-hosted

needs: test_sarvey
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Deploy to GitHub Pages
if: env.SKIP == 'false'
run: |
rm -rf public
mkdir -p public/doc
mkdir -p public/images/
mkdir -p public/coverage
mkdir -p public/test_reports
cp -r docs/_build/html/* public/doc/
cp -r htmlcov/* public/coverage/
cp report.html public/test_reports/
ls -al public
ls -al public/doc
ls -al public/coverage
ls -al public/test_reports
shell: bash

- name: Upload to GitHub Pages
if: env.SKIP == 'false'
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
116 changes: 116 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/
report.xml
report.html

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# dotenv
.env

# virtualenv
.venv
venv/
ENV/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/

# IDE settings
.vscode/

# IntelliJ Idea family of suites
.idea
*.iml
## File-based project format:
*.ipr
*.iws
## mpeltonen/sbt-idea plugin
.idea_modules/
Loading

0 comments on commit 83c7959

Please sign in to comment.