Skip to content

Commit c0598c9

Browse files
authored
ci: 3.13 and some touchup (#176)
Signed-off-by: Henry Schreiner <[email protected]>
1 parent c980d61 commit c0598c9

File tree

3 files changed

+65
-42
lines changed

3 files changed

+65
-42
lines changed

.github/workflows/cd.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: CI
2+
3+
on:
4+
workflow_dispatch:
5+
release:
6+
types:
7+
- published
8+
9+
concurrency:
10+
group: ${ github.workflow }-${ github.ref }
11+
cancel-in-progress: true
12+
13+
jobs:
14+
dist:
15+
name: Distribution build
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
- uses: hynek/build-and-inspect-python-package@v2
21+
22+
23+
publish:
24+
name: Publish
25+
environment: pypi
26+
permissions:
27+
id-token: write
28+
attestations: write
29+
needs: [dist]
30+
if: github.event_name == 'release' && github.event.action == 'published'
31+
runs-on: ubuntu-latest
32+
33+
steps:
34+
- uses: actions/download-artifact@v4
35+
with:
36+
path: dist
37+
name: Packages
38+
39+
- name: Generate artifact attestation for sdist and wheel
40+
uses: actions/attest-build-provenance@v1
41+
with:
42+
subject-path: "dist/uproot_browser-*"
43+
44+
- uses: pypa/gh-action-pypi-publish@release/v1
45+
with:
46+
attestations: true

.github/workflows/ci.yml

Lines changed: 7 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,21 @@ jobs:
3535
matrix:
3636
python-version: ["3.8", "3.11"]
3737
runs-on: [ubuntu-latest, macos-13, windows-latest]
38-
3938
include:
39+
- python-version: "3.13"
40+
runs-on: ubuntu-latest
41+
- python-version: "3.13"
42+
runs-on: macos-latest
4043
- python-version: pypy-3.10
4144
runs-on: ubuntu-latest
4245

43-
4446
steps:
4547
- uses: actions/checkout@v4
4648

4749
- uses: actions/setup-python@v5
4850
with:
4951
python-version: ${{ matrix.python-version }}
52+
allow-prereleases: true
5053

5154
- uses: astral-sh/setup-uv@v3
5255

@@ -57,48 +60,15 @@ jobs:
5760
run: nox -s tests
5861

5962
- name: Test minimum versions
60-
if: matrix.python-version != 'pypy-3.10'
63+
if: matrix.python-version != 'pypy-3.10' && matrix.python-version != '3.13'
6164
run: nox -s minimums
6265

6366
pass:
6467
if: always()
65-
needs: [checks]
68+
needs: [pre-commit, checks]
6669
runs-on: ubuntu-latest
6770
steps:
6871
- name: Decide whether the needed jobs succeeded or failed
6972
uses: re-actors/alls-green@release/v1
7073
with:
7174
jobs: ${{ toJSON(needs) }}
72-
73-
dist:
74-
name: Distribution build
75-
runs-on: ubuntu-latest
76-
needs: [pre-commit]
77-
78-
steps:
79-
- uses: actions/checkout@v4
80-
- uses: hynek/build-and-inspect-python-package@v2
81-
82-
83-
publish:
84-
name: Publish
85-
environment: pypi
86-
permissions:
87-
id-token: write
88-
attestations: write
89-
needs: [dist]
90-
if: github.event_name == 'release' && github.event.action == 'published'
91-
runs-on: ubuntu-latest
92-
93-
steps:
94-
- uses: actions/download-artifact@v4
95-
with:
96-
path: dist
97-
name: Packages
98-
99-
- name: Generate artifact attestation for sdist and wheel
100-
uses: actions/attest-build-provenance@v1
101-
with:
102-
subject-path: "dist/uproot_browser-*"
103-
104-
- uses: pypa/gh-action-pypi-publish@release/v1

pyproject.toml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ classifiers = [
3131
"Programming Language :: Python :: 3.10",
3232
"Programming Language :: Python :: 3.11",
3333
"Programming Language :: Python :: 3.12",
34+
"Programming Language :: Python :: 3.13",
3435
"Development Status :: 4 - Beta",
3536
"Typing :: Typed",
3637
]
@@ -53,8 +54,8 @@ dependencies = [
5354
[project.optional-dependencies]
5455
test = [
5556
"pytest >=8",
56-
"pytest-asyncio >=0.22",
57-
"scikit-hep-testdata>=0.4.10",
57+
"pytest-asyncio >=0.24",
58+
"scikit-hep-testdata >=0.4.10",
5859
]
5960
iterm = [
6061
"matplotlib",
@@ -79,6 +80,14 @@ uproot-browser = "uproot_browser.__main__:main"
7980
version.source = "vcs"
8081
build.hooks.vcs.version-file = "src/uproot_browser/_version.py"
8182

83+
[tool.uv]
84+
environments = [
85+
"python_version >= '3.10'",
86+
]
87+
dev-dependencies = [
88+
"uproot-browser[test]",
89+
]
90+
8291
[tool.pytest.ini_options]
8392
minversion = "6.0"
8493
addopts = ["-ra", "--showlocals", "--strict-markers", "--strict-config"]
@@ -92,14 +101,14 @@ filterwarnings = [
92101
log_cli_level = "info"
93102
testpaths = ["tests"]
94103
asyncio_mode = "auto"
104+
asyncio_default_fixture_loop_scope = "function"
95105

96106

97107
[tool.mypy]
98108
files = "src"
99109
python_version = "3.8"
100110
warn_unused_configs = true
101111
strict = true
102-
show_error_codes = true
103112

104113
[[tool.mypy.overrides]]
105114
module = ["plotext.*", "awkward.*", "uproot.*", "matplotlib.*"]
@@ -127,8 +136,6 @@ messages_control.disable = [
127136
"wrong-import-position", # Handled by Ruff
128137
]
129138

130-
[tool.ruff]
131-
src = ["src"]
132139

133140
[tool.ruff.lint]
134141
extend-select = [

0 commit comments

Comments
 (0)