diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 1c3b05f99c..60841fd13d 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -7,3 +7,8 @@ updates: 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/benchmark.yml b/.github/workflows/benchmark.yml index e0e00fc9ab..9f13a85de7 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -151,12 +151,12 @@ jobs: - name: Comment PR with the results if: env.has_changes == 'true' - uses: thollander/actions-comment-pull-request@v2 + uses: thollander/actions-comment-pull-request@v3 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + github-token: ${{ secrets.GITHUB_TOKEN }} with: - filePath: tests/benchmarks/commit_msg.txt - comment_tag: benchmark + file-path: tests/benchmarks/commit_msg.txt + comment-tag: benchmark - name: Upload benchmark data if: always() && env.has_changes == 'true' diff --git a/.github/workflows/regression_tests.yml b/.github/workflows/regression_tests.yml index 8c7e450607..9e648d3ec1 100644 --- a/.github/workflows/regression_tests.yml +++ b/.github/workflows/regression_tests.yml @@ -107,14 +107,9 @@ jobs: - name: Upload coverage if: env.has_changes == 'true' id : codecov - uses: Wandalen/wretry.action@v3.5.0 + uses: codecov/codecov-action@v5 with: - action: codecov/codecov-action@v4 - 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/.github/workflows/release.yml b/.github/workflows/release.yml index 2d1439cc21..74a37b4e58 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,7 +20,7 @@ jobs: - name: Build package run: python -m build --sdist --wheel - name: Publish package - uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 + uses: pypa/gh-action-pypi-publish@67339c736fd9354cd4f8cb0b744f2b82a74b5c70 with: user: __token__ password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 8a094ea55e..6e8ebc7a66 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -113,14 +113,9 @@ jobs: - name: Upload coverage if: env.has_changes == 'true' id : codecov - uses: Wandalen/wretry.action@v3.5.0 + uses: codecov/codecov-action@v5 with: - action: codecov/codecov-action@v4 - 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/desc/io/optimizable_io.py b/desc/io/optimizable_io.py index e15a21756e..2755a6a212 100644 --- a/desc/io/optimizable_io.py +++ b/desc/io/optimizable_io.py @@ -82,9 +82,9 @@ def _unjittable(x): # strings and functions can't be args to jitted functions, and ints/bools are pretty # much always flags or array sizes which also need to be a compile time constant if isinstance(x, (list, tuple)): - return any([_unjittable(y) for y in x]) + return all([_unjittable(y) or y is None for y in x]) if isinstance(x, dict): - return any([_unjittable(y) for y in x.values()]) + return all([_unjittable(y) or y is None for y in x.values()]) if hasattr(x, "dtype") and np.ndim(x) == 0: return np.issubdtype(x.dtype, np.bool_) or np.issubdtype(x.dtype, np.int_) return isinstance( @@ -94,6 +94,12 @@ def _unjittable(x): def _make_hashable(x): # turn unhashable ndarray of ints into a hashable tuple + if isinstance(x, list): + return [_make_hashable(y) for y in x] + if isinstance(x, tuple): + return tuple([_make_hashable(y) for y in x]) + if isinstance(x, dict): + return {key: _make_hashable(val) for key, val in x.items()} if hasattr(x, "shape"): return ("ndarray", x.shape, tuple(x.flatten())) return x @@ -103,6 +109,12 @@ def _unmake_hashable(x): # turn tuple of ints and shape to ndarray if isinstance(x, tuple) and x[0] == "ndarray": return np.array(x[2]).reshape(x[1]) + if isinstance(x, list): + return [_unmake_hashable(y) for y in x] + if isinstance(x, tuple): + return tuple([_unmake_hashable(y) for y in x]) + if isinstance(x, dict): + return {key: _unmake_hashable(val) for key, val in x.items()} return x