-
Notifications
You must be signed in to change notification settings - Fork 3
ReconstructSPI Workflow Infrastructure #33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
thisFreya
wants to merge
14
commits into
master
Choose a base branch
from
reconstructSPI_infrastructure
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
6e7ed32
Infrastructure files
6a9ee69
Infrastructure files
55ee718
Changed codecov parameters
0d18f66
Removed __init__.py files
7f81456
Revert "Removed __init__.py files"
e583a54
Revert "Changed codecov parameters"
15840cf
Refactoring library format
2f91bc6
Directory fixes
bccb41c
Revert "Refactoring library format"
2c42e8d
Revert "Directory fixes"
9126f86
Removed dependencies
3330c11
Testing something
ef10249
Testing things
5152547
Added dev branch to branches on which tests will run.
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| coverage: | ||
| round: up | ||
| precision: 2 | ||
| status: | ||
| patch: | ||
| default: | ||
| # basic | ||
| target: 90% | ||
| threshold: 2% | ||
| base: auto | ||
| flags: | ||
| - unit | ||
| # advanced | ||
| branches: | ||
| - master | ||
| - dev | ||
| if_no_uploads: error | ||
| if_not_found: error | ||
| if_ci_failed: error | ||
| only_pulls: false | ||
|
|
||
| # Files to ignore | ||
| ignore: | ||
| - "data" | ||
thisFreya marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - "notebooks" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| [report] | ||
| fail_under = 90 | ||
| show_missing = True |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,24 +1,18 @@ | ||
| version = 1 | ||
|
|
||
| test_patterns = ["test/**"] | ||
| test_patterns = ["tests/**"] | ||
|
|
||
| exclude_patterns = ["README.md"] | ||
|
|
||
| [[analyzers]] | ||
| name = "python" | ||
| enabled = true | ||
|
|
||
| [analyzers.meta] | ||
| runtime_version = "3.x.x" | ||
|
|
||
| [[analyzers]] | ||
| name = "test-coverage" | ||
| enabled = true | ||
|
|
||
| [[transformers]] | ||
| name = "isort" | ||
| enabled = true | ||
|
|
||
| [[transformers]] | ||
| name = "black" | ||
| enabled = true | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| [flake8] | ||
| docstring-convention = numpy | ||
| import_order_style = smarkets | ||
| max-line-length = 88 | ||
| extend-ignore = E203,I202,I100 | ||
| exclude = reconstructSPI/__init__.py,reconstructSPI/iterative_refinement/__init.py,tests/__init__.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| name: "Lint" | ||
thisFreya marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| on: | ||
| push: | ||
| branches: [master,github-actions-test,dev] | ||
| paths-ignore: | ||
| - 'README.md' | ||
| - '.deepsource.toml' | ||
| - '.gitignore' | ||
| - 'setup.py' | ||
|
|
||
|
|
||
| pull_request: | ||
| branches: [master,dev] | ||
| paths-ignore: | ||
| - 'README.md' | ||
| - '.deepsource.toml' | ||
| - '.gitignore' | ||
| - 'setup.py' | ||
|
|
||
|
|
||
| jobs: | ||
| build: | ||
|
|
||
| runs-on: ${{matrix.os}} | ||
| strategy: | ||
| matrix: | ||
| os: [ubuntu-18.04] | ||
| python-version: [3.9] | ||
| test-folder : ['tests'] | ||
| fail-fast: false | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| with: | ||
| fetch-depth: 0 | ||
| - name: Build using Python ${{matrix.python-version}} | ||
| uses: actions/setup-python@v2 | ||
| with: | ||
| python-version: ${{matrix.python-version}} | ||
| - name: install dependencies [pip] | ||
| run: | | ||
| pip install --upgrade pip setuptools wheel | ||
| for req in dev-requirements.txt; do | ||
| pip install -q -r $req | ||
| done | ||
| pip install -e . | ||
| - name: linting [black and isort] | ||
| run: | | ||
| black . --check | ||
| isort --profile black --check . | ||
| - name: linting [flake8] | ||
| run: | | ||
| flake8 reconstructSPI tests | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| name: "Test" | ||
|
|
||
| on: | ||
| push: | ||
| branches: [master,github-actions-test,dev] | ||
| paths-ignore: | ||
| - 'README.md' | ||
| - '.deepsource.toml' | ||
| - '.gitignore' | ||
| - 'setup.py' | ||
|
|
||
|
|
||
| pull_request: | ||
| branches: [master,dev] | ||
| paths-ignore: | ||
| - 'README.md' | ||
| - '.deepsource.toml' | ||
| - '.gitignore' | ||
| - 'setup.py' | ||
|
|
||
|
|
||
| jobs: | ||
| build: | ||
|
|
||
| runs-on: ${{matrix.os}} | ||
| strategy: | ||
| matrix: | ||
| os: [ubuntu-18.04] | ||
| python-version: [3.7,3.8,3.9] | ||
| test-folder : ['tests'] | ||
| fail-fast: false | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| with: | ||
| fetch-depth: 0 | ||
| - name: Build using Python ${{matrix.python-version}} | ||
| uses: actions/setup-python@v2 | ||
| with: | ||
| python-version: ${{matrix.python-version}} | ||
|
|
||
| - name: cache conda | ||
| uses: actions/cache@v1 | ||
| with: | ||
| path: $CONDA | ||
| key: ${{ runner.os }}-conda-${{ hashFiles('environment.yml') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-conda- | ||
| - name: install dependencies [conda] | ||
| run: | | ||
| # $CONDA is an environment variable pointing to the root of the miniconda directory | ||
| $CONDA/bin/conda env update --file environment.yml --name base | ||
| $CONDA/bin/pip install -e . | ||
| - name: unit testing [pytest] | ||
| env: | ||
| TEST_TOKEN: ${{ secrets.TEST_TOKEN }} | ||
| run: | | ||
| $CONDA/bin/pytest --cov-report term --cov-report xml:coverage.xml --cov=reconstructSPI ${{matrix.test-folder}} | ||
| - name: uploading code coverage [codecov] | ||
| if: ${{matrix.python-version == 3.7}} | ||
| run: | | ||
| bash <(curl -s https://codecov.io/bash) -c |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| default_language_version : | ||
| python : python3 | ||
| repos: | ||
| - repo: https://github.com/pre-commit/pre-commit-hooks | ||
| rev: v3.1.0 | ||
| hooks: | ||
| - id: check-byte-order-marker | ||
| - id: check-case-conflict | ||
| - id: check-merge-conflict | ||
| - id: check-yaml | ||
| - id: mixed-line-ending | ||
| args: | ||
| - --fix=no | ||
| - id: no-commit-to-branch | ||
| args: | ||
| - --branch=master | ||
| - id: check-added-large-files | ||
| args: | ||
| - --maxkb=2048 | ||
| - id: trailing-whitespace | ||
| - repo: https://github.com/psf/black | ||
| rev: 21.8b0 | ||
| hooks: | ||
| - id: black | ||
| - repo: https://github.com/pycqa/isort | ||
| rev: 5.9.3 | ||
| hooks: | ||
| - id : isort | ||
| args : ["--profile", "black", "--filter-files"] | ||
| - repo: https://github.com/asottile/blacken-docs | ||
| rev: v1.8.0 | ||
| hooks: | ||
| - id: blacken-docs | ||
| additional_dependencies: [black==20.8b0] | ||
| - repo: https://gitlab.com/pycqa/flake8 | ||
| rev: 3.7.9 | ||
| hooks: | ||
| - id: flake8 | ||
| additional_dependencies: | ||
| - flake8-docstrings | ||
| - flake8-import-order | ||
| exclude: reconstructSPI/__init__.py,tests/__init__.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| black | ||
| flake8 | ||
| flake8-docstrings | ||
| isort | ||
| pre-commit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| name: reconstructSPI | ||
| channels: | ||
| - conda-forge | ||
| - defaults | ||
| dependencies: | ||
| - codecov | ||
| - coverage | ||
| - pillow>=8.2.0 | ||
| - pip | ||
| - pytest | ||
| - pytest-cov | ||
| - pytorch | ||
| - pip : | ||
| - git+https://github.com/compSPI/simSPI.git | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| [pytest] | ||
| testpaths = tests | ||
| python_files = *.py | ||
| python_functions = test_* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| """Various particle reconstruction methods.""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| """Iterative refinement reconstruction methods.""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| """Create instructions to build the reconstructSPI package.""" | ||
|
|
||
| import setuptools | ||
|
|
||
| requirements = [] | ||
|
|
||
| setuptools.setup( | ||
| name="reconstructSPI", | ||
| maintainer="Frederic Poitevin", | ||
| version="0.0.1", | ||
| maintainer_email="frederic.poitevin@stanford.edu", | ||
| description="Reconstruction methods and tools for SPI", | ||
| long_description=open("README.md", encoding="utf8").read(), | ||
| long_description_content_type="text/markdown", | ||
| url="https://github.com/compSPI/reconstructSPI.git", | ||
| packages=setuptools.find_packages(), | ||
| install_requires=requirements, | ||
| classifiers=[ | ||
| "Programming Language :: Python :: 3", | ||
| "Operating System :: OS Independent", | ||
| ], | ||
| zip_safe=False, | ||
| ) |
Empty file.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.