-
Notifications
You must be signed in to change notification settings - Fork 25
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
refactor CI and use tox.ini
with Tox 4 and PEP517 build
#108
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
fb1bff3
refactor CI and use `tox.ini` with TOx 4 and PEP517 build
zacharyburnett 1a933fc
add `long_description_content_type` to satisfy metadata check
zacharyburnett bd7f279
ignore directories in pytest discovery
zacharyburnett e181c49
remove `src` from `testpaths`
zacharyburnett 28e15ce
add change log entry
zacharyburnett ef5af0c
set CRDS path
zacharyburnett 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 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
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,80 @@ | ||
[tox] | ||
envlist = | ||
check-{style,security,build} | ||
test{,-jwst}-xdist{,-cov} | ||
build-{docs,dist} | ||
|
||
# tox environments are constructed with so-called 'factors' (or terms) | ||
# separated by hyphens, e.g. test-devdeps-cov. Lines below starting with factor: | ||
# will only take effect if that factor is included in the environment name. To | ||
# see a list of example environments that can be run, along with a description, | ||
# run: | ||
# | ||
# tox -l -v | ||
# | ||
|
||
[testenv:check-style] | ||
description = check code style, e.g. with flake8 | ||
skip_install = true | ||
deps = | ||
flake8 | ||
commands = | ||
flake8 --count src tests {posargs} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice addition to include tests in the flake8 check. |
||
|
||
[testenv:check-security] | ||
description = run bandit to check security compliance | ||
skip_install = true | ||
deps = | ||
bandit>=1.7 | ||
commands = | ||
bandit -r -ll src | ||
|
||
[testenv:check-build] | ||
description = check build sdist/wheel and a strict twine check for metadata | ||
skip_install = true | ||
deps = | ||
twine>=3.3 | ||
build | ||
commands = | ||
python -m build . | ||
twine check --strict dist/* | ||
|
||
[testenv] | ||
description = | ||
run tests | ||
xdist: using parallel processing | ||
cov: with coverage | ||
pass_env = | ||
jwst: CRDS_* | ||
set_env = | ||
jwst: CRDS_CLIENT_RETRY_COUNT=3 | ||
jwst: CRDS_CLIENT_RETRY_DELAY_SECONDS=20 | ||
jwst: CRDS_SERVER_URL=https://jwst-crds.stsci.edu | ||
extras = | ||
test | ||
deps = | ||
xdist: pytest-xdist | ||
cov: pytest-cov | ||
jwst: jwst[test] @ git+https://github.com/spacetelescope/jwst | ||
commands_pre = | ||
pip freeze | ||
commands = | ||
pytest \ | ||
xdist: -n auto \ | ||
cov: --cov=. --cov-config=setup.cfg --cov-report=term-missing --cov-report=xml \ | ||
jwst: --pyargs jwst.datamodels \ | ||
{posargs} | ||
|
||
[testenv:build-docs] | ||
description = invoke sphinx-build to build the HTML docs | ||
extras = docs | ||
commands = | ||
sphinx-build -W docs docs/_build | ||
|
||
[testenv:build-dist] | ||
description = build wheel and sdist | ||
skip_install = true | ||
deps = | ||
build | ||
commands = | ||
python -m build . |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any idea why coverage tests were running with asdf dev?