diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml index 759312d956..7fcddc97d6 100644 --- a/.github/workflows/wheel.yml +++ b/.github/workflows/wheel.yml @@ -9,7 +9,7 @@ name: Wheel permissions: contents: read - id-token: write + pull-requests: write on: push: @@ -143,6 +143,9 @@ jobs: steps: - name: Checkout repo uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 +# with: +# ref: ${{ github.event.pull_request.head.ref }} +# repository: ${{ github.event.pull_request.head.repo.full_name }} - name: Install Python uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 @@ -167,7 +170,28 @@ jobs: ./wheelhouse/*.whl ./wheelhouse/OpenImageIO/__init__.pyi # if stub validation fails we want to upload the stubs for users to review - if: success() || failure() +# if: success() || failure() + + - name: Copy stubs to repo + run: | + pwd + if [ -f ./wheelhouse/OpenImageIO/__init__.pyi ]; then + echo "Copying stubs into repo" + cp ./wheelhouse/OpenImageIO/__init__.pyi ./src/python/stubs/OpenImageIO/__init__.pyi + git diff + fi +# if: failure() + +# - name: Commit changed stubs back to the repository +# uses: stefanzweifel/git-auto-commit-action@v6 +# with: +# commit_message: "Automatic update to python stubs" +# # if: failure() + + - uses: parkerbxyz/suggest-changes@v2.0.1 + with: + comment: 'Please commit the suggested changes from the python stub generator.' + event: 'REQUEST_CHANGES' # --------------------------------------------------------------------------- # Linux ARM Wheels diff --git a/src/python/stubs/generate_stubs.py b/src/python/stubs/generate_stubs.py index 37826c1b52..62fd2a8369 100644 --- a/src/python/stubs/generate_stubs.py +++ b/src/python/stubs/generate_stubs.py @@ -30,8 +30,8 @@ class OIIOSignatureGenerator(AdvancedSignatureGenerator): sig_matcher = AdvancedSigMatcher( signature_overrides={ # signatures for these special methods include many inaccurate overloads - "*.__ne__": "(self, other: object) -> bool", - "*.__eq__": "(self, other: object) -> bool", + # "*.__ne__": "(self, other: object) -> bool", + # "*.__eq__": "(self, other: object) -> bool", }, arg_type_overrides={ # FIXME: Buffer may in fact be more accurate here @@ -209,7 +209,7 @@ def main() -> None: print(get_colored_diff(old_text, new_text)) print("Run `make pystubs` locally and commit the results for review.") print("The resulting __init__.pyi file will be uploaded as an artifact on this job.") - sys.exit(2) + # sys.exit(2) if __name__ == "__main__":