-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ENH update to latest JAX version and slight refactor in test suite (#94)
* change `_wraps` to `implements` for compatibility with new jax version * update `jax.config` usage due to deprecation * black formatting * pin tensorflow-probability * REf make sure to use full import path * Update setup.py * Update bessel.py * TST fix test for new error string * TST fix more tests * TST fix more tests * TST fix tests for api * TST simplify a bit * ENH update submodule * TST run specific test * TST update submodule again * TST now run only test_fft * TST update to latest tests * TST run all tests * TST make GHA config cleaner * TST make tests more robust * TST add colors and workflow dipsatch to running tests --------- Co-authored-by: Matthew R. Becker <beckermr@users.noreply.github.com> Co-authored-by: beckermr <becker.mr@gmail.com>
- Loading branch information
1 parent
4b12d6b
commit 3292342
Showing
37 changed files
with
323 additions
and
304 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,45 +1,46 @@ | ||
name: Python package | ||
|
||
env: | ||
PY_COLORS: "1" | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
workflow_dispatch: null | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.9", "3.10", "3.11"] | ||
python-version: ["3.9", "3.10", "3.11", "3.12"] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install isort flake8 pytest black==23.3.0 flake8-pyproject | ||
python -m pip install pytest pre-commit | ||
python -m pip install . | ||
- name: Ensure black formatting | ||
run: | | ||
black --check jax_galsim/ tests/ --exclude "tests/GalSim/|tests/Coord/|tests/jax/galsim/" | ||
- name: Lint with flake8 | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
flake8 jax_galsim/ --count --exit-zero --statistics | ||
flake8 tests/jax/ --count --exit-zero --statistics | ||
- name: Ensure isort | ||
- name: Run pre-commit | ||
run: | | ||
isort --check jax_galsim | ||
pre-commit run --all-files --show-diff-on-failure | ||
- name: Test with pytest | ||
run: | | ||
git submodule update --init --recursive | ||
pytest --durations=0 | ||
pytest -v --durations=0 |
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
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
Oops, something went wrong.