-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This patch fixes a couple of deprecations/dependency changes. * Resolved issues with numpy-2.0: replaced numpy.VisibleDeprecationWarning, upgraded pybind11 to 2.13.2 * Fixed issues with clang-format, which destroyed the jupyter notebooks * Updated CI scripts analog to iminuit * Dropped support for python-3.8 --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
87e8add
commit 997dfc6
Showing
18 changed files
with
159 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
docs/examples/* | ||
extern/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,24 +14,24 @@ jobs: | |
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
fetch-depth: 0 # needed for setuptools_scm | ||
# must come after checkout | ||
- uses: hendrikmuhs/[email protected] | ||
with: | ||
key: ${{ github.job }}-${{ matrix.os }}-${{ matrix.python-version }} | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.9" | ||
- run: sudo apt-get install pandoc | ||
- run: python -m pip install --prefer-binary -v .[doc] | ||
- run: python -m ipykernel install --user --name python3 | ||
- run: python docs/build.py | ||
- uses: actions/upload-pages-artifact@v1 | ||
with: | ||
path: 'docs/_build/html' | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
fetch-depth: 0 # needed for setuptools_scm | ||
# must come after checkout | ||
- uses: hendrikmuhs/[email protected] | ||
with: | ||
key: ${{ github.job }}-${{ matrix.os }}-${{ matrix.python-version }} | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
- run: sudo apt-get install pandoc | ||
- run: python -m pip install --prefer-binary -v .[doc] | ||
- run: python -m ipykernel install --user --name python3 | ||
- run: python docs/build.py | ||
- uses: actions/upload-pages-artifact@v1 | ||
with: | ||
path: "docs/_build/html" | ||
|
||
deploy: | ||
if: github.ref_type == 'tag' || github.ref_name == 'main' | ||
|
@@ -49,5 +49,5 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/configure-pages@v2 | ||
- uses: actions/deploy-pages@v1 | ||
- uses: actions/configure-pages@v2 | ||
- uses: actions/deploy-pages@v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,9 +3,9 @@ name: Test | |
on: | ||
pull_request: | ||
paths-ignore: | ||
- 'docs/**' | ||
- '*.rst' | ||
- '*.md' | ||
- "docs/**" | ||
- "*.rst" | ||
- "*.md" | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
|
@@ -22,27 +22,31 @@ jobs: | |
# version number must be string, otherwise 3.10 becomes 3.1 | ||
- os: windows-latest | ||
python-version: "3.11" | ||
- os: macos-13 | ||
python-version: "3.8" | ||
installs: "numpy>=2" | ||
- os: macos-14 | ||
python-version: "3.9" | ||
installs: "numpy==1.21.0" | ||
- os: ubuntu-latest | ||
python-version: "pypy-3.8" | ||
python-version: "3.13" | ||
installs: "'numpy>=2' scipy matplotlib" | ||
fail-fast: false | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
fetch-depth: 3 | ||
# must come after checkout | ||
- uses: hendrikmuhs/[email protected] | ||
with: | ||
key: ${{ github.job }}-${{ matrix.os }}-${{ matrix.python-version }} | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- run: python -m pip install --upgrade pip | ||
- run: python -m pip install --prefer-binary -v .[test] | ||
env: | ||
DEBUG: 1 | ||
- uses: ts-graphviz/setup-graphviz@v1 | ||
if: ${{ matrix.os != 'macos-13' }} | ||
- run: python -m pytest | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
fetch-depth: 3 | ||
# must come after checkout | ||
- uses: hendrikmuhs/[email protected] | ||
with: | ||
key: ${{ github.job }}-${{ matrix.os }}-${{ matrix.python-version }} | ||
- uses: astral-sh/setup-uv@v3 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
allow-prereleases: true | ||
- uses: ts-graphviz/setup-graphviz@v1 | ||
if: ${{ matrix.os != 'macos-13' }} | ||
- run: uv pip install --system .[test] ${{ matrix.installs }} | ||
env: | ||
DEBUG: 1 | ||
- run: python -m pytest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ name: Wheels | |
on: | ||
push: | ||
tags: | ||
- '**' | ||
- "**" | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
|
@@ -22,40 +22,33 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-13] | ||
arch: [auto, aarch64, universal2] | ||
py: [cp38, cp39, cp310, cp311, cp312] | ||
os: [ubuntu-latest, windows-latest, macos-13, macos-14] | ||
arch: [auto, aarch64] | ||
py: [cp39, cp310, cp311, cp312, cp313] | ||
exclude: | ||
- os: windows-latest | ||
arch: aarch64 | ||
- os: windows-latest | ||
arch: universal2 | ||
- os: macos-13 | ||
arch: aarch64 | ||
- os: ubuntu-latest | ||
arch: universal2 | ||
# some unrelated error with installing pillow | ||
- os: ubuntu-latest | ||
py: cp38 | ||
env: | ||
CIBW_BUILD: ${{ matrix.py }}-* | ||
CIBW_ARCHS_LINUX: ${{ matrix.arch }} | ||
- os: macos-14 | ||
arch: aarch64 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
fetch-depth: 0 # needed by setuptools_scm | ||
fetch-depth: 0 # needed by setuptools_scm | ||
|
||
- if: ${{ matrix.arch == 'aarch64' }} | ||
uses: docker/setup-qemu-action@v2 | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- uses: pypa/cibuildwheel@v2.16.5 | ||
- uses: pypa/cibuildwheel@v2.21 | ||
env: | ||
CIBW_BUILD: ${{ matrix.py }}-* | ||
CIBW_ARCHS: ${{ matrix.arch }} | ||
|
||
- uses: actions/upload-artifact@v3 | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: wheel-${{ matrix.py }}-${{ matrix.os }}-${{ matrix.arch }} | ||
path: ./wheelhouse/*.whl | ||
|
||
sdist: | ||
|
@@ -65,28 +58,39 @@ jobs: | |
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
fetch-depth: 0 # needed by setuptools_scm | ||
fetch-depth: 0 # needed by setuptools_scm | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.11' | ||
python-version: "3.11" | ||
|
||
- run: python -m pip install --upgrade pip setuptools wheel | ||
- run: python setup.py sdist | ||
- run: pipx run build --sdist | ||
- run: python -m pip install --upgrade pip setuptools | ||
- run: python -m pip install -v $(echo dist/*)'[test]' | ||
- run: python -m pytest | ||
|
||
- uses: actions/upload-artifact@v3 | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: sdist | ||
path: dist/*.tar.gz | ||
|
||
upload: | ||
if: github.event_name == 'push' && contains(github.event.ref, '/tags/') | ||
needs: [wheels, sdist] | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'push' && contains(github.event.ref, '/tags/') | ||
|
||
environment: | ||
name: pypi | ||
url: https://pypi.org/project/pyhepmc/ | ||
|
||
permissions: | ||
id-token: write | ||
attestations: write | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
pattern: "*" | ||
name: artifact | ||
path: dist | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,12 +10,9 @@ build-backend = "setuptools.build_meta" | |
[project] | ||
name = "pyhepmc" | ||
description = "Pythonic interface to the HepMC3 C++ library licensed under LGPL-v3." | ||
maintainers = [ | ||
{ name = "Hans Dembinski" }, | ||
{ email = "[email protected]" }, | ||
] | ||
maintainers = [{ name = "Hans Dembinski", email = "[email protected]" }] | ||
readme = "README.rst" | ||
requires-python = ">=3.8" | ||
requires-python = ">=3.9" | ||
license = { text = "BSD 3-Clause License" } | ||
classifiers = [ | ||
"Development Status :: 5 - Production/Stable", | ||
|
@@ -27,7 +24,7 @@ classifiers = [ | |
"Topic :: Scientific/Engineering", | ||
"Intended Audience :: Developers", | ||
] | ||
dependencies = ["numpy"] | ||
dependencies = ["numpy>=1.21", "packaging"] | ||
dynamic = ["version"] | ||
|
||
[project.urls] | ||
|
@@ -54,8 +51,9 @@ testpaths = ["tests"] | |
log_cli_level = "INFO" | ||
xfail_strict = true | ||
filterwarnings = [ | ||
"error::PendingDeprecationWarning", | ||
"error::DeprecationWarning", | ||
"error::numpy.VisibleDeprecationWarning", | ||
"error::FutureWarning", | ||
] | ||
|
||
[tool.coverage.run] | ||
|
@@ -66,10 +64,10 @@ source = ["pyhepmc"] | |
exclude_lines = ["pragma: no cover"] | ||
|
||
[tool.ruff] | ||
src = ["src"] | ||
exclude = ["docs/examples/*"] | ||
|
||
[tool.ruff.lint] | ||
select = [ | ||
extend-select = [ | ||
"E", | ||
"F", # flake8 | ||
"D", # pydocstyle | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.