File tree Expand file tree Collapse file tree 3 files changed +16
-3
lines changed Expand file tree Collapse file tree 3 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -163,7 +163,11 @@ jobs:
163
163
- uses : actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
164
164
with :
165
165
name : cibw-wheels-${{ matrix.python }}-${{ matrix.manylinux }}
166
- path : ./wheelhouse/*.whl
166
+ path : |
167
+ ./wheelhouse/*.whl
168
+ ./wheelhouse/OpenImageIO/__init__.pyi
169
+ # if stub validation fails we want to upload the stubs for users to review
170
+ if : success() || failure()
167
171
168
172
# ---------------------------------------------------------------------------
169
173
# Linux ARM Wheels
@@ -225,7 +229,11 @@ jobs:
225
229
- uses : actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
226
230
with :
227
231
name : cibw-wheels-${{ matrix.python }}-${{ matrix.manylinux }}
228
- path : ./wheelhouse/*.whl
232
+ path : |
233
+ ./wheelhouse/*.whl
234
+ ./wheelhouse/OpenImageIO/__init__.pyi
235
+ # if stub validation fails we want to upload the stubs for users to review
236
+ if : success() || failure()
229
237
230
238
# ---------------------------------------------------------------------------
231
239
# macOS Wheels
Original file line number Diff line number Diff line change @@ -398,7 +398,7 @@ for more information on customizing and overriding build-tool options and CMake
398
398
This repo contains python type stubs which are generated from ` pybind11 ` signatures.
399
399
The workflow for releasing new stubs is as follows:
400
400
401
- - Install [ ` uv ` ] ( https://docs.astral.sh/uv/getting-started/installation/ )
401
+ - Install [ ` uv ` ] ( https://docs.astral.sh/uv/getting-started/installation/ ) and ` docker `
402
402
- Run ` make pystubs ` locally to generate updated stubs in ` src/python/stubs/__init__.pyi `
403
403
- Run ` make test-pystubs ` locally to use mypy to test the stubs against the code in
404
404
the python testsuite.
@@ -411,6 +411,10 @@ The workflow for releasing new stubs is as follows:
411
411
the stubs, so that changes can be reviewed and the rules in ` generate_stubs.py `
412
412
can be updated, if necessary.
413
413
414
+ Note that if you can't (or don't want to) build the stubs locally, you can
415
+ download an artifact containing the wheel and ` __init__.pyi ` file from any job
416
+ that fails the stub validation.
417
+
414
418
Test Images
415
419
-----------
416
420
Original file line number Diff line number Diff line change @@ -208,6 +208,7 @@ def main() -> None:
208
208
print ("Changes to the source code have resulted in a change to the stubs." )
209
209
print (get_colored_diff (old_text , new_text ))
210
210
print ("Run `make pystubs` locally and commit the results for review." )
211
+ print ("The resulting __init__.pyi file will be uploaded as an artifact on this job." )
211
212
sys .exit (2 )
212
213
213
214
You can’t perform that action at this time.
0 commit comments