-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: dmaljovec <daniel.maljovec@recursionpharma.com>
- Loading branch information
Showing
40 changed files
with
8,759 additions
and
3,753 deletions.
There are no files selected for viewing
This file contains 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,5 +1,12 @@ | ||
[paths] | ||
source = | ||
topopy/ | ||
/Users/runner/work/topopy/topopy/topopy/ | ||
/home/runner/work/topopy/topopy/topopy/ | ||
D:\a\topopy\topopy\topopy\ | ||
|
||
[run] | ||
branch = True | ||
omit = | ||
topopy/tests/* | ||
topopy/topology.py | ||
topopy/topology.py |
This file contains 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 @@ | ||
[flake8] | ||
max-line-length = 88 | ||
extend-ignore = E203 |
This file contains 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,72 @@ | ||
name: Release | ||
on: | ||
workflow_run: | ||
workflows: ["Test"] | ||
branches: [main] | ||
types: | ||
- completed | ||
jobs: | ||
push_tag: | ||
name: Push Tag | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-python@v3 | ||
- name: Push tag | ||
id: tag_version | ||
uses: mathieudutour/github-tag-action@v6.1 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
build_wheels: | ||
needs: push_tag | ||
name: Build wheels on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-20.04, windows-2019, macOS-11] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v3 | ||
- name: Install cibuildwheel | ||
run: python -m pip install cibuildwheel==2.11.2 | ||
|
||
- name: Build wheels | ||
run: | | ||
git fetch --depth=1 origin +refs/tags/*:refs/tags/* | ||
make | ||
python -m cibuildwheel --output-dir wheelhouse | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
path: ./wheelhouse/*.whl | ||
|
||
publish: | ||
needs: build_wheels | ||
name: Publish Wheels and Source Distribution | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-python@v3 | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
path: ./wheelhouse | ||
- name: Build source distribution | ||
run: | | ||
git fetch --depth=1 origin +refs/tags/*:refs/tags/* | ||
make | ||
python setup.py sdist -d wheelhouse | ||
- run: | | ||
mv artifact/*.whl ./ | ||
rm -rf artifact | ||
working-directory: ./wheelhouse | ||
- name: Publish wheels to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
password: ${{ secrets.PYPI_API_TOKEN }} | ||
packages_dir: wheelhouse/ |
This file contains 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,18 @@ | ||
name: Quality | ||
on: [push] | ||
jobs: | ||
tests: | ||
name: Quality | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v3 | ||
with: | ||
python-version: 3.9 | ||
- name: update pip | ||
run: | | ||
pip install -U wheel | ||
pip install -U setuptools | ||
python -m pip install -U pip | ||
- run: pip install tox | ||
- run: tox -e style |
This file contains 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,46 @@ | ||
name: Test | ||
on: [push] | ||
jobs: | ||
tests: | ||
name: ${{ matrix.name }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
minor_version: [7, 8, 9, 10, 11] | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v3 | ||
with: | ||
python-version: 3.${{ matrix.minor_version }} | ||
- name: update pip | ||
run: | | ||
pip install -U wheel | ||
pip install -U setuptools | ||
python -m pip install -U pip | ||
- run: pip install tox | ||
- run: make | ||
- run: tox -e py3${{ matrix.minor_version }} | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: coverage.${{ matrix.os }}.py3${{ matrix.minor_version }} | ||
path: ./.coverage.py3${{ matrix.minor_version }} | ||
coverage: | ||
needs: tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
path: . | ||
- run: pip install coverage | ||
- run: | | ||
coverage combine coverage*/ | ||
coverage report --fail-under=95 | ||
coverage lcov | ||
- name: publish coverage to Coveralls | ||
uses: coverallsapp/github-action@master | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
path-to-lcov: ./coverage.lcov |
This file contains 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 |
---|---|---|
|
@@ -22,4 +22,4 @@ topopy.egg-info/* | |
|
||
.ipynb_checkpoints | ||
docs/_build | ||
|
||
.python-version |
This file contains 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,6 +1,74 @@ | ||
# https://pre-commit.com/hooks.html | ||
|
||
exclude: ^(docs/|.tox) | ||
default_language_version: | ||
python: python3 | ||
repos: | ||
- repo: https://github.com/ambv/black | ||
rev: stable | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.1.0 | ||
hooks: | ||
- id: black | ||
language_version: python2.7 | ||
- id: check-added-large-files # Prevent giant files from being committed | ||
- id: check-ast # Simply check whether the files parse as valid python. | ||
- id: check-byte-order-marker # forbid files which have a UTF-8 byte-order marker | ||
- id: check-builtin-literals # Require literal syntax when initializing empty or zero Python builtin types. | ||
- id: check-case-conflict # Check for files that would conflict in case-insensitive filesystems | ||
- id: check-docstring-first # Checks a common error of defining a docstring after code. | ||
- id: check-executables-have-shebangs # Ensures that (non-binary) executables have a shebang. | ||
- id: check-json # This hook checks json files for parseable syntax. | ||
- id: check-shebang-scripts-are-executable # Ensures that (non-binary) files with a shebang are executable. | ||
- id: pretty-format-json # This hook sets a standard for formatting JSON files. | ||
args: ['--autofix'] | ||
- id: check-merge-conflict # Check for files that contain merge conflict strings. | ||
- id: check-symlinks # Checks for symlinks which do not point to anything. | ||
- id: check-toml # This hook checks toml files for parseable syntax. | ||
- id: check-vcs-permalinks # Ensures that links to vcs websites are permalinks. | ||
- id: check-xml # This hook checks xml files for parseable syntax. | ||
- id: check-yaml # This hook checks yaml files for parseable syntax. | ||
- id: debug-statements # Check for debugger imports and py37+ `breakpoint()` calls in python source. | ||
- id: destroyed-symlinks # Detects symlinks which are changed to regular files with a content of a path which that symlink was pointing to. | ||
- id: detect-private-key # Detects the presence of private keys | ||
- id: end-of-file-fixer # Ensures that a file is either empty, or ends with one newline. | ||
- id: fix-byte-order-marker # removes UTF-8 byte order marker | ||
- id: mixed-line-ending # Replaces or checks mixed line ending | ||
- id: sort-simple-yaml # Sorts simple YAML files which consist only of top-level keys, preserving comments and blocks. | ||
- id: trailing-whitespace # This hook trims trailing whitespace. | ||
- repo: local | ||
hooks: | ||
- id: flake8 | ||
name: flake8 | ||
entry: "flake8 --config ./.flake8" | ||
language: system # will not create a separate virtualenv for the hook and will run it in whatever environment you happen to be in when you run git commit or pre-commit run | ||
types: [python] # trigger for commits changing Python files | ||
require_serial: true # use require_serial so that script is only called once per commit | ||
- id: isort | ||
name: isort | ||
entry: "isort --settings-path=pyproject.toml" | ||
language: system | ||
types: [python] | ||
require_serial: true | ||
- id: black | ||
name: black | ||
entry: "black ." | ||
language: system | ||
types: [python] | ||
require_serial: true | ||
- id: mypy | ||
name: mypy | ||
entry: "mypy --config-file=pyproject.toml" | ||
language: system | ||
types: [python] | ||
require_serial: true | ||
# - id: bandit | ||
# name: bandit | ||
# entry: "bandit -r -c pyproject.toml ." | ||
# language: system | ||
# types: [python] | ||
# require_serial: true | ||
- repo: https://github.com/pre-commit/pygrep-hooks | ||
rev: v1.9.0 | ||
hooks: | ||
- id: python-check-blanket-noqa # Enforce that noqa annotations always occur with specific codes. Sample annotations: # noqa: F401, # noqa: F401,W203 | ||
# - id: python-check-blanket-type-ignore # Enforce that # type: ignore annotations always occur with specific codes. Sample annotations: # type: ignore[attr-defined], # type: ignore[attr-defined, name-defined] | ||
- id: python-check-mock-methods # Prevent common mistakes of assert mck.not_called(), assert mck.called_once_with(...) and mck.assert_called. | ||
- id: python-use-type-annotations # Enforce that python3.6+ type annotations are used instead of type comments | ||
- id: text-unicode-replacement-char # Forbid files which have a UTF-8 Unicode replacement character |
This file was deleted.
Oops, something went wrong.
This file contains 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 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 |
---|---|---|
|
@@ -3,4 +3,3 @@ include *.md | |
include *.py | ||
include LICENSE | ||
include README.rst | ||
include requirements.txt |
This file contains 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 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 |
---|---|---|
|
@@ -259,4 +259,4 @@ class MorseComplex | |
void ComputeMaximaPersistence(); | ||
}; | ||
|
||
#endif //MC_H | ||
#endif //MC_H |
This file contains 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.