Skip to content

Commit df2cd16

Browse files
authored
Merge branch 'main' into feat-add-copy-ttree
2 parents 6da95a6 + e727daa commit df2cd16

31 files changed

+1138
-213
lines changed

.all-contributorsrc

+27
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,33 @@
533533
"contributions": [
534534
"test"
535535
]
536+
},
537+
{
538+
"login": "YSelfTool",
539+
"name": "Robin Sonnabend",
540+
"avatar_url": "https://avatars.githubusercontent.com/u/1640386?v=4",
541+
"profile": "http://tooldev.de",
542+
"contributions": [
543+
"code"
544+
]
545+
},
546+
{
547+
"login": "bojohnson5",
548+
"name": "Bo Johnson",
549+
"avatar_url": "https://avatars.githubusercontent.com/u/20647190?v=4",
550+
"profile": "https://github.com/bojohnson5",
551+
"contributions": [
552+
"code"
553+
]
554+
},
555+
{
556+
"login": "milesgranger",
557+
"name": "Miles",
558+
"avatar_url": "https://avatars.githubusercontent.com/u/13764397?v=4",
559+
"profile": "https://github.com/milesgranger",
560+
"contributions": [
561+
"code"
562+
]
536563
}
537564
],
538565
"contributorsPerLine": 7,

.github/dependabot.yml

+4
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,7 @@ updates:
55
directory: /
66
schedule:
77
interval: weekly
8+
groups:
9+
actions:
10+
patterns:
11+
- '*'
+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Build sdist and wheel
2+
3+
on:
4+
# Run on demand with workflow dispatch
5+
workflow_dispatch:
6+
# Use from other workflows
7+
workflow_call:
8+
9+
jobs:
10+
dist:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0
16+
17+
- name: Build sdist and wheel
18+
run: pipx run build
19+
20+
- name: Check metadata
21+
run: pipx run twine check --strict dist/*
22+
23+
- name: List contents of sdist
24+
run: python -m tarfile --list dist/uproot-*.tar.gz
25+
26+
- name: List contents of wheel
27+
run: python -m zipfile --list dist/uproot-*.whl
28+
29+
- uses: actions/upload-artifact@v4
30+
with:
31+
name: distribution-artifact
32+
path: dist/*

.github/workflows/deploy.yml

+13-16
Original file line numberDiff line numberDiff line change
@@ -6,34 +6,31 @@ on:
66
types:
77
- published
88

9-
jobs:
10-
dist:
11-
runs-on: ubuntu-latest
12-
steps:
13-
- uses: actions/checkout@v4
14-
15-
- name: Build wheel and SDist
16-
run: pipx run build
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
1712

18-
- name: Check metadata
19-
run: pipx run twine check dist/*
20-
21-
- uses: actions/upload-artifact@v4
22-
with:
23-
path: dist/*
13+
jobs:
2414

15+
build_dist:
16+
name: Build and upload sdist and wheel
17+
if: github.repository_owner == 'scikit-hep'
18+
uses: ./.github/workflows/build-distributions.yml
2519

2620
publish:
27-
needs: [dist]
21+
needs: [build_dist]
2822
runs-on: ubuntu-latest
2923
if: github.event_name == 'release' && github.event.action == 'published'
3024

3125
steps:
3226
- uses: actions/download-artifact@v4
3327
with:
34-
name: artifact
28+
name: distribution-artifact
3529
path: dist
3630

31+
- name: List distributions to be deployed
32+
run: ls -lha dist/
33+
3734
- uses: pypa/gh-action-pypi-publish@release/v1
3835
with:
3936
password: ${{ secrets.pypi_password }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Upload nightly wheels to Anaconda Cloud
2+
3+
on:
4+
# Run daily at 1:23 UTC
5+
schedule:
6+
- cron: 23 1 * * *
7+
# Run on demand with workflow dispatch
8+
workflow_dispatch:
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
16+
build_wheel:
17+
name: Build and upload wheel
18+
if: github.repository_owner == 'scikit-hep'
19+
uses: ./.github/workflows/build-distributions.yml
20+
21+
upload_nightly_wheels:
22+
name: Upload nightly wheels to Anaconda Cloud
23+
needs: [build_wheel]
24+
runs-on: ubuntu-latest
25+
26+
steps:
27+
- uses: actions/download-artifact@v4
28+
with:
29+
name: distribution-artifact
30+
path: dist
31+
32+
- name: List wheel to be deployed
33+
run: ls -lha dist/*.whl
34+
35+
- name: Upload wheel to Anaconda Cloud as nightly
36+
uses: scientific-python/upload-nightly-action@b67d7fcc0396e1128a474d1ab2b48aa94680f9fc # 0.5.0
37+
with:
38+
artifacts_path: dist
39+
anaconda_nightly_upload_token: ${{ secrets.ANACONDA_ORG_UPLOAD_TOKEN }}

.pre-commit-config.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,19 @@ repos:
1818
- id: trailing-whitespace
1919

2020
- repo: https://github.com/psf/black-pre-commit-mirror
21-
rev: 24.1.1
21+
rev: 24.2.0
2222
hooks:
2323
- id: black
2424

2525
- repo: https://github.com/astral-sh/ruff-pre-commit
26-
rev: v0.1.14
26+
rev: v0.2.2
2727
hooks:
2828
- id: ruff
2929
args: [--fix, --show-fixes]
3030

3131

3232
- repo: https://github.com/asottile/pyupgrade
33-
rev: v3.15.0
33+
rev: v3.15.1
3434
hooks:
3535
- id: pyupgrade
3636
args: [--py38-plus]

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,9 @@ Thanks especially to the gracious help of Uproot contributors (including the [or
183183
</tr>
184184
<tr>
185185
<td align="center" valign="top" width="14.28%"><a href="https://github.com/bnavigator"><img src="https://avatars.githubusercontent.com/u/4623504?v=4?s=100" width="100px;" alt="Ben Greiner"/><br /><sub><b>Ben Greiner</b></sub></a><br /><a href="https://github.com/scikit-hep/uproot5/commits?author=bnavigator" title="Tests">⚠️</a></td>
186+
<td align="center" valign="top" width="14.28%"><a href="http://tooldev.de"><img src="https://avatars.githubusercontent.com/u/1640386?v=4?s=100" width="100px;" alt="Robin Sonnabend"/><br /><sub><b>Robin Sonnabend</b></sub></a><br /><a href="https://github.com/scikit-hep/uproot5/commits?author=YSelfTool" title="Code">💻</a></td>
187+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/bojohnson5"><img src="https://avatars.githubusercontent.com/u/20647190?v=4?s=100" width="100px;" alt="Bo Johnson"/><br /><sub><b>Bo Johnson</b></sub></a><br /><a href="https://github.com/scikit-hep/uproot5/commits?author=bojohnson5" title="Code">💻</a></td>
188+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/milesgranger"><img src="https://avatars.githubusercontent.com/u/13764397?v=4?s=100" width="100px;" alt="Miles"/><br /><sub><b>Miles</b></sub></a><br /><a href="https://github.com/scikit-hep/uproot5/commits?author=milesgranger" title="Code">💻</a></td>
186189
</tr>
187190
</tbody>
188191
</table>

docs-sphinx/prepare_docstrings.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def ensure(filename, content):
107107

108108
def handle_module(modulename, module):
109109
if any(x.startswith("_") for x in modulename.split(".")) and not any(
110-
x == "_dask" for x in modulename.split(".")
110+
x == "_dask" or x == "_dask_write" for x in modulename.split(".")
111111
):
112112
return
113113

@@ -125,7 +125,8 @@ def handle_module(modulename, module):
125125
toctree2.write(" " + modulename + " (module) <" + modulename + ">\n")
126126

127127
if modulename != "uproot" and all(
128-
not x.startswith("_") or x == "_dask" for x in modulename.split(".")
128+
not x.startswith("_") or x == "_dask" or x == "_dask_write"
129+
for x in modulename.split(".")
129130
):
130131

131132
def good(obj):

pyproject.toml

+15-12
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ requires = [
55
"hatch-vcs"
66
]
77

8+
[lint.mccabe]
9+
max-complexity = 100
10+
811
[project]
912
authors = [
1013
{name = "Jim Pivarski", email = "pivarski@princeton.edu"}
@@ -35,7 +38,7 @@ classifiers = [
3538
]
3639
dependencies = [
3740
"awkward>=2.4.6",
38-
"importlib-metadata;python_version<\"3.8\"",
41+
"cramjam>=2.5.0",
3942
"numpy",
4043
"fsspec",
4144
"packaging",
@@ -59,10 +62,12 @@ dev = [
5962
"pandas",
6063
"awkward-pandas"
6164
]
65+
http = ["aiohttp"]
66+
s3 = ["s3fs"]
6267
test = [
63-
"lz4",
68+
"isal",
69+
"deflate",
6470
"xxhash",
65-
"zstandard",
6671
"minio",
6772
"aiohttp",
6873
"fsspec-xrootd",
@@ -75,6 +80,7 @@ test = [
7580
"scikit-hep-testdata",
7681
"rangehttpserver"
7782
]
83+
xrootd = ["fsspec-xrootd"]
7884

7985
[project.urls]
8086
Download = "https://github.com/scikit-hep/uproot5/releases"
@@ -114,6 +120,9 @@ exclude = [
114120
"src/uproot/__init__.py",
115121
"docs-sphinx/*.py"
116122
]
123+
src = ["src"]
124+
125+
[tool.ruff.lint]
117126
ignore = [
118127
"E501",
119128
"E722",
@@ -122,7 +131,7 @@ ignore = [
122131
"SIM118", # key in dict, broken since uproot doesn't behave like a dict
123132
"PGH003", # too-broad type ignore
124133
"SIM114", # combine `if` branches using logical `or` operator
125-
"PGH001", # no eval allowed
134+
"S307", # no eval allowed
126135
"PLC1901", # empty string is falsey (but I don't want to rely on such weak typing)
127136
"RUF012" # enforces type annotations on a codebase that lacks type annotations
128137
]
@@ -146,16 +155,10 @@ select = [
146155
"UP", # pyupgrade
147156
"YTT" # flake8-2020
148157
]
149-
src = ["src"]
150-
151-
[tool.ruff.lint]
152158
isort.required-imports = ["from __future__ import annotations"]
153159

154-
[tool.ruff.mccabe]
155-
max-complexity = 100
156-
157-
[tool.ruff.per-file-ignores]
158-
"dev/*" = ["T20"]
160+
[tool.ruff.lint.per-file-ignores]
161+
"dev/*" = ["T20", "T201"]
159162
"src/uproot/*/file.py" = ["SIM115"]
160163

161164
[tool.setuptools_scm]

0 commit comments

Comments
 (0)