Skip to content

Commit

Permalink
template update
Browse files Browse the repository at this point in the history
  • Loading branch information
malmans2 committed Dec 27, 2024
1 parent 1bade52 commit c3df28e
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "https://github.com/ecmwf-projects/cookiecutter-conda-package",
"commit": "102b110f28cc922d55decbc50755af73274267d1",
"commit": "49808e25ca87d3d9c379b2407c80d079b3ae0b8b",
"checkout": null,
"context": {
"cookiecutter": {
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,6 @@ jobs:
with:
name: distribution
path: dist
- uses: pypa/gh-action-pypi-publish@v1.11.0
- uses: pypa/gh-action-pypi-publish@v1.12.3
with:
verbose: true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
version.py

# Sphinx automatic generation of API
docs/README.md
docs/_api/

# Combined environments
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ repos:
- id: blackdoc
additional_dependencies: [black==23.11.0]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.2
rev: v0.8.4
hooks:
- id: ruff
args: [--fix, --show-fixes]
- id: ruff-format
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.18
rev: 0.7.21
hooks:
- id: mdformat
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
Expand All @@ -34,6 +34,6 @@ repos:
- id: pretty-format-toml
args: [--autofix]
- repo: https://github.com/gitleaks/gitleaks
rev: v8.21.2
rev: v8.22.0
hooks:
- id: gitleaks
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ template-update:
pre-commit run --all-files cruft -c .pre-commit-config-cruft.yaml

docs-build:
cd docs && rm -fr _api && make clean && make html
cp README.md docs/. && cd docs && rm -fr _api && make clean && make html

# DO NOT EDIT ABOVE THIS LINE, ADD COMMANDS BELOW
1 change: 1 addition & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Efficiently cache calls to functions.
:caption: 'Contents:'
:maxdepth: 2
README.md
API Reference <_api/cacholote/index>
```

Expand Down
10 changes: 6 additions & 4 deletions tests/test_30_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,9 @@ class Dummy:
with pytest.raises(AttributeError):
cfunc(inst)
else:
with pytest.warns(UserWarning, match="AttributeError"), pytest.warns(
UserWarning, match="can NOT encode python call"
with (
pytest.warns(UserWarning, match="AttributeError"),
pytest.warns(UserWarning, match="can NOT encode python call"),
):
res = cfunc(inst)
assert res == {"a": inst, "args": (), "b": None, "kwargs": {}}
Expand All @@ -111,8 +112,9 @@ class Dummy:
with pytest.raises(AttributeError):
cfunc("test", b=1)
else:
with pytest.warns(UserWarning, match="AttributeError"), pytest.warns(
UserWarning, match="can NOT encode output"
with (
pytest.warns(UserWarning, match="AttributeError"),
pytest.warns(UserWarning, match="can NOT encode output"),
):
res = cfunc("test", b=1)
assert res.__class__.__name__ == "LocalClass"
Expand Down

0 comments on commit c3df28e

Please sign in to comment.