From eb7c5d2924004285ef896331b1d247e4437ac055 Mon Sep 17 00:00:00 2001 From: Shivtej Gaikwad Date: Thu, 5 Nov 2026 11:23:15 +0530 Subject: [PATCH 1/2] ci: add clean-env-from-lock input for repos with unpublished git dependencies The clean-env install step resolves from PyPI, which fails while engg-math packages are only available as git sources. With the input set, the locked runtime set is installed first. The audit job already supports skipping packages through export-args. --- .github/workflows/python-ci.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/python-ci.yml b/.github/workflows/python-ci.yml index 2a8251a..7b116b8 100644 --- a/.github/workflows/python-ci.yml +++ b/.github/workflows/python-ci.yml @@ -25,6 +25,12 @@ on: description: Args for `uv export` in the audit job. type: string default: "" + clean-env-from-lock: + description: >- + Install the locked runtime set (`uv export`) into the clean env before the wheel. For repos + whose engg-math dependencies are git sources because they are not yet on PyPI; drop once published. + type: boolean + default: false forbid-ai-attribution: description: Fail PRs whose commits or body carry AI attribution. type: boolean @@ -137,6 +143,10 @@ jobs: - name: Wheels install and import in a clean env run: | uv venv --python 3.11 /tmp/clean-env + if [ "${{ inputs.clean-env-from-lock }}" = "true" ]; then + uv export --locked --no-dev --no-hashes --no-emit-project ${{ inputs.export-args }} -o /tmp/clean-reqs.txt + uv pip install --python /tmp/clean-env/bin/python -r /tmp/clean-reqs.txt + fi uv pip install --python /tmp/clean-env/bin/python dist/*.whl /tmp/clean-env/bin/python -c "import importlib.metadata as m, sys; sys.exit(0 if any((d.metadata['Name'] or '').startswith('engg-math-') for d in m.distributions()) else 1)" From bcb6b37055d61927c559a3247c9ee5be01da91fd Mon Sep 17 00:00:00 2001 From: Shivtej Gaikwad Date: Thu, 5 Nov 2026 11:23:34 +0530 Subject: [PATCH 2/2] ci: do not apply audit export-args to the clean-env export export-args omits git-sourced packages for pip-audit; the clean env needs them. --- .github/workflows/python-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-ci.yml b/.github/workflows/python-ci.yml index 7b116b8..c796c77 100644 --- a/.github/workflows/python-ci.yml +++ b/.github/workflows/python-ci.yml @@ -144,7 +144,7 @@ jobs: run: | uv venv --python 3.11 /tmp/clean-env if [ "${{ inputs.clean-env-from-lock }}" = "true" ]; then - uv export --locked --no-dev --no-hashes --no-emit-project ${{ inputs.export-args }} -o /tmp/clean-reqs.txt + uv export --locked --no-dev --no-hashes --no-emit-project -o /tmp/clean-reqs.txt uv pip install --python /tmp/clean-env/bin/python -r /tmp/clean-reqs.txt fi uv pip install --python /tmp/clean-env/bin/python dist/*.whl