vector 1.8.0__tar.gz → 1.9.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {vector-1.8.0 → vector-1.9.0}/.github/dependabot.yml +4 -2
- vector-1.9.0/.github/workflows/cd.yml +68 -0
- vector-1.9.0/.github/workflows/ci.yml +145 -0
- vector-1.9.0/.github/workflows/gpu.yml +48 -0
- {vector-1.8.0 → vector-1.9.0}/.github/workflows/notebooks.yml +10 -5
- {vector-1.8.0 → vector-1.9.0}/.gitignore +4 -0
- {vector-1.8.0 → vector-1.9.0}/.pre-commit-config.yaml +19 -10
- {vector-1.8.0 → vector-1.9.0}/CONTRIBUTING.md +1 -1
- {vector-1.8.0 → vector-1.9.0}/PKG-INFO +5 -2
- {vector-1.8.0 → vector-1.9.0}/README.md +2 -0
- {vector-1.8.0 → vector-1.9.0}/docs/conf.py +11 -2
- {vector-1.8.0 → vector-1.9.0}/docs/index.md +8 -0
- {vector-1.8.0 → vector-1.9.0}/docs/src/make_awkward.md +12 -1
- {vector-1.8.0 → vector-1.9.0}/environment.yml +2 -2
- {vector-1.8.0 → vector-1.9.0}/noxfile.py +30 -16
- {vector-1.8.0 → vector-1.9.0}/pyproject.toml +48 -13
- {vector-1.8.0 → vector-1.9.0}/src/vector/__init__.py +29 -7
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/lorentz/Et.py +1 -1
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/lorentz/Mt.py +24 -12
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/lorentz/Mt2.py +6 -6
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/lorentz/add.py +38 -3
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/lorentz/deltaRapidityPhi.py +32 -1
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/lorentz/deltaRapidityPhi2.py +32 -1
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/lorentz/dot.py +33 -2
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/lorentz/equal.py +33 -2
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/lorentz/is_lightlike.py +22 -1
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/lorentz/is_spacelike.py +23 -2
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/lorentz/is_timelike.py +22 -1
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/lorentz/isclose.py +35 -1
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/lorentz/not_equal.py +39 -6
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/lorentz/scale.py +6 -6
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/lorentz/subtract.py +38 -3
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/planar/is_antiparallel.py +20 -1
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/planar/is_parallel.py +20 -1
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/planar/is_perpendicular.py +25 -4
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/planar/not_equal.py +2 -2
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/planar/unit.py +2 -4
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/spatial/dot.py +16 -5
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/spatial/eta.py +15 -16
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/spatial/is_antiparallel.py +23 -1
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/spatial/is_parallel.py +23 -1
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/spatial/is_perpendicular.py +25 -3
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/spatial/not_equal.py +6 -6
- {vector-1.8.0 → vector-1.9.0}/src/vector/_methods.py +275 -38
- {vector-1.8.0 → vector-1.9.0}/src/vector/_pytree.py +8 -0
- vector-1.9.0/src/vector/_version.py +24 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_version.pyi +0 -2
- {vector-1.8.0 → vector-1.9.0}/src/vector/backends/_numba.py +0 -3
- {vector-1.8.0 → vector-1.9.0}/src/vector/backends/_numba_object.py +231 -445
- {vector-1.8.0 → vector-1.9.0}/src/vector/backends/awkward.py +174 -121
- vector-1.9.0/src/vector/backends/awkward_constructors.py +232 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/backends/numpy.py +212 -311
- {vector-1.8.0 → vector-1.9.0}/src/vector/backends/object.py +161 -301
- {vector-1.8.0 → vector-1.9.0}/src/vector/backends/sympy.py +73 -144
- {vector-1.8.0 → vector-1.9.0}/tests/backends/test_awkward.py +276 -0
- {vector-1.8.0 → vector-1.9.0}/tests/backends/test_numba_numpy.py +1 -1
- {vector-1.8.0 → vector-1.9.0}/tests/backends/test_numba_object.py +106 -4
- {vector-1.8.0 → vector-1.9.0}/tests/backends/test_numpy.py +139 -0
- {vector-1.8.0 → vector-1.9.0}/tests/backends/test_object.py +55 -0
- {vector-1.8.0 → vector-1.9.0}/tests/backends/test_sympy.py +44 -4
- {vector-1.8.0 → vector-1.9.0}/tests/compute/lorentz/test_Et.py +25 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/lorentz/test_Mt.py +34 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/lorentz/test_Mt2.py +10 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/lorentz/test_is_spacelike.py +31 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/lorentz/test_to_beta3.py +24 -24
- {vector-1.8.0 → vector-1.9.0}/tests/compute/spatial/test_eta.py +18 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/lorentz/test_Et.py +8 -2
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/lorentz/test_Et2.py +15 -5
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/lorentz/test_Mt.py +6 -6
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/lorentz/test_beta.py +2 -5
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/lorentz/test_gamma.py +14 -8
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/lorentz/test_t.py +14 -8
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/lorentz/test_t2.py +11 -7
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/lorentz/test_to_beta3.py +55 -91
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/spatial/test_deltaangle.py +10 -4
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/test_is_perpendicular.py +11 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/test_not_equal.py +4 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/test_scale.py +45 -45
- {vector-1.8.0 → vector-1.9.0}/tests/compute/test_is_perpendicular.py +27 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/test_not_equal.py +67 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/test_scale.py +80 -47
- {vector-1.8.0 → vector-1.9.0}/tests/compute/test_unit.py +25 -0
- vector-1.9.0/tests/cuda/test_awkward_cuda.py +145 -0
- vector-1.9.0/tests/root/conftest.py +218 -0
- vector-1.9.0/tests/root/test_EulerAngles.py +82 -0
- vector-1.9.0/tests/root/test_Polar2DVector.py +274 -0
- vector-1.9.0/tests/root/test_Polar3DVector.py +412 -0
- vector-1.9.0/tests/root/test_PtEtaPhiEVector.py +529 -0
- vector-1.9.0/tests/root/test_PtEtaPhiMVector.py +557 -0
- vector-1.9.0/tests/root/test_PxPyPzEVector.py +487 -0
- vector-1.9.0/tests/root/test_PxPyPzMVector.py +487 -0
- vector-1.9.0/tests/root/test_Quaternion.py +82 -0
- vector-1.9.0/tests/root/test_RhoEtaPhiVector.py +295 -0
- vector-1.9.0/tests/root/test_RhoZPhiVector.py +291 -0
- vector-1.9.0/tests/root/test_XYVector.py +238 -0
- vector-1.9.0/tests/root/test_XYZVector.py +364 -0
- vector-1.9.0/tests/root/test_vector.py +113 -0
- {vector-1.8.0 → vector-1.9.0}/tests/test_issues.py +166 -0
- vector-1.9.0/tests/test_pr_659.py +687 -0
- vector-1.8.0/.github/workflows/cd.yml +0 -56
- vector-1.8.0/.github/workflows/ci.yml +0 -119
- vector-1.8.0/src/vector/_version.py +0 -34
- vector-1.8.0/src/vector/backends/awkward_constructors.py +0 -411
- {vector-1.8.0 → vector-1.9.0}/.all-contributorsrc +0 -0
- {vector-1.8.0 → vector-1.9.0}/.git_archival.txt +0 -0
- {vector-1.8.0 → vector-1.9.0}/.gitattributes +0 -0
- {vector-1.8.0 → vector-1.9.0}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
- {vector-1.8.0 → vector-1.9.0}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {vector-1.8.0 → vector-1.9.0}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
- {vector-1.8.0 → vector-1.9.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {vector-1.8.0 → vector-1.9.0}/.github/codecov.yml +0 -0
- {vector-1.8.0 → vector-1.9.0}/.github/matchers/pylint.json +0 -0
- {vector-1.8.0 → vector-1.9.0}/.readthedocs.yml +0 -0
- {vector-1.8.0 → vector-1.9.0}/CITATION.cff +0 -0
- {vector-1.8.0 → vector-1.9.0}/LICENSE +0 -0
- {vector-1.8.0 → vector-1.9.0}/docs/Makefile +0 -0
- {vector-1.8.0 → vector-1.9.0}/docs/_images/LogoSrc.svg +0 -0
- {vector-1.8.0 → vector-1.9.0}/docs/_images/coordinate-systems.png +0 -0
- {vector-1.8.0 → vector-1.9.0}/docs/_images/coordinate-systems.svg +0 -0
- {vector-1.8.0 → vector-1.9.0}/docs/_images/vector-logo.png +0 -0
- {vector-1.8.0 → vector-1.9.0}/docs/_static/css/awkward_output.css +0 -0
- {vector-1.8.0 → vector-1.9.0}/docs/make.bat +0 -0
- {vector-1.8.0 → vector-1.9.0}/docs/src/awkward.ipynb +0 -0
- {vector-1.8.0 → vector-1.9.0}/docs/src/common.md +0 -0
- {vector-1.8.0 → vector-1.9.0}/docs/src/make_numpy.md +0 -0
- {vector-1.8.0 → vector-1.9.0}/docs/src/make_object.md +0 -0
- {vector-1.8.0 → vector-1.9.0}/docs/src/make_sympy.md +0 -0
- {vector-1.8.0 → vector-1.9.0}/docs/src/momentum2d.md +0 -0
- {vector-1.8.0 → vector-1.9.0}/docs/src/momentum3d.md +0 -0
- {vector-1.8.0 → vector-1.9.0}/docs/src/momentum4d.md +0 -0
- {vector-1.8.0 → vector-1.9.0}/docs/src/numba.ipynb +0 -0
- {vector-1.8.0 → vector-1.9.0}/docs/src/numpy.ipynb +0 -0
- {vector-1.8.0 → vector-1.9.0}/docs/src/object.ipynb +0 -0
- {vector-1.8.0 → vector-1.9.0}/docs/src/pytree.ipynb +0 -0
- {vector-1.8.0 → vector-1.9.0}/docs/src/pytree_api.md +0 -0
- {vector-1.8.0 → vector-1.9.0}/docs/src/sympy.ipynb +0 -0
- {vector-1.8.0 → vector-1.9.0}/docs/src/talks.md +0 -0
- {vector-1.8.0 → vector-1.9.0}/docs/src/vector2d.md +0 -0
- {vector-1.8.0 → vector-1.9.0}/docs/src/vector3d.md +0 -0
- {vector-1.8.0 → vector-1.9.0}/docs/src/vector4d.md +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/__init__.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/lorentz/Et2.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/lorentz/__init__.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/lorentz/beta.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/lorentz/boostX_beta.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/lorentz/boostX_gamma.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/lorentz/boostY_beta.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/lorentz/boostY_gamma.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/lorentz/boostZ_beta.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/lorentz/boostZ_gamma.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/lorentz/boost_beta3.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/lorentz/boost_p4.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/lorentz/gamma.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/lorentz/rapidity.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/lorentz/t.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/lorentz/t2.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/lorentz/tau.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/lorentz/tau2.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/lorentz/to_beta3.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/lorentz/transform4D.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/lorentz/unit.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/planar/__init__.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/planar/add.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/planar/deltaphi.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/planar/dot.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/planar/equal.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/planar/isclose.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/planar/phi.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/planar/rho.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/planar/rho2.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/planar/rotateZ.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/planar/scale.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/planar/subtract.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/planar/transform2D.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/planar/x.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/planar/y.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/spatial/__init__.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/spatial/add.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/spatial/costheta.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/spatial/cottheta.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/spatial/cross.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/spatial/deltaR.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/spatial/deltaR2.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/spatial/deltaangle.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/spatial/deltaeta.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/spatial/equal.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/spatial/isclose.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/spatial/mag.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/spatial/mag2.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/spatial/rotateX.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/spatial/rotateY.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/spatial/rotate_axis.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/spatial/rotate_euler.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/spatial/rotate_quaternion.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/spatial/scale.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/spatial/subtract.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/spatial/theta.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/spatial/transform3D.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/spatial/unit.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_compute/spatial/z.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/_typeutils.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/backends/__init__.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/backends/numba_numpy.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/src/vector/py.typed +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/__init__.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/backends/__init__.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/backends/test_awkward_numba.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/backends/test_dask_awkward.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/backends/test_operators.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/__init__.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/lorentz/__init__.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/lorentz/test_Et2.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/lorentz/test_beta.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/lorentz/test_boostX_beta.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/lorentz/test_boostX_gamma.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/lorentz/test_boostY_beta.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/lorentz/test_boostY_gamma.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/lorentz/test_boostZ_beta.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/lorentz/test_boostZ_gamma.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/lorentz/test_boost_beta3.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/lorentz/test_boost_p4.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/lorentz/test_deltaRapidityPhi.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/lorentz/test_deltaRapidityPhi2.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/lorentz/test_gamma.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/lorentz/test_is_lightlike.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/lorentz/test_is_timelike.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/lorentz/test_rapidity.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/lorentz/test_t.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/lorentz/test_t2.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/lorentz/test_tau.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/lorentz/test_tau2.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/planar/__init__.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/planar/test_deltaphi.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/planar/test_phi.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/planar/test_rho.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/planar/test_rho2.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/planar/test_rotateZ.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/planar/test_x.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/planar/test_y.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/spatial/__init__.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/spatial/test_costheta.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/spatial/test_cottheta.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/spatial/test_cross.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/spatial/test_deltaR.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/spatial/test_deltaR2.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/spatial/test_deltaangle.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/spatial/test_deltaeta.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/spatial/test_mag.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/spatial/test_mag2.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/spatial/test_rotateX.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/spatial/test_rotateY.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/spatial/test_rotate_axis.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/spatial/test_rotate_euler.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/spatial/test_rotate_quaternion.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/spatial/test_theta.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/spatial/test_z.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/lorentz/__init__.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/lorentz/test_Mt2.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/lorentz/test_boostX_beta.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/lorentz/test_boostX_gamma.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/lorentz/test_boostY_beta.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/lorentz/test_boostY_gamma.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/lorentz/test_boostZ_beta.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/lorentz/test_boostZ_gamma.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/lorentz/test_boost_beta3.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/lorentz/test_boost_p4.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/lorentz/test_deltaRapidityPhi.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/lorentz/test_deltaRapidityPhi2.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/lorentz/test_is_lightlike.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/lorentz/test_is_spacelike.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/lorentz/test_is_timelike.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/lorentz/test_rapidity.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/lorentz/test_tau.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/lorentz/test_tau2.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/planar/__init__.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/planar/test_deltaphi.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/planar/test_phi.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/planar/test_rho.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/planar/test_rho2.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/planar/test_rotateZ.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/planar/test_x.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/planar/test_y.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/spatial/__init__.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/spatial/test_costheta.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/spatial/test_cottheta.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/spatial/test_cross.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/spatial/test_deltaR.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/spatial/test_deltaR2.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/spatial/test_deltaeta.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/spatial/test_eta.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/spatial/test_mag.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/spatial/test_mag2.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/spatial/test_rotateX.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/spatial/test_rotateY.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/spatial/test_rotate_axis.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/spatial/test_rotate_euler.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/spatial/test_rotate_quaternion.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/spatial/test_theta.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/spatial/test_z.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/test_add.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/test_conversions.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/test_dot.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/test_equal.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/test_is_antiparallel.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/test_is_parallel.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/test_subtract.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/sympy/test_unit.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/test_add.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/test_conversions.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/test_dot.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/test_equal.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/test_is_antiparallel.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/test_is_parallel.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/test_isclose.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/compute/test_subtract.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/samples/issue-161-v2.pkl +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/test_methods.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/test_notebooks.py +0 -0
- {vector-1.8.0 → vector-1.9.0}/tests/test_pytree.py +0 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
name: CD
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
release:
|
|
6
|
+
types:
|
|
7
|
+
- published
|
|
8
|
+
|
|
9
|
+
permissions: {}
|
|
10
|
+
|
|
11
|
+
concurrency:
|
|
12
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
13
|
+
cancel-in-progress: false
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
dist:
|
|
17
|
+
name: Build sdist and wheel
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
21
|
+
with:
|
|
22
|
+
fetch-depth: 0
|
|
23
|
+
persist-credentials: false
|
|
24
|
+
|
|
25
|
+
- uses: hynek/build-and-inspect-python-package@2abe76da66d0a6a4a227101f9348ee855797cfa5 # v3.0.1
|
|
26
|
+
|
|
27
|
+
publish:
|
|
28
|
+
name: Publish to PyPI
|
|
29
|
+
needs: [dist]
|
|
30
|
+
runs-on: ubuntu-latest
|
|
31
|
+
if: github.event_name == 'release' && github.event.action == 'published'
|
|
32
|
+
environment:
|
|
33
|
+
name: pypi
|
|
34
|
+
url: https://pypi.org/p/vector
|
|
35
|
+
permissions:
|
|
36
|
+
id-token: write # trusted publishing to PyPI
|
|
37
|
+
attestations: write # record build provenance for the sdist and the wheel
|
|
38
|
+
contents: read # gh attestation verify reads this repository
|
|
39
|
+
|
|
40
|
+
steps:
|
|
41
|
+
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
42
|
+
with:
|
|
43
|
+
name: Packages
|
|
44
|
+
path: dist
|
|
45
|
+
|
|
46
|
+
- name: List distributions to be deployed
|
|
47
|
+
run: ls -l dist/
|
|
48
|
+
|
|
49
|
+
- name: Generate artifact attestation for sdist and wheel
|
|
50
|
+
uses: actions/attest@1e69f48acb82d1966a394da916b4c1698aa569d6 # v4.2.2
|
|
51
|
+
with:
|
|
52
|
+
subject-path: "dist/vector-*"
|
|
53
|
+
|
|
54
|
+
- name: Verify sdist artifact attestation
|
|
55
|
+
env:
|
|
56
|
+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
57
|
+
REPOSITORY: ${{ github.repository }}
|
|
58
|
+
run: gh attestation verify dist/vector-*.tar.gz --repo "$REPOSITORY"
|
|
59
|
+
|
|
60
|
+
- name: Verify wheel artifact attestation
|
|
61
|
+
env:
|
|
62
|
+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
63
|
+
REPOSITORY: ${{ github.repository }}
|
|
64
|
+
run: gh attestation verify dist/vector-*.whl --repo "$REPOSITORY"
|
|
65
|
+
|
|
66
|
+
- uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
|
|
67
|
+
with:
|
|
68
|
+
attestations: true
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
push:
|
|
6
|
+
branches:
|
|
7
|
+
- main
|
|
8
|
+
- develop
|
|
9
|
+
workflow_dispatch:
|
|
10
|
+
|
|
11
|
+
permissions: {}
|
|
12
|
+
|
|
13
|
+
concurrency:
|
|
14
|
+
# Skip intermediate builds: always.
|
|
15
|
+
# Cancel intermediate builds: only if it is a pull request build.
|
|
16
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
17
|
+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
|
|
18
|
+
|
|
19
|
+
env:
|
|
20
|
+
# The "FORCE_COLOR" variable, when set to 1,
|
|
21
|
+
# tells Nox to colorize itself.
|
|
22
|
+
FORCE_COLOR: "1"
|
|
23
|
+
|
|
24
|
+
jobs:
|
|
25
|
+
pre-commit:
|
|
26
|
+
name: Check SDist
|
|
27
|
+
runs-on: ubuntu-latest
|
|
28
|
+
permissions: {}
|
|
29
|
+
steps:
|
|
30
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
31
|
+
with:
|
|
32
|
+
persist-credentials: false
|
|
33
|
+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
34
|
+
with:
|
|
35
|
+
python-version: 3.x
|
|
36
|
+
- uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
|
|
37
|
+
- name: PyLint
|
|
38
|
+
run: uvx nox -s pylint -- --output-format=github
|
|
39
|
+
|
|
40
|
+
check-lite:
|
|
41
|
+
runs-on: ubuntu-latest
|
|
42
|
+
permissions: {}
|
|
43
|
+
strategy:
|
|
44
|
+
fail-fast: false
|
|
45
|
+
matrix:
|
|
46
|
+
python-version:
|
|
47
|
+
- "3.10"
|
|
48
|
+
- "3.11"
|
|
49
|
+
- "3.12"
|
|
50
|
+
- "3.13"
|
|
51
|
+
- "3.14"
|
|
52
|
+
- "3.14t"
|
|
53
|
+
- "3.15"
|
|
54
|
+
- "3.15t"
|
|
55
|
+
name: Python ${{ matrix.python-version }} - Lite
|
|
56
|
+
steps:
|
|
57
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
58
|
+
with:
|
|
59
|
+
persist-credentials: false
|
|
60
|
+
|
|
61
|
+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
62
|
+
with:
|
|
63
|
+
python-version: ${{ matrix.python-version }}
|
|
64
|
+
allow-prereleases: true
|
|
65
|
+
|
|
66
|
+
- uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
|
|
67
|
+
|
|
68
|
+
- name: Test lite package
|
|
69
|
+
run: uvx nox -s lite-$PYTHON --verbose
|
|
70
|
+
env:
|
|
71
|
+
PYTHON: ${{ matrix.python-version }}
|
|
72
|
+
|
|
73
|
+
check-full:
|
|
74
|
+
needs: [check-lite]
|
|
75
|
+
runs-on: ubuntu-latest
|
|
76
|
+
permissions: {}
|
|
77
|
+
strategy:
|
|
78
|
+
fail-fast: false
|
|
79
|
+
matrix:
|
|
80
|
+
python-version:
|
|
81
|
+
- "3.10"
|
|
82
|
+
- "3.11"
|
|
83
|
+
- "3.12"
|
|
84
|
+
- "3.13"
|
|
85
|
+
- "3.14"
|
|
86
|
+
- "3.14t"
|
|
87
|
+
- "3.15"
|
|
88
|
+
- "3.15t"
|
|
89
|
+
name: Python ${{ matrix.python-version }} - Full
|
|
90
|
+
steps:
|
|
91
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
92
|
+
with:
|
|
93
|
+
persist-credentials: false
|
|
94
|
+
|
|
95
|
+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
96
|
+
with:
|
|
97
|
+
python-version: ${{ matrix.python-version }}
|
|
98
|
+
allow-prereleases: true
|
|
99
|
+
|
|
100
|
+
- uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
|
|
101
|
+
|
|
102
|
+
- name: Install nox
|
|
103
|
+
run: uv tool install nox
|
|
104
|
+
|
|
105
|
+
- name: Run doctests on Python 3.11
|
|
106
|
+
if: matrix.python-version == 3.11
|
|
107
|
+
run: nox -s doctests-$PYTHON --verbose
|
|
108
|
+
env:
|
|
109
|
+
PYTHON: ${{ matrix.python-version }}
|
|
110
|
+
|
|
111
|
+
- name: Test package and generate coverage report
|
|
112
|
+
run: nox -s coverage-$PYTHON --verbose
|
|
113
|
+
env:
|
|
114
|
+
PYTHON: ${{ matrix.python-version }}
|
|
115
|
+
|
|
116
|
+
- name: Upload coverage report
|
|
117
|
+
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
|
|
118
|
+
with:
|
|
119
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
|
120
|
+
|
|
121
|
+
root:
|
|
122
|
+
name: ROOT comparison tests
|
|
123
|
+
runs-on: ubuntu-latest
|
|
124
|
+
permissions: {}
|
|
125
|
+
steps:
|
|
126
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
127
|
+
with:
|
|
128
|
+
persist-credentials: false
|
|
129
|
+
- uses: prefix-dev/setup-pixi@f00437f565399d418b0acc85936d12c1fb668347 # v0.10.1
|
|
130
|
+
with:
|
|
131
|
+
environments: root
|
|
132
|
+
- name: Run ROOT comparison tests
|
|
133
|
+
run: pixi run root-tests
|
|
134
|
+
|
|
135
|
+
pass:
|
|
136
|
+
name: Pass
|
|
137
|
+
needs: [pre-commit, check-lite, check-full, root]
|
|
138
|
+
if: always()
|
|
139
|
+
runs-on: ubuntu-latest
|
|
140
|
+
permissions: {}
|
|
141
|
+
steps:
|
|
142
|
+
- name: Decide whether all required jobs succeeded
|
|
143
|
+
run: $SUCCESS
|
|
144
|
+
env:
|
|
145
|
+
SUCCESS: ${{ !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') }}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
name: GPU
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
schedule:
|
|
5
|
+
- cron: "19 5 * * *"
|
|
6
|
+
push:
|
|
7
|
+
branches:
|
|
8
|
+
- main
|
|
9
|
+
workflow_dispatch:
|
|
10
|
+
|
|
11
|
+
permissions: {}
|
|
12
|
+
|
|
13
|
+
concurrency:
|
|
14
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
15
|
+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
|
|
16
|
+
|
|
17
|
+
env:
|
|
18
|
+
FORCE_COLOR: "1"
|
|
19
|
+
|
|
20
|
+
jobs:
|
|
21
|
+
gpu-tests:
|
|
22
|
+
name: CUDA ${{ matrix.cuda-version }}
|
|
23
|
+
if: github.event_name != 'schedule' || github.repository_owner == 'scikit-hep'
|
|
24
|
+
runs-on: self-hosted
|
|
25
|
+
permissions: {}
|
|
26
|
+
timeout-minutes: 60
|
|
27
|
+
|
|
28
|
+
strategy:
|
|
29
|
+
fail-fast: false
|
|
30
|
+
matrix:
|
|
31
|
+
cuda-version:
|
|
32
|
+
- 12
|
|
33
|
+
- 13
|
|
34
|
+
|
|
35
|
+
steps:
|
|
36
|
+
- name: Clean the workspace
|
|
37
|
+
run: rm -rf * .[!.]* || echo "Nothing to clean"
|
|
38
|
+
|
|
39
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
40
|
+
with:
|
|
41
|
+
persist-credentials: false
|
|
42
|
+
|
|
43
|
+
- uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
|
|
44
|
+
|
|
45
|
+
- name: Run the GPU tests
|
|
46
|
+
run: uvx nox -s gpu --verbose --download-python always
|
|
47
|
+
env:
|
|
48
|
+
CUDA_VERSION: ${{ matrix.cuda-version }}
|
|
@@ -7,6 +7,8 @@ on:
|
|
|
7
7
|
- develop
|
|
8
8
|
workflow_dispatch:
|
|
9
9
|
|
|
10
|
+
permissions: {}
|
|
11
|
+
|
|
10
12
|
concurrency:
|
|
11
13
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
12
14
|
cancel-in-progress: true
|
|
@@ -18,18 +20,21 @@ env:
|
|
|
18
20
|
|
|
19
21
|
jobs:
|
|
20
22
|
test:
|
|
23
|
+
name: Test notebooks
|
|
21
24
|
runs-on: ubuntu-latest
|
|
25
|
+
permissions: {}
|
|
22
26
|
|
|
23
27
|
steps:
|
|
24
|
-
- uses: actions/checkout@
|
|
28
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
29
|
+
with:
|
|
30
|
+
persist-credentials: false
|
|
25
31
|
|
|
26
32
|
- name: Set up Python
|
|
27
|
-
uses: actions/setup-python@
|
|
33
|
+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
28
34
|
with:
|
|
29
35
|
python-version: "3.10"
|
|
30
36
|
|
|
31
|
-
-
|
|
32
|
-
run: python -m pip list
|
|
37
|
+
- uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
|
|
33
38
|
|
|
34
39
|
- name: Test example notebooks
|
|
35
|
-
run:
|
|
40
|
+
run: uvx nox -s notebooks --verbose
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
ci:
|
|
2
2
|
autoupdate_commit_msg: "chore: update pre-commit hooks"
|
|
3
3
|
autofix_commit_msg: "style: pre-commit fixes"
|
|
4
|
+
autoupdate_schedule: monthly
|
|
4
5
|
|
|
5
6
|
repos:
|
|
6
7
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
7
|
-
rev: v6.0.0
|
|
8
|
+
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # frozen: v6.0.0
|
|
8
9
|
hooks:
|
|
9
10
|
- id: check-added-large-files
|
|
10
11
|
- id: check-case-conflict
|
|
@@ -15,52 +16,60 @@ repos:
|
|
|
15
16
|
- id: end-of-file-fixer
|
|
16
17
|
exclude: ^docs
|
|
17
18
|
- id: mixed-line-ending
|
|
18
|
-
- id: requirements-txt-fixer
|
|
19
19
|
- id: trailing-whitespace
|
|
20
20
|
|
|
21
21
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
22
|
-
rev:
|
|
22
|
+
rev: 321478e58f4938179c6b86e4ddfa923d1547a49b # frozen: v0.16.6
|
|
23
23
|
hooks:
|
|
24
24
|
- id: ruff-check
|
|
25
25
|
args: ["--fix", "--show-fixes"]
|
|
26
26
|
- id: ruff-format
|
|
27
27
|
|
|
28
28
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
29
|
-
rev:
|
|
29
|
+
rev: 7ff8d35ae36a7d2b968f2f90b4c723e292e594ee # frozen: v2.3.1
|
|
30
30
|
hooks:
|
|
31
31
|
- id: mypy
|
|
32
32
|
files: src
|
|
33
33
|
args: []
|
|
34
34
|
additional_dependencies:
|
|
35
|
-
|
|
35
|
+
# numpy>=2.5 requires Python>=3.12 and its stubs use PEP 695 syntax,
|
|
36
|
+
# which mypy cannot parse while python_version is pinned to 3.10
|
|
37
|
+
- numpy<2.5
|
|
36
38
|
- packaging
|
|
37
39
|
- sympy
|
|
38
40
|
- optree
|
|
39
41
|
|
|
40
42
|
- repo: https://github.com/codespell-project/codespell
|
|
41
|
-
rev: v2.4.
|
|
43
|
+
rev: 57b21406f092110c18776e39b0bda50d37c945c8 # frozen: v2.4.3
|
|
42
44
|
hooks:
|
|
43
45
|
- id: codespell
|
|
44
46
|
|
|
45
47
|
- repo: https://github.com/rbubley/mirrors-prettier
|
|
46
|
-
rev: "v3.
|
|
48
|
+
rev: "0ee178619d696787ca73d210cc191d720868c631" # frozen: v3.9.6
|
|
47
49
|
hooks:
|
|
48
50
|
- id: prettier
|
|
49
51
|
types_or: [yaml, markdown, html, css, scss, javascript, json]
|
|
50
52
|
exclude: assets/js/webapp\.js
|
|
51
53
|
|
|
52
54
|
- repo: https://github.com/adamchainz/blacken-docs
|
|
53
|
-
rev: 1.20.0
|
|
55
|
+
rev: dda8db18cfc68df532abf33b185ecd12d5b7b326 # frozen: 1.20.0
|
|
54
56
|
hooks:
|
|
55
57
|
- id: blacken-docs
|
|
56
58
|
args: ["-E"]
|
|
57
|
-
additional_dependencies: [black~=
|
|
59
|
+
additional_dependencies: [black~=26.0]
|
|
58
60
|
|
|
59
61
|
- repo: https://github.com/pre-commit/pygrep-hooks
|
|
60
|
-
rev: v1.10.0
|
|
62
|
+
rev: 3a6eb0fadf60b3cccfd80bad9dbb6fae7e47b316 # frozen: v1.10.0
|
|
61
63
|
hooks:
|
|
62
64
|
- id: python-check-blanket-type-ignore
|
|
63
65
|
exclude: ^src/vector/backends/_numba_object.py$
|
|
64
66
|
- id: rst-backticks
|
|
65
67
|
- id: rst-directive-colons
|
|
66
68
|
- id: rst-inline-touching-normal
|
|
69
|
+
|
|
70
|
+
- repo: https://github.com/zizmorcore/zizmor-pre-commit
|
|
71
|
+
rev: cef8b8350da46d8114c7e6b7272aebdccdf193ce # frozen: v1.30.0
|
|
72
|
+
hooks:
|
|
73
|
+
- id: zizmor
|
|
74
|
+
files: "^\\.github"
|
|
75
|
+
args: [--persona=pedantic]
|
|
@@ -146,7 +146,7 @@ pytest tests/test_notebooks.py
|
|
|
146
146
|
|
|
147
147
|
`vector`'s documentation is mainly written in the form of [docstrings](https://peps.python.org/pep-0257) and [reStructurredText](https://docutils.sourceforge.io/docs/user/rst/quickref.html). The docstrings include the description, arguments, examples, return values, and attributes of a class or a function, and the `.rst` files enable us to render this documentation on `vector`'s documentation website.
|
|
148
148
|
|
|
149
|
-
`vector` primarily uses [Sphinx](https://www.sphinx-doc.org/en/master/) for rendering documentation on its website. The configuration file (`conf.py`) for `sphinx` can be found [here](https://github.com/scikit-hep/vector/blob/main/docs/conf.py). The documentation is deployed on [https://readthedocs.io]() [here](https://vector.readthedocs.io/en/latest/).
|
|
149
|
+
`vector` primarily uses [Sphinx](https://www.sphinx-doc.org/en/master/) for rendering documentation on its website. The configuration file (`conf.py`) for `sphinx` can be found [here](https://github.com/scikit-hep/vector/blob/main/docs/conf.py). The documentation is deployed on [https://readthedocs.io](<>) [here](https://vector.readthedocs.io/en/latest/).
|
|
150
150
|
|
|
151
151
|
Ideally, with the addition of every new feature to `vector`, documentation should be added using comments, docstrings, and `.rst` files.
|
|
152
152
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
2
|
Name: vector
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.9.0
|
|
4
4
|
Summary: Vector classes and utilities
|
|
5
5
|
Project-URL: Bug Tracker, https://github.com/scikit-hep/vector/issues
|
|
6
6
|
Project-URL: Changelog, https://vector.readthedocs.io/en/latest/changelog.html
|
|
@@ -23,6 +23,7 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
23
23
|
Classifier: Programming Language :: Python :: 3.12
|
|
24
24
|
Classifier: Programming Language :: Python :: 3.13
|
|
25
25
|
Classifier: Programming Language :: Python :: 3.14
|
|
26
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
26
27
|
Classifier: Programming Language :: Python :: Free Threading :: 3 - Stable
|
|
27
28
|
Classifier: Topic :: Scientific/Engineering
|
|
28
29
|
Classifier: Topic :: Scientific/Engineering :: Information Analysis
|
|
@@ -49,6 +50,7 @@ Description-Content-Type: text/markdown
|
|
|
49
50
|
[![Scikit-HEP][sk-badge]][sk-link]
|
|
50
51
|
|
|
51
52
|
[![Actions Status][actions-badge]][actions-link]
|
|
53
|
+
[![GPU Action Status][gpu-badge]][actions-link]
|
|
52
54
|
[![Documentation Status][rtd-badge]][rtd-link]
|
|
53
55
|
[![pre-commit.ci status][pre-commit-badge]][pre-commit-link]
|
|
54
56
|
[![codecov percentage][codecov-badge]][codecov-link]
|
|
@@ -242,6 +244,7 @@ Support for this work was provided by the National Science Foundation cooperativ
|
|
|
242
244
|
[github-discussions-link]: https://github.com/scikit-hep/vector/discussions
|
|
243
245
|
[gitter-badge]: https://badges.gitter.im/Scikit-HEP/vector.svg
|
|
244
246
|
[gitter-link]: https://gitter.im/Scikit-HEP/vector?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
|
|
247
|
+
[gpu-badge]: https://github.com/scikit-hep/vector/actions/workflows/gpu.yml/badge.svg
|
|
245
248
|
[joss-badge]: https://joss.theoj.org/papers/10.21105/joss.07791/status.svg
|
|
246
249
|
[joss-link]: https://doi.org/10.21105/joss.07791
|
|
247
250
|
[license-badge]: https://img.shields.io/badge/License-BSD_3--Clause-blue.svg
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
[![Scikit-HEP][sk-badge]][sk-link]
|
|
8
8
|
|
|
9
9
|
[![Actions Status][actions-badge]][actions-link]
|
|
10
|
+
[![GPU Action Status][gpu-badge]][actions-link]
|
|
10
11
|
[![Documentation Status][rtd-badge]][rtd-link]
|
|
11
12
|
[![pre-commit.ci status][pre-commit-badge]][pre-commit-link]
|
|
12
13
|
[![codecov percentage][codecov-badge]][codecov-link]
|
|
@@ -200,6 +201,7 @@ Support for this work was provided by the National Science Foundation cooperativ
|
|
|
200
201
|
[github-discussions-link]: https://github.com/scikit-hep/vector/discussions
|
|
201
202
|
[gitter-badge]: https://badges.gitter.im/Scikit-HEP/vector.svg
|
|
202
203
|
[gitter-link]: https://gitter.im/Scikit-HEP/vector?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
|
|
204
|
+
[gpu-badge]: https://github.com/scikit-hep/vector/actions/workflows/gpu.yml/badge.svg
|
|
203
205
|
[joss-badge]: https://joss.theoj.org/papers/10.21105/joss.07791/status.svg
|
|
204
206
|
[joss-link]: https://doi.org/10.21105/joss.07791
|
|
205
207
|
[license-badge]: https://img.shields.io/badge/License-BSD_3--Clause-blue.svg
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
from __future__ import annotations
|
|
8
8
|
|
|
9
9
|
import importlib.metadata
|
|
10
|
-
from datetime import datetime
|
|
10
|
+
from datetime import datetime, timezone
|
|
11
11
|
|
|
12
12
|
# -- Path setup --------------------------------------------------------------
|
|
13
13
|
# If extensions (or modules to document with autodoc) are in another directory,
|
|
@@ -22,7 +22,7 @@ from datetime import datetime
|
|
|
22
22
|
# -- Project information -----------------------------------------------------
|
|
23
23
|
|
|
24
24
|
project = "Vector"
|
|
25
|
-
copyright = f"2019\u2012{datetime.now().year}"
|
|
25
|
+
copyright = f"2019\u2012{datetime.now(tz=timezone.utc).year}"
|
|
26
26
|
author = (
|
|
27
27
|
"Saransh Chopra, Henry Schreiner, Jim Pivarski, Eduardo Rodrigues, and Jonas Eschle"
|
|
28
28
|
)
|
|
@@ -42,6 +42,7 @@ extensions = [
|
|
|
42
42
|
"sphinx.ext.napoleon",
|
|
43
43
|
"sphinx_copybutton",
|
|
44
44
|
"sphinx_math_dollar",
|
|
45
|
+
"sphinx_llm.txt",
|
|
45
46
|
]
|
|
46
47
|
|
|
47
48
|
source_suffix = [".rst", ".md"]
|
|
@@ -64,6 +65,14 @@ exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
|
|
|
64
65
|
|
|
65
66
|
autodoc_mock_imports = ["numba"]
|
|
66
67
|
|
|
68
|
+
# -- Options for LLM-friendly output -----------------------------------------
|
|
69
|
+
|
|
70
|
+
# The default is the full README, which is too long for the summary block
|
|
71
|
+
llms_txt_description = (
|
|
72
|
+
"Documentation of the Vector library for 2D, 3D, and Lorentz vectors,"
|
|
73
|
+
" including the object, NumPy, Awkward, SymPy, and Numba backends."
|
|
74
|
+
)
|
|
75
|
+
|
|
67
76
|
# -- Options for HTML output -------------------------------------------------
|
|
68
77
|
|
|
69
78
|
# The theme to use for HTML and HTML Help pages. See the documentation for
|
|
@@ -27,7 +27,18 @@ and thus the `abs` function computes the magnitude of each record as `sqrt(x**2
|
|
|
27
27
|
|
|
28
28
|
It is not necessary to install Vector's behaviors globally. They could be installed in the `vec` array only by passing `behavior=vector.backends.awkward.behavior` to the [ak.Array](https://awkward-array.org/doc/main/reference/generated/ak.Array.html) constructor.
|
|
29
29
|
|
|
30
|
-
The records can contain more fields than those that specify coordinates, which can be useful for specifying properties of a particle other than its momentum. Only the coordinate names are considered when performing vector calculations. Coordinates must be numbers (not, for instance, lists of numbers).
|
|
30
|
+
The records can contain more fields than those that specify coordinates, which can be useful for specifying properties of a particle other than its momentum. Only the coordinate names are considered when performing vector calculations. Coordinates must be numbers (not, for instance, lists of numbers).
|
|
31
|
+
|
|
32
|
+
Field names that mean a coordinate under another name, such as `rho` (a synonym of `pt`) or `energy` in a record that already has `mass`, would silently change what a vector means, so Vector rejects them:
|
|
33
|
+
|
|
34
|
+
```python
|
|
35
|
+
>>> ak.Array([{"pt": 1.1, "phi": 2.2, "eta": 3.3, "mass": 4.4, "energy": 5.5}], with_name="Momentum4D")
|
|
36
|
+
Traceback (most recent call last):
|
|
37
|
+
...
|
|
38
|
+
TypeError: MomentumArray4D with fields ['pt', 'phi', 'eta', 'mass', 'energy']: specify t= or tau=, but not more than one (got 'energy', 'mass')
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
This runs whenever the behaviors are attached, not only in `vector.Array` and `vector.zip`, so `jets["rho"] = ...` is caught too. It is the `__awkward_validation__` hook of each behavior class and needs `awkward>=2.8.11`; older versions skip it. A rejected in-place assignment is only undone by `awkward>=2.12`: before that, the `TypeError` is raised but the array keeps the offending field. Subclassed behaviors (see [Advanced: subclassing Awkward-Vector behaviors](awkward.ipynb)) inherit the check and can extend it by overriding `__awkward_validation__` and calling `super().__awkward_validation__()`.
|
|
31
42
|
|
|
32
43
|
The `vector.Array` function (`vector.awk` is a synonym) is an alternative to the [ak.Array](https://awkward-array.org/doc/main/reference/generated/ak.Array.html) constructor, which installs Vector's behavior in the new array (not globally in `ak.behavior`).
|
|
33
44
|
|
|
@@ -5,12 +5,12 @@ dependencies:
|
|
|
5
5
|
- jupyterlab >=1.2
|
|
6
6
|
- nb_conda_kernels
|
|
7
7
|
- pip >=18
|
|
8
|
-
- pytest >=
|
|
8
|
+
- pytest >=7
|
|
9
9
|
- numba >=0.57
|
|
10
10
|
- numpy >=1.19.3
|
|
11
11
|
- root >=6.18.04
|
|
12
12
|
- pip:
|
|
13
13
|
- "awkward>=2.0.0"
|
|
14
14
|
- "uproot>=5.0.0"
|
|
15
|
-
- "scikit-hep-testdata>=0.
|
|
15
|
+
- "scikit-hep-testdata>=0.6.0"
|
|
16
16
|
- -e .
|
|
@@ -7,8 +7,6 @@
|
|
|
7
7
|
from __future__ import annotations
|
|
8
8
|
|
|
9
9
|
import os
|
|
10
|
-
import sys
|
|
11
|
-
import sysconfig
|
|
12
10
|
from pathlib import Path
|
|
13
11
|
|
|
14
12
|
import nox
|
|
@@ -19,7 +17,7 @@ nox.options.default_venv_backend = "uv|virtualenv"
|
|
|
19
17
|
DIR = Path(__file__).parent.resolve()
|
|
20
18
|
PYPROJECT = nox.project.load_toml(DIR / "pyproject.toml")
|
|
21
19
|
ALL_PYTHON = nox.project.python_versions(PYPROJECT)
|
|
22
|
-
ALL_PYTHON += ["3.14t"] # add free-threaded Python variant
|
|
20
|
+
ALL_PYTHON += ["3.14t", "3.15t"] # add free-threaded Python variant
|
|
23
21
|
|
|
24
22
|
|
|
25
23
|
@nox.session(reuse_venv=True)
|
|
@@ -40,27 +38,32 @@ def pylint(session: nox.Session) -> None:
|
|
|
40
38
|
@nox.session(reuse_venv=True, python=ALL_PYTHON)
|
|
41
39
|
def lite(session: nox.Session) -> None:
|
|
42
40
|
"""Run lightweight tests."""
|
|
41
|
+
is_free_threaded = isinstance(session.python, str) and session.python.endswith("t")
|
|
42
|
+
run_env = {"PYTHON_GIL": "0"} if is_free_threaded else {}
|
|
43
43
|
test_deps = nox.project.dependency_groups(PYPROJECT, "test")
|
|
44
44
|
session.install("-e.", *test_deps)
|
|
45
|
-
session.run(
|
|
45
|
+
session.run(
|
|
46
|
+
"pytest",
|
|
47
|
+
"--ignore",
|
|
48
|
+
"tests/test_notebooks.py",
|
|
49
|
+
*session.posargs,
|
|
50
|
+
env=run_env,
|
|
51
|
+
)
|
|
46
52
|
|
|
47
53
|
|
|
48
54
|
@nox.session(reuse_venv=True, python=ALL_PYTHON)
|
|
49
55
|
def tests(session: nox.Session) -> None:
|
|
50
56
|
"""Run the unit and regular tests."""
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
)
|
|
54
|
-
os.environ["PYTHON_GIL"] = "0"
|
|
55
|
-
test_deps = nox.project.dependency_groups(PYPROJECT, "test-all-no-gil")
|
|
56
|
-
else:
|
|
57
|
-
test_deps = nox.project.dependency_groups(PYPROJECT, "test-all-gil")
|
|
57
|
+
is_free_threaded = isinstance(session.python, str) and session.python.endswith("t")
|
|
58
|
+
run_env = {"PYTHON_GIL": "0"} if is_free_threaded else {}
|
|
59
|
+
test_deps = nox.project.dependency_groups(PYPROJECT, "test-all")
|
|
58
60
|
session.install("-e.", *test_deps)
|
|
59
61
|
session.run(
|
|
60
62
|
"pytest",
|
|
61
63
|
"--ignore",
|
|
62
64
|
"tests/test_notebooks.py",
|
|
63
65
|
*session.posargs,
|
|
66
|
+
env=run_env,
|
|
64
67
|
)
|
|
65
68
|
|
|
66
69
|
|
|
@@ -74,7 +77,7 @@ def coverage(session: nox.Session) -> None:
|
|
|
74
77
|
@nox.session(reuse_venv=True, python=ALL_PYTHON)
|
|
75
78
|
def doctests(session: nox.Session) -> None:
|
|
76
79
|
"""Run the doctests."""
|
|
77
|
-
test_deps = nox.project.dependency_groups(PYPROJECT, "test-all
|
|
80
|
+
test_deps = nox.project.dependency_groups(PYPROJECT, "test-all")
|
|
78
81
|
session.install("-e.", *test_deps)
|
|
79
82
|
session.run("pytest", "--doctest-plus", "src/vector/", *session.posargs)
|
|
80
83
|
|
|
@@ -82,19 +85,30 @@ def doctests(session: nox.Session) -> None:
|
|
|
82
85
|
@nox.session(reuse_venv=True, default=False)
|
|
83
86
|
def notebooks(session: nox.Session) -> None:
|
|
84
87
|
"""Run the notebook tests"""
|
|
85
|
-
test_deps = nox.project.dependency_groups(
|
|
86
|
-
PYPROJECT, "test", "test-optional", "test-numba"
|
|
87
|
-
)
|
|
88
|
+
test_deps = nox.project.dependency_groups(PYPROJECT, "test", "test-optional")
|
|
88
89
|
session.install("-e.", *test_deps)
|
|
89
90
|
session.install("jupyter")
|
|
90
91
|
session.run("pytest", "tests/test_notebooks.py", *session.posargs)
|
|
91
92
|
|
|
92
93
|
|
|
94
|
+
# Not reuse_venv: the CuPy wheel is chosen by CUDA_VERSION, so a reused venv would
|
|
95
|
+
# keep the one installed for whichever version ran first.
|
|
96
|
+
@nox.session(python="3.13", default=False)
|
|
97
|
+
def gpu(session: nox.Session) -> None:
|
|
98
|
+
"""Run the GPU tests. CUDA_VERSION picks the CuPy wheel (CUDA major, default 13)."""
|
|
99
|
+
cuda_version = os.environ.get("CUDA_VERSION", "13")
|
|
100
|
+
test_deps = nox.project.dependency_groups(PYPROJECT, "test", "test-optional")
|
|
101
|
+
# The "ctk" extra brings the CUDA runtime with it; the bare wheel expects a
|
|
102
|
+
# toolkit to be installed already. The driver is the host's either way.
|
|
103
|
+
session.install("-e.", *test_deps, f"cupy-cuda{cuda_version}x[ctk]>=14")
|
|
104
|
+
session.run("pytest", "tests/cuda", *session.posargs)
|
|
105
|
+
|
|
106
|
+
|
|
93
107
|
@nox.session(reuse_venv=True, default=False)
|
|
94
108
|
def docs(session: nox.Session) -> None:
|
|
95
109
|
"""Build the docs. Pass "serve" to serve."""
|
|
96
110
|
doc_deps = nox.project.dependency_groups(PYPROJECT, "docs", "test")
|
|
97
|
-
session.install("-e.", doc_deps)
|
|
111
|
+
session.install("-e.", *doc_deps)
|
|
98
112
|
session.chdir("docs")
|
|
99
113
|
session.run("sphinx-build", "-M", "html", ".", "_build")
|
|
100
114
|
|