diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..60841fd --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,14 @@ +# Please see the documentation for all configuration options: +# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file + +version: 2 +updates: + - package-ecosystem: "pip" + directory: "/" # Location of package manifests + schedule: + interval: "weekly" + - package-ecosystem: "github-actions" + directory: "/" + schedule: + # Check for updates to GitHub Actions every week + interval: "weekly" diff --git a/.github/workflows/scheduled.yml b/.github/workflows/scheduled.yml index 284cb44..eacc429 100644 --- a/.github/workflows/scheduled.yml +++ b/.github/workflows/scheduled.yml @@ -30,9 +30,9 @@ jobs: python -m pytest -v --durations=0 --cov-report xml:cov.xml --cov-config=setup.cfg --cov=interpax/ --db ./prof.db - name: save coverage file and plot comparison results if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: unit_test_artifact + name: unit_test_artifact_${{ matrix.python-version }} path: | ./cov.xml ./prof.db diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 758d330..dab9aec 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -42,22 +42,17 @@ jobs: python -m pytest -v --durations=0 --cov-report xml:cov.xml --cov-config=setup.cfg --cov=interpax/ --db ./prof.db - name: save coverage file and plot comparison results if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: unit_test_artifact + name: unit_test_artifact_${{ matrix.python-version }} path: | ./cov.xml ./prof.db - name: Upload coverage id : codecov - uses: Wandalen/wretry.action@v1.0.36 + uses: codecov/codecov-action@v5 with: - action: codecov/codecov-action@v3 - with: | - token: ${{ secrets.CODECOV_TOKEN }} - name: codecov-umbrella - files: ./cov.xml - fail_ci_if_error: true - verbose: true - attempt_limit: 10 - attempt_delay: 60000 # ms, 1 min + name: codecov-umbrella + files: ./cov.xml + fail_ci_if_error: true + verbose: true diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 19e75a7..1705c2a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/psf/black - rev: 22.10.0 + rev: 24.10.0 hooks: - id: black - repo: https://github.com/pre-commit/pre-commit-hooks @@ -13,17 +13,17 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/pycqa/isort - rev: 5.12.0 + rev: 5.13.2 hooks: - id: isort name: isort (python) args: ["--profile", "black"] - repo: https://github.com/PyCQA/flake8 - rev: "5.0.4" + rev: "7.1.1" hooks: - id: flake8 additional_dependencies: ["flake8-docstrings", "flake8-eradicate", "flake8-isort"] - repo: https://github.com/asottile/pyupgrade - rev: v3.2.0 + rev: v3.19.0 hooks: - id: pyupgrade diff --git a/docs/conf.py b/docs/conf.py index a8486b2..9437e58 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -203,7 +203,6 @@ def linkcode_resolve(domain, info): # 'canonical_url': '', # 'analytics_id': 'UA-XXXXXXX-1', # Provided by Google in your dashboard "logo_only": True, - "display_version": True, "prev_next_buttons_location": "both", "style_external_links": False, "style_nav_header_background": "#3c4142", diff --git a/interpax/_fd_derivs.py b/interpax/_fd_derivs.py index 896daeb..6207a48 100644 --- a/interpax/_fd_derivs.py +++ b/interpax/_fd_derivs.py @@ -40,6 +40,8 @@ def approx_df( First derivative of f with respect to x. """ + # noqa: D202 + # close over static args to deal with non-jittable kwargs def fun(x, f): return _approx_df(x, f, method, axis, **kwargs) diff --git a/requirements-dev.txt b/requirements-dev.txt index 99098ad..ba72080 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,29 +1,27 @@ # standard install requirements -r ./requirements.txt -jax[cpu] >= 0.3.2, <= 0.5.0 -scipy >= 1.5.0, < 2.0 +scipy >= 1.10.0, <= 1.14.1 # building the docs -sphinx > 3.0.0 -sphinx_copybutton -sphinx-rtd-theme >= 1.0, < 2.0 -sphinx-github-style >= 1.0, <= 1.1 - +sphinx >= 3.0.0, <= 8.1.3 +sphinx_copybutton <= 0.5.2 +sphinx-rtd-theme >= 1.0, < 3.0.3 +sphinx-github-style >= 1.0, <= 1.2.2 # linting -black == 22.10.0 -flake8 >= 5.0.0, <=6.0.0 -flake8-docstrings >= 1.0.0, <=2.0.0 -flake8-eradicate >= 1.0.0, <=2.0.0 -flake8-isort >=5.0.0, <= 6.0.0 -pre-commit +black == 24.10.0 +flake8 >= 5.0.0, <= 7.1.1 +flake8-docstrings >= 1.0.0, <= 1.7.0 +flake8-eradicate >= 1.0.0, <= 1.5.0 +flake8-isort >=5.0.0, <= 6.1.1 +pre-commit <= 4.0.1 # testing and benchmarking -pytest >= 5.0.0 -pytest-benchmark -pytest-cov >= 2.6.0 -pytest-monitor +pytest >= 5.0.0, <= 8.3.4 +pytest-benchmark <= 5.1.0 +pytest-cov >= 2.6.0, <= 6.0.0 +pytest-monitor <= 1.6.6 # building build diff --git a/requirements.txt b/requirements.txt index bc3360b..ad5cbba 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ -equinox >= 0.11, < 0.12 -jax >= 0.3.2, < 0.5.0 -numpy >= 1.20.0, < 2.2 \ No newline at end of file +equinox >= 0.11.0, <= 0.11.10 +jax >= 0.3.2, <= 0.4.37 +numpy >= 1.20.0, <= 2.2.0 diff --git a/tests/test_interpolate.py b/tests/test_interpolate.py index f3c1441..f2760a6 100644 --- a/tests/test_interpolate.py +++ b/tests/test_interpolate.py @@ -286,9 +286,7 @@ def test_interp3d_vector_valued(self): zp = np.linspace(0, 3, 25) xxp, yyp, zzp = np.meshgrid(xp, yp, zp, indexing="ij") - f = lambda x, y, z: np.array( - [np.sin(x) * np.cos(y) * z**2, 0.1 * (x + y - z)] - ) + f = lambda x, y, z: np.array([np.sin(x) * np.cos(y) * z**2, 0.1 * (x + y - z)]) fp = f(xxp.T, yyp.T, zzp.T).T fq = interp3d(x, y, z, xp, yp, zp, fp, method="nearest")