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..9433593 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", ] @@ -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 = [