Repository navigation
fix(uv): allow prereleases so OVOS alpha floor-pins resolve #62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 11 commits
31a12e9
308c061
f2ebb84
5f9089e
4807c9b
9213aeb
f35c937
f6b9c54
63a603a
4a1dbd5
0eb1701
960b6c7
d0450af
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,94 @@ | ||
| # TEMPORARY β validation harness for the pip->uv migration (PR #60). | ||
| # Delete this file (plus the root pyproject.toml and selftest_pkg/) before | ||
| # merging to dev. It is not a reusable workflow and has no downstream consumers. | ||
| # | ||
| # It drives the REAL reusable workflows via local `uses:` against the in-repo | ||
| # dummy package (root pyproject.toml + selftest_pkg/), so the actual build / | ||
| # install / coverage / audit / type-check plumbing runs under uv on real | ||
| # runners β not just isolated uv commands. | ||
| # | ||
| # Why the fix under test matters: actions/setup-python gives a bare interpreter | ||
| # with no active virtualenv, and `uv pip install` refuses a non-venv install | ||
| # unless UV_SYSTEM_PYTHON=1 / --system is set. Every uv workflow now declares | ||
| # that env at workflow level; these jobs prove it works end to end. | ||
| # | ||
| # Triggered on push to this branch only, with pr_comment:false everywhere, so | ||
| # nothing is posted to PR #60. | ||
| name: "[selftest] uv migration" | ||
|
|
||
| on: | ||
| push: | ||
| branches: [migrate-to-uv] | ||
| workflow_dispatch: | ||
|
|
||
| # Must cover the union of permissions the called reusable workflows declare, | ||
| # or GitHub rejects the call at compile time (startup failure) β even though | ||
| # the features needing them are disabled here (pr_comment/deploy_pages/sarif). | ||
| permissions: | ||
| contents: write # coverage.yml job declares contents: write (deploy_pages) | ||
| pull-requests: write # PR-comment jobs | ||
| security-events: write # pip-audit.yml SARIF upload | ||
|
|
||
| jobs: | ||
| # Build sdist+wheel under `uv build`, install the wheel with extras under | ||
| # `uv pip install`, run pytest β across every supported Python. | ||
| build-tests: | ||
| uses: ./.github/workflows/build-tests.yml | ||
| with: | ||
| python_versions: '["3.10", "3.11", "3.12", "3.13", "3.14"]' | ||
| install_extras: test | ||
| test_path: selftest_pkg/tests | ||
| pr_comment: false | ||
|
|
||
| # Editable install with extras under `uv pip install -e .[dev]` + pytest-cov. | ||
| coverage: | ||
| uses: ./.github/workflows/coverage.yml | ||
| with: | ||
| test_extras: dev | ||
| test_path: selftest_pkg/tests | ||
| coverage_source: selftest_pkg | ||
| pr_comment: false | ||
|
|
||
| # Editable install under uv, then mypy against the dummy package. | ||
| type-check: | ||
| uses: ./.github/workflows/type-check.yml | ||
| with: | ||
| test_extras: dev | ||
| mypy_args: selftest_pkg | ||
| pr_comment: false | ||
|
|
||
| # `uv pip install ".[test]"` then `uv pip freeze` -> pip-licenses. | ||
| license-check: | ||
| uses: ./.github/workflows/license-check.yml | ||
| with: | ||
| install_extras: "[test]" | ||
| warn_only: true | ||
| pr_comment: false | ||
|
|
||
| # `uv pip install ".[test]"` then pip-audit over the resolved deps. | ||
| pip-audit: | ||
| uses: ./.github/workflows/pip-audit.yml | ||
| with: | ||
| install_extras: "[test]" | ||
| warn_only: true | ||
| pr_comment: false | ||
|
|
||
| # Static guard: every workflow that runs `uv pip` MUST also declare | ||
| # UV_SYSTEM_PYTHON, or it will fail at runtime on the setup-python interpreter. | ||
| env-coverage: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| - name: Assert uv workflows declare UV_SYSTEM_PYTHON | ||
| run: | | ||
| set -euo pipefail | ||
| missing=0 | ||
| for f in .github/workflows/*.yml; do | ||
| [ "$(basename "$f")" = "_selftest-uv.yml" ] && continue | ||
| if grep -qE 'uv pip (install|freeze)' "$f" && ! grep -q 'UV_SYSTEM_PYTHON' "$f"; then | ||
| echo "::error file=$f::uses 'uv pip' but does not declare UV_SYSTEM_PYTHON" | ||
| missing=1 | ||
| fi | ||
| done | ||
| [ "$missing" -eq 0 ] && echo "All uv workflows declare UV_SYSTEM_PYTHON." | ||
| exit "$missing" | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -47,6 +47,16 @@ on: | |||||||||||||||||||||||||||||||||
| description: > | ||||||||||||||||||||||||||||||||||
| Post a 'π¨ Build Tests' section in the OVOS PR Checks comment. | ||||||||||||||||||||||||||||||||||
| Only runs on pull_request events. | ||||||||||||||||||||||||||||||||||
| # uv installs into the setup-python interpreter (no venv on the runner) | ||||||||||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||||||||||
| UV_SYSTEM_PYTHON: "1" | ||||||||||||||||||||||||||||||||||
| # The OVOS ecosystem ships pre-1.0 alphas and relies on prerelease floor-pins | ||||||||||||||||||||||||||||||||||
| # (pkg>=X.Ya1). pip honoured those transitively; uv's default mode does not when | ||||||||||||||||||||||||||||||||||
| # a package also has stable releases (e.g. ovos-PHAL's ovos-phal-plugin-ipgeo | ||||||||||||||||||||||||||||||||||
| # >=0.1.9a1, which has a coexisting stable 0.1.7). Allow prereleases so the | ||||||||||||||||||||||||||||||||||
| # floor-pins resolve as they did under pip β version caps still bound them. | ||||||||||||||||||||||||||||||||||
| UV_PRERELEASE: "allow" | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||||||||
| build_tests: | ||||||||||||||||||||||||||||||||||
| strategy: | ||||||||||||||||||||||||||||||||||
|
|
@@ -63,6 +73,9 @@ jobs: | |||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||
| python-version: ${{ matrix.python-version }} | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| - name: Install uv | ||||||||||||||||||||||||||||||||||
| run: pip install uv | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| - name: Checkout gh-automations scripts | ||||||||||||||||||||||||||||||||||
| uses: actions/checkout@v6 | ||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||
|
|
@@ -76,20 +89,18 @@ jobs: | |||||||||||||||||||||||||||||||||
| sudo apt-get install -yq python3-dev libssl-dev ${{ inputs.system_deps }} | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| - name: Install Build Tools | ||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||
| python -m pip install --upgrade pip | ||||||||||||||||||||||||||||||||||
| python -m pip install build wheel | ||||||||||||||||||||||||||||||||||
| run: uv pip install build wheel | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| - name: Pre-install pip requirements | ||||||||||||||||||||||||||||||||||
| if: ${{ inputs.pre_install_pip != '' }} | ||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||
| # shellcheck disable=SC2086 | ||||||||||||||||||||||||||||||||||
| python -m pip install ${{ inputs.pre_install_pip }} | ||||||||||||||||||||||||||||||||||
| uv pip install ${{ inputs.pre_install_pip }} | ||||||||||||||||||||||||||||||||||
|
Comment on lines
101
to
+105
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. π Security & Privacy | π Major | β‘ Quick win Treat Line 98 expands a reusable-workflow input directly inside Proposed fix - name: Pre-install pip requirements
if: ${{ inputs.pre_install_pip != '' }}
+ env:
+ PRE_INSTALL_PIP: ${{ inputs.pre_install_pip }}
run: |
- # shellcheck disable=SC2086
- uv pip install ${{ inputs.pre_install_pip }}
+ python - <<'PY'
+ import os, shlex, subprocess
+ reqs = shlex.split(os.environ["PRE_INSTALL_PIP"])
+ subprocess.check_call(["uv", "pip", "install", *reqs])
+ PYπ Committable suggestion
Suggested change
π§° Toolsπͺ zizmor (1.26.1)[error] 98-98: code injection via template expansion (template-injection): may expand into attacker-controllable code (template-injection) π€ Prompt for AI AgentsSource: Linters/SAST tools |
||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| - name: Build Distribution Packages | ||||||||||||||||||||||||||||||||||
| id: build | ||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||
| python -m build | ||||||||||||||||||||||||||||||||||
| uv build | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| - name: Install Built Package | ||||||||||||||||||||||||||||||||||
| id: install | ||||||||||||||||||||||||||||||||||
|
|
@@ -98,19 +109,19 @@ jobs: | |||||||||||||||||||||||||||||||||
| EXTRAS="${{ inputs.install_extras }}" | ||||||||||||||||||||||||||||||||||
| if [ -n "$WHEEL" ]; then | ||||||||||||||||||||||||||||||||||
| if [ -n "$EXTRAS" ]; then | ||||||||||||||||||||||||||||||||||
| pip install "${WHEEL}[${EXTRAS}]" | ||||||||||||||||||||||||||||||||||
| uv pip install "${WHEEL}[${EXTRAS}]" | ||||||||||||||||||||||||||||||||||
| else | ||||||||||||||||||||||||||||||||||
| pip install "$WHEEL" | ||||||||||||||||||||||||||||||||||
| uv pip install "$WHEEL" | ||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||
| else | ||||||||||||||||||||||||||||||||||
| pip install dist/*.tar.gz 2>/dev/null || { echo "No dist files found"; exit 1; } | ||||||||||||||||||||||||||||||||||
| uv pip install dist/*.tar.gz 2>/dev/null || { echo "No dist files found"; exit 1; } | ||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| - name: Run Tests | ||||||||||||||||||||||||||||||||||
| id: tests | ||||||||||||||||||||||||||||||||||
| if: ${{ inputs.test_path != '' }} | ||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||
| python -m pip install pytest | ||||||||||||||||||||||||||||||||||
| uv pip install pytest | ||||||||||||||||||||||||||||||||||
| python -m pytest ${{ inputs.test_path }} -v | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| - name: Save result | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -40,6 +40,11 @@ on: | |
| default: "gh-pages" | ||
| description: "Branch to push the HTML coverage report to." | ||
|
|
||
| # uv installs into the setup-python interpreter (no venv on the runner) | ||
| env: | ||
| UV_SYSTEM_PYTHON: "1" | ||
| UV_PRERELEASE: "allow" # OVOS ships pre-1.0 alphas; resolve prerelease floor-pins like pip did | ||
|
|
||
| jobs: | ||
| coverage_pages: | ||
| runs-on: ${{ inputs.runner }} | ||
|
|
@@ -55,6 +60,9 @@ jobs: | |
| with: | ||
| python-version: ${{ inputs.python_version }} | ||
|
|
||
| - name: Install uv | ||
| run: pip install uv | ||
|
|
||
| - name: Install System Dependencies | ||
| if: ${{ inputs.system_deps != '' }} | ||
| run: | | ||
|
|
@@ -63,17 +71,16 @@ jobs: | |
|
|
||
| - name: Install Dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| python -m pip install pytest pytest-cov coverage[toml] ovoscope | ||
| if python -m pip install -e ".[dev]" 2>/dev/null; then | ||
| uv pip install pytest pytest-cov coverage[toml] ovoscope | ||
| if uv pip install -e ".[dev]" 2>/dev/null; then | ||
| echo "Installed package with [dev] extras" | ||
| elif python -m pip install -e . 2>/dev/null; then | ||
| elif uv pip install -e . 2>/dev/null; then | ||
| echo "Installed package (no [dev] extras)" | ||
| else | ||
| echo "No installable package found at repo root β continuing without install" | ||
| fi | ||
| if [ -n "${{ inputs.install_extras }}" ]; then | ||
| python -m pip install ${{ inputs.install_extras }} | ||
| uv pip install ${{ inputs.install_extras }} | ||
|
Comment on lines
89
to
+90
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. π Security & Privacy | π Major | β‘ Quick win Avoid shell-expanding Line 83 treats the workflow input as shell source instead of arguments. In a reusable workflow, that makes Proposed fix- if [ -n "${{ inputs.install_extras }}" ]; then
- uv pip install ${{ inputs.install_extras }}
+ if [ -n "${{ inputs.install_extras }}" ]; then
+ INSTALL_EXTRAS="${{ inputs.install_extras }}" python - <<'PY'
+ import os, shlex, subprocess
+ extras = shlex.split(os.environ["INSTALL_EXTRAS"])
+ subprocess.check_call(["uv", "pip", "install", *extras])
+ PY
fiπ§° Toolsπͺ zizmor (1.26.1)[error] 82-82: code injection via template expansion (template-injection): may expand into attacker-controllable code (template-injection) [error] 82-82: code injection via template expansion (template-injection): may expand into attacker-controllable code (template-injection) π€ Prompt for AI AgentsSource: Linters/SAST tools |
||
| fi | ||
|
|
||
| - name: Run Tests with Coverage | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,6 +35,11 @@ on: | |
| default: "dev" | ||
| description: "Deprecated β ignored. Report is now uploaded as an artifact instead of committed." | ||
|
|
||
| # uv installs into the setup-python interpreter (no venv on the runner) | ||
| env: | ||
| UV_SYSTEM_PYTHON: "1" | ||
| UV_PRERELEASE: "allow" # OVOS ships pre-1.0 alphas; resolve prerelease floor-pins like pip did | ||
|
|
||
| jobs: | ||
| check_downstream: | ||
| runs-on: ${{ inputs.runner }} | ||
|
|
@@ -55,6 +60,8 @@ jobs: | |
| uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: ${{ inputs.python_version }} | ||
| - name: Install uv | ||
| run: pip install uv | ||
| - name: Install System Dependencies | ||
| run: | | ||
| sudo apt-get update -q | ||
|
|
@@ -71,12 +78,11 @@ jobs: | |
| ${{ inputs.system_deps }} | ||
| - name: Install OVOS ecosystem and pipdeptree | ||
| run: | | ||
| python -m pip install build wheel pipdeptree | ||
| curl -fsSL -o constraints.txt "${{ inputs.constraints_url }}" | ||
| # Install the full OVOS ecosystem so pipdeptree can find all reverse deps | ||
| pip install -r constraints.txt || true | ||
| uv pip install -r constraints.txt || true | ||
| # Re-install the target package pinned to the constraints version | ||
| pip install -c constraints.txt "${{ inputs.package_name }}" || true | ||
| uv pip install -c constraints.txt "${{ inputs.package_name }}" || true | ||
|
Comment on lines
86
to
+92
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. π©Ί Stability & Availability | π‘ Minor | β‘ Quick win π§© Analysis chainπ Script executed: #!/bin/bash
set -euo pipefail
script="$(fd -p check_downstream.py action . | head -n1)"
echo "check_downstream.py: ${script:-not found}"
if [ -n "${script:-}" ]; then
ast-grep outline "$script" --view expanded || true
echo
echo "Searching for pipdeptree/process usage..."
rg -n -C2 'pipdeptree|subprocess\.(run|check_call|check_output)|shutil\.which' "$script"
fiRepository: OpenVoiceOS/gh-automations Length of output: 1909 π Script executed: #!/bin/bash
set -euo pipefail
echo "Repository references to pipdeptree:"
rg -n --hidden --glob '!**/.git/**' 'pipdeptree' .
echo
echo "Workflow section around the install step:"
sed -n '60,100p' .github/workflows/downstream-check.ymlRepository: OpenVoiceOS/gh-automations Length of output: 3687 Keep π§° Toolsπͺ zizmor (1.26.1)[error] 81-81: code injection via template expansion (template-injection): may expand into attacker-controllable code (template-injection) [error] 85-85: code injection via template expansion (template-injection): may expand into attacker-controllable code (template-injection) π€ Prompt for AI Agents |
||
| - name: Generate downstream report | ||
| run: | | ||
| python action/github/scripts/check_downstream.py \ | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -107,6 +107,11 @@ on: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Minimum overall pass rate (0.0-1.0). Fails the shard when the | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| observed rate is below this value. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # uv installs into the setup-python interpreter (no venv on the runner) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| UV_SYSTEM_PYTHON: "1" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| UV_PRERELEASE: "allow" # OVOS ships pre-1.0 alphas; resolve prerelease floor-pins like pip did | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| intent_case_tests: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| runs-on: ${{ inputs.runner }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -134,6 +139,9 @@ jobs: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| python-version: ${{ inputs.python_version }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Install uv | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: pip install uv | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Install System Dependencies | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if: ${{ inputs.system_deps != '' || inputs.require_padatious }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -152,10 +160,10 @@ jobs: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| install_plugin() { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| local name="$1" pypi="$2" gh="$3" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if [ "$PRE_RELEASE" == "true" ]; then | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pip install --force-reinstall "git+https://github.com/${gh}@dev" || { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uv pip install --force-reinstall "git+https://github.com/${gh}@dev" || { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "::error::Failed to install $name from GitHub dev"; exit 1; } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| else | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pip install "$pypi" || { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uv pip install "$pypi" || { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "::error::Failed to install $name from PyPI"; exit 1; } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -178,18 +186,17 @@ jobs: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Install Package with Test Extras | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| python -m pip install --upgrade pip | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| python -m pip install pytest pytest-json-report | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uv pip install pytest pytest-json-report | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if [ "${{ inputs.pre_release }}" == "true" ]; then | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pip install --force-reinstall "git+https://github.com/TigreGotico/ovoscope@dev" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uv pip install --force-reinstall "git+https://github.com/TigreGotico/ovoscope@dev" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| else | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pip install ovoscope | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uv pip install ovoscope | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EXTRAS="${{ inputs.install_extras }}" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if [ -n "$EXTRAS" ]; then | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pip install ".[$EXTRAS]" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uv pip install ".[$EXTRAS]" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| else | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pip install . | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uv pip install . | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
194
to
+206
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. π Security & Privacy | π Major | β‘ Quick win Avoid inline expansion of Line 195 embeds a caller-provided string directly into the shell script. In a reusable workflow that is enough for Suggested fix - name: Install Package with Test Extras
+ env:
+ INSTALL_EXTRAS: ${{ inputs.install_extras }}
run: |
uv pip install pytest pytest-json-report
if [ "${{ inputs.pre_release }}" == "true" ]; then
uv pip install --force-reinstall "git+https://github.com/TigreGotico/ovoscope@dev"
else
uv pip install ovoscope
fi
- EXTRAS="${{ inputs.install_extras }}"
+ EXTRAS="${INSTALL_EXTRAS}"
if [ -n "$EXTRAS" ]; then
uv pip install ".[$EXTRAS]"
else
uv pip install .
fiπ Committable suggestion
Suggested change
π§° Toolsπͺ zizmor (1.26.1)[error] 195-195: code injection via template expansion (template-injection): may expand into attacker-controllable code (template-injection) π€ Prompt for AI AgentsSource: Linters/SAST tools |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| python -c "import ovoscope; print('ovoscope path:', ovoscope.__file__)" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π― Functional Correctness | π‘ Minor | β‘ Quick win
Extend the guard to enforce
UV_PRERELEASEtoo.Lines 88-89 only assert
UV_SYSTEM_PYTHON, so a futureuv pipworkflow can dropUV_PRERELEASEand still pass this harness even though that is the regression this PR is fixing.Proposed fix
- name: Assert uv workflows declare UV_SYSTEM_PYTHON run: | set -euo pipefail missing=0 for f in .github/workflows/*.yml; do [ "$(basename "$f")" = "_selftest-uv.yml" ] && continue - if grep -qE 'uv pip (install|freeze)' "$f" && ! grep -q 'UV_SYSTEM_PYTHON' "$f"; then - echo "::error file=$f::uses 'uv pip' but does not declare UV_SYSTEM_PYTHON" - missing=1 + if grep -qE 'uv pip (install|freeze)' "$f"; then + if ! grep -q 'UV_SYSTEM_PYTHON' "$f"; then + echo "::error file=$f::uses 'uv pip' but does not declare UV_SYSTEM_PYTHON" + missing=1 + fi + if ! grep -q 'UV_PRERELEASE' "$f"; then + echo "::error file=$f::uses 'uv pip' but does not declare UV_PRERELEASE" + missing=1 + fi fi done [ "$missing" -eq 0 ] && echo "All uv workflows declare UV_SYSTEM_PYTHON." exit "$missing"π Committable suggestion
π§° Tools
πͺ zizmor (1.26.1)
[warning] 81-81: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false
(artipacked)
π€ Prompt for AI Agents