-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor toxenvs, use OpenAstronomy workflows, and move MacOS jobs to…
… schedule (#75) * refactor CI * update `.flake8` configuration to ignore build directory * run jobs concurrently * fix * echo CRDS variables for debugging * use `ruff` * syntax fix * use OpenAstronomy workflow * remove posargs from workflow * minor fixes * split envs into sections * pass through CI env variable * run coverage immediately * move MacOS jobs to schedule * use environment variables for downstream tests * replace numpy tests with minimum dependencies test * pin `asdf>=2.13` to satisfy dependencies * drop `--ignore-installed` * ignore scripts in JWST tests * add change log entry
- Loading branch information
1 parent
809607c
commit 970286c
Showing
6 changed files
with
147 additions
and
116 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 |
---|---|---|
|
@@ -7,4 +7,7 @@ max-line-length = 130 | |
exclude = | ||
docs, | ||
src/stpipe/extern, | ||
build, | ||
.tox, | ||
.eggs | ||
ignore = E203, W503, W504, W605 |
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,20 @@ | ||
|
||
name: Weekly cron | ||
|
||
on: | ||
schedule: | ||
# Weekly Monday 6AM build | ||
- cron: "0 0 * * 1" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test: | ||
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1 | ||
with: | ||
envs: | | ||
- macos: test-xdist | ||
python-version: 3.8 | ||
- macos: test-xdist | ||
python-version: 3.9 | ||
- macos: test-xdist | ||
python-version: 3.10 |
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,88 @@ | ||
[tox] | ||
envlist = | ||
check-{style,security,build} | ||
test{,-warnings,-cov}-xdist | ||
test-numpy{120,121,122} | ||
test-{jwst,romancal}-xdist | ||
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 ruff | ||
skip_install = true | ||
deps = | ||
ruff | ||
commands = | ||
ruff . {posargs} | ||
|
||
[testenv:check-security] | ||
description = run bandit to check security compliance | ||
skip_install = true | ||
deps = | ||
bandit>=1.7 | ||
commands = | ||
bandit -r -ll src | ||
|
||
[testenv] | ||
description = | ||
run tests | ||
jwst: of JWST pipeline | ||
romancal: of Romancal pipeline | ||
oldestdeps: with the oldest supported version of key dependencies | ||
warnings: treating warnings as errors | ||
cov: with coverage | ||
xdist: using parallel processing | ||
extras = | ||
test | ||
deps = | ||
xdist: pytest-xdist | ||
cov: pytest-cov | ||
jwst: jwst[test] @ git+https://github.com/spacetelescope/jwst.git | ||
romancal: romancal[test] @ git+https://github.com/spacetelescope/romancal.git | ||
oldestdeps: minimum_dependencies | ||
pass_env = | ||
CRDS_* | ||
CI | ||
set_env = | ||
jwst: CRDS_SERVER_URL=https://jwst-crds.stsci.edu | ||
romancal: CRDS_SERVER_URL=https://roman-crds.stsci.edu | ||
package = | ||
!cov: wheel | ||
cov: editable | ||
allowlist_externals = | ||
echo | ||
commands_pre = | ||
oldestdeps: minimum_dependencies stpipe --filename requirements-min.txt | ||
oldestdeps: pip install -r requirements-min.txt | ||
pip freeze | ||
commands = | ||
pytest \ | ||
warnings: -W error \ | ||
xdist: -n auto \ | ||
jwst: --pyargs jwst --ignore-glob=timeconversion --ignore-glob=associations --ignore-glob=*/scripts/* \ | ||
romancal: --pyargs romancal \ | ||
cov: --cov=src/stpipe --cov-config=pyproject.toml --cov-report=term-missing --cov-report=xml \ | ||
{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 . |