Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAINT: update lock files #537

Merged
merged 13 commits into from
Dec 20, 2024
1 change: 1 addition & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@
"yticks"
],
"language": "en-US",
"useGitignore": true,
"version": "0.2",
"words": [
"backends",
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ jobs:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- uses: astral-sh/setup-uv@v3
with:
enable-cache: true
- uses: astral-sh/setup-uv@v5
- name: Run pytest-benchmark
run: |
uv run \
Expand Down
18 changes: 9 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ repos:
- id: check-useless-excludes

- repo: https://github.com/ComPWA/policy
rev: 0.5.6
rev: 0.5.8
hooks:
- id: check-dev-files
args:
Expand All @@ -33,7 +33,7 @@ repos:
- --extras-require=doc,jax,pwa,viz

- repo: https://github.com/kynan/nbstripout
rev: 0.8.0
rev: 0.8.1
hooks:
- id: nbstripout
args:
Expand Down Expand Up @@ -61,7 +61,7 @@ repos:
metadata.vscode

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.2
rev: v0.8.4
hooks:
- id: ruff
args: [--fix]
Expand Down Expand Up @@ -97,7 +97,7 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/ComPWA/prettier-pre-commit
rev: v3.3.3
rev: v3.4.2
hooks:
- id: prettier

Expand All @@ -107,14 +107,14 @@ repos:
- id: taplo-format

- repo: https://github.com/pappasam/toml-sort
rev: v0.23.1
rev: v0.24.2
hooks:
- id: toml-sort
args:
- --in-place

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.29.4
rev: 0.30.0
hooks:
- id: check-jsonschema
name: Check CITATION.cff
Expand All @@ -127,7 +127,7 @@ repos:
pass_filenames: false

- repo: https://github.com/streetsidesoftware/cspell-cli
rev: v8.15.3
rev: v8.17.0
hooks:
- id: cspell

Expand All @@ -153,11 +153,11 @@ repos:
- python

- repo: https://github.com/ComPWA/pyright-pre-commit
rev: v1.1.388
rev: v1.1.391
hooks:
- id: pyright

- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.4.30
rev: 0.5.11
hooks:
- id: uv-lock
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"ms-python.mypy-type-checker",
"ms-python.python",
"ms-python.vscode-pylance",
"ms-toolsai.jupyter",
"ms-toolsai.vscode-jupyter-cell-tags",
"ms-vscode.live-server",
"ms-vsliveshare.vsliveshare",
"redhat.vscode-yaml",
Expand All @@ -30,6 +32,7 @@
"ms-python.flake8",
"ms-python.isort",
"ms-python.pylint",
"ms-toolsai.vscode-jupyter-slideshow",
"travisillig.vscode-json-stable-stringify",
"tyriar.sort-lines"
]
Expand Down
6 changes: 0 additions & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,6 @@
"coverage-gutters.showLineCoverage": true,
"diffEditor.experimental.showMoves": true,
"editor.formatOnSave": true,
"files.watcherExclude": {
"**/*_cache/**": true,
"**/.eggs/**": true,
"**/.git/**": true,
"**/.tox/**": true
},
"git.rebaseWhenSync": true,
"github-actions.workflows.pinned.refresh.enabled": true,
"github-actions.workflows.pinned.workflows": [".github/workflows/ci.yml"],
Expand Down
8 changes: 5 additions & 3 deletions benchmarks/ampform.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
from __future__ import annotations

from collections.abc import Sequence
from pprint import pprint
from typing import TYPE_CHECKING
from typing import TYPE_CHECKING, Union

import numpy as np
import pytest
Expand All @@ -17,10 +18,9 @@
from tensorwaves.function.sympy import create_parametrized_function

if TYPE_CHECKING:
from collections.abc import Mapping, Sequence
from collections.abc import Mapping

from ampform.helicity import HelicityModel
from qrules.combinatorics import StateDefinition

from tensorwaves.function import ParametrizedBackendFunction
from tensorwaves.interface import (
Expand All @@ -31,6 +31,8 @@
ParametrizedFunction,
)

StateDefinition = Union[str, tuple[str, Sequence[float]]]


def formulate_amplitude_model(
formalism,
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ def get_tensorflow_url() -> str:
"sympy": ("https://docs.sympy.org/latest", None),
"tensorflow": (get_tensorflow_url(), "tensorflow.inv"),
}
linkcheck_anchors = bool(os.environ.get("CI", False))
linkcheck_anchors = bool(os.environ.get("CI"))
linkcheck_anchors_ignore = [
r"pip\-installation\-gpu\-cuda",
]
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ split-on-trailing-comma = false
"S301",
"S403",
"T20",
"TCH00",
"TC00",
]
"*docs/usage/faster-lambdify.ipynb" = [
"F401",
Expand Down
10 changes: 5 additions & 5 deletions tests/optimizer/test_minuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ def __init__(self, polynomial: Callable) -> None:
self.__polynomial = polynomial

def __call__(self, parameters: Mapping[str, ParameterValue]) -> float:
_x = parameters["x"]
return self.__polynomial(_x)
x = parameters["x"]
return self.__polynomial(x)

def gradient(
self, parameters: Mapping[str, ParameterValue]
Expand All @@ -34,9 +34,9 @@ def __init__(self, polynomial: Callable) -> None:
self.__polynomial = polynomial

def __call__(self, parameters: Mapping[str, ParameterValue]) -> float:
_x = parameters["x"]
_y = parameters["y"]
return self.__polynomial(_x, _y)
x = parameters["x"]
y = parameters["y"]
return self.__polynomial(x, y)

def gradient(
self, parameters: Mapping[str, ParameterValue]
Expand Down
10 changes: 5 additions & 5 deletions tests/optimizer/test_scipy.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ def __init__(self, polynomial: Callable) -> None:
self.__polynomial = polynomial

def __call__(self, parameters: Mapping[str, ParameterValue]) -> float:
_x = parameters["x"]
return self.__polynomial(_x)
x = parameters["x"]
return self.__polynomial(x)

def gradient(
self, parameters: Mapping[str, ParameterValue]
Expand All @@ -34,9 +34,9 @@ def __init__(self, polynomial: Callable) -> None:
self.__polynomial = polynomial

def __call__(self, parameters: Mapping[str, ParameterValue]) -> float:
_x = parameters["x"]
_y = parameters["y"]
return self.__polynomial(_x, _y)
x = parameters["x"]
y = parameters["y"]
return self.__polynomial(x, y)

def gradient(
self, parameters: Mapping[str, ParameterValue]
Expand Down
4 changes: 2 additions & 2 deletions tests/test_estimator.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ def phsp() -> DataSample:

@pytest.mark.parametrize("backend", ["jax", "numba", "numpy", "tf"])
def test_create_cached_function(backend):
__symbols: tuple[sp.Symbol, ...] = sp.symbols("a b c d x y")
a, b, c, d, x, y = __symbols
symbols: tuple[sp.Symbol, ...] = sp.symbols("a b c d x y")
a, b, c, d, x, y = symbols
expression = a * x + b * (c * x + d * y**2)
parameter_defaults = {a: -2.5, b: 1.4, c: 0.8, d: 3.7}

Expand Down
Loading
Loading