From d7705a9c39f0ef4c8bd07483427f3a21da93c2d6 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Mon, 7 Oct 2024 02:10:59 -0400 Subject: [PATCH] ci: 3.13 and some touchup Signed-off-by: Henry Schreiner --- .github/workflows/cd.yml | 46 ++++++++++++++++++++++++++++++++++++++++ .github/workflows/ci.yml | 44 ++++++-------------------------------- pyproject.toml | 17 ++++++++++----- 3 files changed, 65 insertions(+), 42 deletions(-) create mode 100644 .github/workflows/cd.yml diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml new file mode 100644 index 0000000..cdca500 --- /dev/null +++ b/.github/workflows/cd.yml @@ -0,0 +1,46 @@ +name: CI + +on: + workflow_dispatch: + release: + types: + - published + +concurrency: + group: ${ github.workflow }-${ github.ref } + cancel-in-progress: true + +jobs: + dist: + name: Distribution build + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - uses: hynek/build-and-inspect-python-package@v2 + + + publish: + name: Publish + environment: pypi + permissions: + id-token: write + attestations: write + needs: [dist] + if: github.event_name == 'release' && github.event.action == 'published' + runs-on: ubuntu-latest + + steps: + - uses: actions/download-artifact@v4 + with: + path: dist + name: Packages + + - name: Generate artifact attestation for sdist and wheel + uses: actions/attest-build-provenance@v1 + with: + subject-path: "dist/uproot_browser-*" + + - uses: pypa/gh-action-pypi-publish@release/v1 + with: + attestations: true diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3e2f401..55ad3de 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,18 +35,21 @@ jobs: matrix: python-version: ["3.8", "3.11"] runs-on: [ubuntu-latest, macos-13, windows-latest] - include: + - python-version: "3.13" + runs-on: ubuntu-latest + - python-version: "3.13" + runs-on: macos-latest - python-version: pypy-3.10 runs-on: ubuntu-latest - steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + allow-prereleases: true - uses: astral-sh/setup-uv@v3 @@ -57,48 +60,15 @@ jobs: run: nox -s tests - name: Test minimum versions - if: matrix.python-version != 'pypy-3.10' + if: matrix.python-version != 'pypy-3.10' || matrix.python-version != '3.13' run: nox -s minimums pass: if: always() - needs: [checks] + needs: [pre-commit, checks] runs-on: ubuntu-latest steps: - name: Decide whether the needed jobs succeeded or failed uses: re-actors/alls-green@release/v1 with: jobs: ${{ toJSON(needs) }} - - dist: - name: Distribution build - runs-on: ubuntu-latest - needs: [pre-commit] - - steps: - - uses: actions/checkout@v4 - - uses: hynek/build-and-inspect-python-package@v2 - - - publish: - name: Publish - environment: pypi - permissions: - id-token: write - attestations: write - needs: [dist] - if: github.event_name == 'release' && github.event.action == 'published' - runs-on: ubuntu-latest - - steps: - - uses: actions/download-artifact@v4 - with: - path: dist - name: Packages - - - name: Generate artifact attestation for sdist and wheel - uses: actions/attest-build-provenance@v1 - with: - subject-path: "dist/uproot_browser-*" - - - uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/pyproject.toml b/pyproject.toml index 6bcf368..1299cd1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,6 +31,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Development Status :: 4 - Beta", "Typing :: Typed", ] @@ -53,8 +54,8 @@ dependencies = [ [project.optional-dependencies] test = [ "pytest >=8", - "pytest-asyncio >=0.22", - "scikit-hep-testdata>=0.4.10", + "pytest-asyncio >=0.24", + "scikit-hep-testdata >=0.4.10", ] iterm = [ "matplotlib", @@ -79,6 +80,14 @@ uproot-browser = "uproot_browser.__main__:main" version.source = "vcs" build.hooks.vcs.version-file = "src/uproot_browser/_version.py" +[tool.uv] +environments = [ + "python_version >= '3.10'", +] +dev-dependencies = [ + "uproot-browser[test]", +] + [tool.pytest.ini_options] minversion = "6.0" addopts = ["-ra", "--showlocals", "--strict-markers", "--strict-config"] @@ -92,6 +101,7 @@ filterwarnings = [ log_cli_level = "info" testpaths = ["tests"] asyncio_mode = "auto" +asyncio_default_fixture_loop_scope = "function" [tool.mypy] @@ -99,7 +109,6 @@ files = "src" python_version = "3.8" warn_unused_configs = true strict = true -show_error_codes = true [[tool.mypy.overrides]] module = ["plotext.*", "awkward.*", "uproot.*", "matplotlib.*"] @@ -127,8 +136,6 @@ messages_control.disable = [ "wrong-import-position", # Handled by Ruff ] -[tool.ruff] -src = ["src"] [tool.ruff.lint] extend-select = [