Skip to content

Commit

Permalink
MAINT: update lock files (#28)
Browse files Browse the repository at this point in the history
* FIX: set correct ignore patterns for `sphinx-autobuild`
* MAINT: address Ruff UP047 error
* MAINT: remove dynamic version from `uv.lock`
* MAINT: update developer configuration
  • Loading branch information
grayson-helmholz authored Jan 29, 2025
1 parent 3a75185 commit 88b63a1
Show file tree
Hide file tree
Showing 5 changed files with 191 additions and 188 deletions.
11 changes: 6 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repos:
- id: check-useless-excludes

- repo: https://github.com/ComPWA/policy
rev: 0.5.15
rev: 0.6.1
hooks:
- id: check-dev-files
args:
Expand All @@ -22,6 +22,7 @@ repos:
- --repo-title=benchmarks
- id: colab-toc-visible
- id: remove-empty-tags
- id: set-nb-display-name

- repo: https://github.com/kynan/nbstripout
rev: 0.8.1
Expand Down Expand Up @@ -52,7 +53,7 @@ repos:
metadata.vscode
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.1
rev: v0.9.3
hooks:
- id: ruff
args: [--fix]
Expand Down Expand Up @@ -93,7 +94,7 @@ repos:
- --in-place

- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
rev: 3.0.3
rev: 3.2.0
hooks:
- id: editorconfig-checker
name: editorconfig
Expand All @@ -104,11 +105,11 @@ repos:
)$
- repo: https://github.com/ComPWA/pyright-pre-commit
rev: v1.1.391
rev: v1.1.392
hooks:
- id: pyright

- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.5.18
rev: 0.5.25
hooks:
- id: uv-lock
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"notebook.formatOnSave.enabled": true,
"notebook.gotoSymbols.showAllSymbols": true,
"python.analysis.autoImportCompletions": false,
"python.defaultInterpreterPath": ".venv/bin/python",
"python.terminal.activateEnvironment": false,
"redhat.telemetry.enabled": false,
"rewrap.wrappingColumn": 88,
Expand Down
29 changes: 15 additions & 14 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,6 @@ test = [
include-package-data = false

[tool.pyright]
exclude = [
"**/.venv/",
]
reportAttributeAccessIssue = false
reportGeneralTypeIssues = false
reportImportCycles = false
Expand Down Expand Up @@ -96,7 +93,6 @@ addopts = [
]
filterwarnings = [
"error",
"ignore:.*argument to NotebookFile is deprecated.*:pytest.PytestRemovedIn8Warning",
"ignore:the imp module is deprecated in favour of importlib.*:DeprecationWarning",
]
markers = [
Expand Down Expand Up @@ -230,7 +226,7 @@ commands = [
"--keep-going",
"--show-traceback",
"docs/",
"docs/_build/html",
"docs/_build/html/",
],
]
description = "Build documentation and API through Sphinx"
Expand All @@ -241,16 +237,21 @@ allowlist_externals = ["sphinx-autobuild"]
commands = [
[
"sphinx-autobuild",
"--open-browser",
"--port=0",
"--re-ignore='.*/__pycache__/.*'",
"--re-ignore='.*/.ipynb_checkpoints/.*'",
"--re-ignore='.*/.virtual_documents/.*'",
"--re-ignore='.*\\.tmp'",
"--watch",
"docs",
"--re-ignore=/__pycache__(/.*)?$",
"--re-ignore=/_build(/.*)?$",
"--re-ignore=/\\.cache(/.*)?$",
"--re-ignore=/\\.egg-info(/.*)?$",
"--re-ignore=/\\.ipynb_checkpoints(/.*)?$",
"--re-ignore=/\\.virtual_documents(/.*)?$",
"--re-ignore=/api(/.*)?$",
"--re-ignore=/docs$",
"--re-ignore=/version\\.py$",
"--re-ignore=\\.egg-info(/.*)?$",
"--re-ignore=\\.png$",
"--re-ignore=\\.svg$",
"docs/",
"docs/_build/html",
"docs/_build/html/",
],
]
description = "Set up a server to directly preview changes to the HTML pages"
Expand Down Expand Up @@ -287,7 +288,7 @@ commands = [
"--builder=linkcheck",
"--show-traceback",
"docs/",
"docs/_build/linkcheck",
"docs/_build/linkcheck/",
],
]
description = "Check external links in the documentation (requires internet connection)"
Expand Down
4 changes: 3 additions & 1 deletion scripts/execute_jax_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,9 @@ def generate_sample(
T = TypeVar("T", ParametrizedBackendFunction, PositionalArgumentFunction)


def recompile_jax_function(func: T) -> T:
def recompile_jax_function[
T: (ParametrizedBackendFunction, PositionalArgumentFunction)
](func: T) -> T:
def recompile(f):
# https://jax.readthedocs.io/en/latest/jax-101/02-jitting.html#caching
return jax.jit(partial(f))
Expand Down
Loading

0 comments on commit 88b63a1

Please sign in to comment.