-
Notifications
You must be signed in to change notification settings - Fork 10
chore: test against conda-forge using pixi in place of tox-conda #1455
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
base: develop
Are you sure you want to change the base?
Changes from 1 commit
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 |
|---|---|---|
|
|
@@ -197,58 +197,24 @@ jobs: | |
| needs: download_data | ||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| - name: Setup Miniconda | ||
| uses: conda-incubator/setup-miniconda@v4.0.1 | ||
| - uses: prefix-dev/setup-pixi@v0.10.1 | ||
| with: | ||
| miniforge-version: latest | ||
| use-mamba: true | ||
| channels: conda-forge | ||
| channel-priority: strict | ||
| python-version: "3.12" | ||
| environments: "test-py313-pyside6" | ||
|
Comment on lines
+200
to
+202
Contributor
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 🔎 Supported by static analysis🏁 Script executed: printf '%s\n' '--- workflow ---'
sed -n '185,225p' .github/workflows/tests.yml
printf '%s\n' '--- ignore rules ---'
rg -n -C 2 'pixi\.lock|pixi' .gitignore .git/info/exclude 2>/dev/null || true
printf '%s\n' '--- repository Pixi files ---'
git ls-files '*pixi*' '.github/workflows/tests.yml' '.gitignore'
printf '%s\n' '--- pinned action contract ---'
curl -fsSL https://raw.githubusercontent.com/prefix-dev/setup-pixi/f00437f565399d418b0acc85936d12c1fb668347/action.yml | sed -n '1,220p'Repository: 4DNucleome/PartSeg Length of output: 6241 Track
🤖 Prompt for AI Agents |
||
|
|
||
| - uses: tlambert03/setup-qt-libs@v1 | ||
| - name: Setup headless display | ||
| uses: pyvista/setup-headless-display-action@5bc8de3bc71fcda7a96439571287a554901541a0 # v4.3 | ||
| with: | ||
| qt: true | ||
| wm: herbstluftwm | ||
|
|
||
| - name: Download test data | ||
| uses: actions/download-artifact@v8 | ||
| with: | ||
| name: test_data | ||
| path: test_data | ||
|
|
||
| - name: Use mamba solver | ||
| shell: "bash -el {0}" | ||
| run: | | ||
| conda install -n base conda-libmamba-solver | ||
| conda config --set solver libmamba | ||
|
|
||
| - name: Install dependencies | ||
| shell: "bash -el {0}" | ||
| run: | | ||
| mamba install -y "tox-conda>=0.10.0" | ||
|
|
||
| - name: List environment packages | ||
| shell: "bash -el {0}" | ||
| run: conda list | ||
|
|
||
| - name: create environment | ||
| shell: "bash -el {0}" | ||
| run: bash build_utils/create_environment_yml.sh | ||
|
|
||
| - name: Upload environment file | ||
| uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: environment | ||
| path: environment.yml | ||
| retention-days: 5 | ||
|
|
||
| - name: patch tox.ini | ||
| shell: "bash -el {0}" | ||
| run: sed -e "s/{sys_platform}/{platform}/g" tox.ini -i | ||
|
|
||
| - name: Test with tox | ||
| uses: aganders3/headless-gui@v2 | ||
| with: | ||
| run: conda run -n test --no-capture-output tox -e py312-PySide2-conda | ||
| timeout-minutes: 60 | ||
| - name: Run tests | ||
| run: pixi run -e py313-pyside6-conda test | ||
|
sourcery-ai[bot] marked this conversation as resolved.
Outdated
coderabbitai[bot] marked this conversation as resolved.
Outdated
|
||
|
|
||
| check-package: | ||
| name: Build & inspect our package. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| pixi.lock | ||
| report-*.json | ||
| environment.yml | ||
| minimum-constrains.txt | ||
|
|
||
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| [workspace] | ||
| authors = ["Grzegorz Bokota"] | ||
| channels = ["https://prefix.dev/conda-forge"] | ||
| platforms = ["win-64", "linux-64", "osx-arm64"] # Mac Intel support is not available | ||
| preview = ["pixi-build"] | ||
|
|
||
| [package] | ||
| version = "0.17.1" # keep in sync with `pyproject.toml` | ||
| build = { | ||
| backend.name = "pixi-build-python", | ||
| config.ignore-pypi-mapping = false, | ||
| } | ||
|
|
||
| [dependencies] | ||
| napari = ">=0.7.0" | ||
|
|
||
| [feature.py311.dependencies] | ||
| python = "3.11.*" | ||
|
|
||
| [feature.py312.dependencies] | ||
| python = "3.12.*" | ||
|
|
||
| [feature.py313.dependencies] | ||
| python = "3.13.*" | ||
|
|
||
| [feature.py314.dependencies] | ||
| python = "3.14.*" | ||
|
|
||
| [feature.pyqt6.dependencies] | ||
| PartSeg = { path = ".", extras = ["pyqt6"] } | ||
|
|
||
| [feature.pyside6.dependencies] | ||
| PartSeg = { path = ".", extras = ["pyside6"] } | ||
|
|
||
| [feature.test.dependencies] | ||
| pytest = "*" | ||
| pytest-qt = "*" | ||
| pytest-timeout = "*" | ||
| scikit-image = "*" | ||
| lxml = "*" | ||
|
|
||
|
|
||
|
|
||
| # there is no automatic mapping from `optional-dependencies`/`dependency-groups` | ||
| # to `package.extra-dependencies`/`dependencies` yet, | ||
| # ref. https://github.com/prefix-dev/pixi/issues/4764#issuecomment-4781239118 | ||
| [package.extra-dependencies.pyqt6] | ||
| pyqt6 = ">=6.10" | ||
|
|
||
| [package.extra-dependencies.pyside6] | ||
| pyside6 = ">=6.10" | ||
|
|
||
|
|
||
|
|
||
|
|
||
| [feature.test.tasks] | ||
| test = "python -m pytest package/tests" | ||
|
|
||
| [environments] | ||
| default = { features = ["py312", "pyside6", "test"] } | ||
|
|
||
| # Standard python x backend (pyqt5 across all Pythons for the comprehensive base) | ||
|
sourcery-ai[bot] marked this conversation as resolved.
Outdated
|
||
| test-py311-pyqt6 = ["py311", "pyqt6", "test"] | ||
| test-py312-pyqt6 = ["py312", "pyqt6", "test"] | ||
| test-py313-pyqt6 = ["py313", "pyqt6", "test"] | ||
| test-py314-pyqt6 = ["py314", "pyqt6", "test"] | ||
| test-py311-pyside6 = ["py311", "pyside6", "test"] | ||
| test-py312-pyside6 = ["py312", "pyside6", "test"] | ||
| test-py313-pyside6 = ["py313", "pyside6", "test"] | ||
| test-py314-pyside6 = ["py314", "pyside6", "test"] | ||
Uh oh!
There was an error while loading. Please reload this page.
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.
GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g.uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608.⭐ Fixed in commit 185593f ⭐