-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #62 from biolink/tox
add tox, add biolink-2.2.3 support
- Loading branch information
Showing
8 changed files
with
96 additions
and
7 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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Run Tox | ||
|
||
on: | ||
# Triggers the workflow on push or pull request events but only for the master branch | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
types: trigger-run-tox | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python: [3.7, 3.8, 3.9] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
- name: Install Tox and any other packages | ||
run: pip install tox | ||
- name: Run Tox | ||
# Run tox using the version of Python in `PATH` | ||
run: tox -e 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 @@ | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ dev-install: | |
install: | ||
python setup.py install | ||
|
||
tests: | ||
test: | ||
pytest tests/* | ||
|
||
cleandist: | ||
|
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 |
---|---|---|
|
@@ -8,3 +8,6 @@ sphinx-rtd-theme | |
sphinxcontrib-napoleon | ||
numpydoc | ||
recommonmark | ||
tox | ||
flake8 | ||
black |
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
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,50 @@ | ||
# TODO explain tox and testenv reserved words | ||
[tox] | ||
envlist = py37 | ||
py38 | ||
py39 | ||
black-diff | ||
flake8 | ||
example | ||
|
||
[testenv] | ||
extras = | ||
jupyter | ||
allowlist_externals = | ||
/usr/bin/make | ||
/bin/cat | ||
/bin/cp | ||
/bin/mkdir | ||
/usr/bin/git | ||
deps = | ||
-rrequirements.txt | ||
commands = pytest | ||
|
||
# TODO document how these inherit from testenv | ||
[testenv:black-diff] | ||
line_length = 120 | ||
commands = | ||
black --check --diff bmt tests | ||
|
||
[testenv:black] | ||
line_length = 120 | ||
commands = | ||
black bmt tests | ||
|
||
[testenv:flake8] | ||
commands = | ||
flake8 bmt tests | ||
|
||
[flake8] | ||
ignore = E501 | ||
max_line_length = 70 | ||
max-complexity = 10 | ||
per-file-ignores = __init__.py:F401 | ||
|
||
[testenv:example] | ||
deps = | ||
-rrequirements.txt | ||
setenv = | ||
PYTHONPATH=. | ||
commands = | ||
python examples/edgelabel.py |