-
Notifications
You must be signed in to change notification settings - Fork 32
Pixi dependency management #301
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: main
Are you sure you want to change the base?
Changes from all commits
a8e8a11
cd36ad1
1ec8567
b8bea84
1e2a5a4
662be96
5cb6568
d4438e6
dbca697
0927397
201f406
9db683b
fc6e258
3627fc6
1d3fe09
c2231c6
719d289
5d544bb
bca3359
c35ca17
c15ae22
0bd1440
ad05dfe
b3f256e
3ac1102
3a2c7c1
5ffa9df
baeb0b4
3223050
68f5641
97e80b4
df13f3e
8cf1b5d
3b4b8d2
2ca19cd
abf5121
d2d5b68
e436d4f
36c95fe
62d8bef
1165f38
4b88697
ab985db
7f02edb
6151615
066fee3
3fc045a
80137ed
9ba2b2e
795e7ee
6444223
e935aaa
c9f4cc4
d4ceb11
c336845
ded2a78
4084474
1176983
5db23c0
1c2c1e3
20417ac
e247344
68b8cb4
e8567e0
435284d
e7c7b1d
8f8c60c
75f0b93
471953d
f6f4f54
64ab5b3
7a9c8aa
5d69110
8361db5
2ec689f
b4a7999
62dad6b
d26605a
a8bff89
09f0b93
ea0414d
a08c37b
b122e6c
1882a0a
d4e5d80
f59a3d0
c73b2d7
079b6a1
e0f52ae
bde8e06
b01ee76
bde9a76
d97204b
e96207a
dfbbe48
d1f20a3
3b17e0c
78ea315
97210ee
9340800
fed5dc0
2349d63
55beeba
498bdd5
6521375
f572204
befc284
baa7a67
4e5de59
aca321e
1c0c577
142f8fe
8b6c46a
e23b983
5df93cf
0ea58c0
892ed87
c5c368f
a4837a5
1eebaa5
9f07bb7
676676d
cb35c95
6986c96
0ddf746
933fc1a
b4b7965
76d197a
26205c9
253a0bc
ffb4629
b764c38
b1fd3fc
2eba738
6e10ec3
9659d92
ca67701
2a34264
eb4dc0d
ef6120d
6d225b9
8ff37db
bd0af1b
5b63815
09f391d
e933198
fd12d7f
cb27716
1540676
d30c84f
5da1a16
7345b98
f181e6a
3b9e988
d7e30f3
e451cb6
b3c8b47
95882f8
ffcc328
55e94e7
ab16dec
804e8fd
a9de493
6c46182
1e4b367
2d234ea
89a9916
f973e18
d4eaa74
3c647c2
7c63b98
5f95f7c
22a3732
07a1ace
5790e7f
60f28af
5b096fb
d25975c
617cdd1
5f1e16a
eb83358
5b34b10
486d0f4
5d96d0e
80ee1f6
c75212d
e999690
dba0749
27342f8
bdfc074
713b820
50aa61d
4b7f57e
1578e15
547b05d
1689be8
964bb64
978d609
c044e80
498c1ff
2f7c194
1ddc2b9
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,2 @@ | ||
| # SCM syntax highlighting & preventing 3-way merges | ||
| pixi.lock merge=binary linguist-language=YAML linguist-generated=true -diff |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| name: Run pytest suite | ||
| description: Run a marked pytest suite and publish its reports. | ||
|
|
||
| inputs: | ||
| test-suite-name: | ||
| description: Test suite name used in coverage, JUnit, and artifact filenames. | ||
| required: true | ||
| markers: | ||
| description: Pytest marker expression to select tests. | ||
| required: true | ||
|
|
||
| runs: | ||
| using: composite | ||
| steps: | ||
| - name: Prepare report names | ||
| id: report-names | ||
| shell: bash | ||
| env: | ||
| TEST_SUITE_NAME: ${{ inputs.test-suite-name }} | ||
| run: | | ||
| echo "coverage-file=.coverage.${TEST_SUITE_NAME}" >> "$GITHUB_OUTPUT" | ||
| echo "junit-file=test_junit_${TEST_SUITE_NAME}.xml" >> "$GITHUB_OUTPUT" | ||
| echo "artifact-name=raw_test_reports_${TEST_SUITE_NAME}" >> "$GITHUB_OUTPUT" | ||
|
|
||
| - name: Run pytest | ||
| id: pytest | ||
| shell: bash | ||
| continue-on-error: true | ||
| env: | ||
| COVERAGE_FILE: ${{ steps.report-names.outputs.coverage-file }} | ||
| JUNIT_FILE: ${{ steps.report-names.outputs.junit-file }} | ||
| PYTEST_MARKERS: ${{ inputs.markers }} | ||
| run: | | ||
| pytest_args=( | ||
| -v | ||
| -m "${PYTEST_MARKERS}" | ||
| --cov | ||
| --cov-report=term | ||
| --color=yes | ||
| -o junit_logging=all | ||
| --junitxml="${JUNIT_FILE}" | ||
| ) | ||
|
|
||
| if [ -n "${TEST_TIMING_OPTION:-}" ]; then | ||
| read -r -a timing_args <<< "${TEST_TIMING_OPTION}" | ||
| pytest_args+=("${timing_args[@]}") | ||
| fi | ||
|
|
||
| pytest "${pytest_args[@]}" | ||
|
|
||
| - name: Publish junit pytest report | ||
| if: always() | ||
| uses: mikepenz/action-junit-report@v6 | ||
| with: | ||
| report_paths: ${{ steps.report-names.outputs.junit-file }} | ||
| annotate_only: true | ||
| job_summary: false | ||
|
|
||
| - name: Upload raw test reports | ||
| if: always() | ||
| uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: ${{ steps.report-names.outputs.artifact-name }} | ||
| include-hidden-files: true | ||
| path: | | ||
| ${{ steps.report-names.outputs.coverage-file }} | ||
| ${{ steps.report-names.outputs.junit-file }} | ||
| if-no-files-found: error | ||
| retention-days: 7 | ||
|
|
||
| - name: Fail if pytest failed | ||
| if: steps.pytest.outcome == 'failure' | ||
| shell: bash | ||
| run: exit 1 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| --- | ||
| name: Setup QUEENS pixi environment | ||
| description: > | ||
| Set up pixi, install QUEENS editable into the selected environment, | ||
| and optionally ensure rsync is available. | ||
|
|
||
| inputs: | ||
| cache: | ||
| description: Whether setup-pixi should enable caching. | ||
| required: false | ||
| default: "true" | ||
| cache-write: | ||
| description: Whether setup-pixi should write to the cache. | ||
| required: false | ||
| default: "false" | ||
| run-install: | ||
| description: Whether setup-pixi should install the selected pixi environments. | ||
| required: false | ||
| default: "true" | ||
| environments: | ||
| description: Whitespace-separated list of pixi environments to install. | ||
| required: false | ||
| default: default | ||
| activate-environment: | ||
|
leahaeusel marked this conversation as resolved.
|
||
| description: Pixi environment to activate and use for the editable install. | ||
| required: false | ||
| default: default | ||
| install-editable: | ||
| description: Whether to install QUEENS editable into the selected pixi environment. | ||
| required: false | ||
| default: "true" | ||
| ensure-rsync: | ||
| description: Whether to verify that rsync is available, installing it if necessary. | ||
| required: false | ||
| default: "true" | ||
| frozen: | ||
| description: Whether to install with frozen requirements. | ||
| required: false | ||
| default: "true" | ||
|
|
||
| runs: | ||
| using: composite | ||
| steps: | ||
| - name: Read pixi version | ||
| id: pixi-version | ||
| shell: bash | ||
| run: | | ||
| pixi_version="$(tr -d '[:space:]' < "${GITHUB_WORKSPACE}/.pixi-version")" | ||
| echo "version=${pixi_version}" >> "$GITHUB_OUTPUT" | ||
|
|
||
| - uses: prefix-dev/setup-pixi@v0.9.5 | ||
| with: | ||
| pixi-version: ${{ steps.pixi-version.outputs.version }} | ||
| cache: ${{ inputs.cache }} | ||
| cache-write: ${{ inputs.cache-write }} | ||
| run-install: ${{ inputs.run-install }} | ||
| environments: ${{ inputs.environments }} | ||
| frozen: ${{ inputs.frozen }} | ||
| activate-environment: ${{ inputs.activate-environment }} | ||
|
|
||
| - name: Install QUEENS in workspace | ||
| if: ${{ inputs.install-editable != 'false' }} | ||
| shell: bash | ||
| run: | | ||
| pixi run --locked -e "${{ inputs.activate-environment }}" install-editable | ||
|
|
||
| - name: Mark repo as safe for git | ||
| shell: bash | ||
| run: | | ||
| git config --global --add safe.directory "${GITHUB_WORKSPACE}" | ||
|
|
||
| - name: Ensure rsync is available | ||
| if: ${{ inputs.ensure-rsync != 'false' }} | ||
| shell: bash | ||
| run: | | ||
| if command -v rsync >/dev/null 2>&1; then | ||
| rsync --version | ||
| elif [ "${RUNNER_OS}" = "Linux" ]; then | ||
| sudo apt-get update | ||
| sudo apt-get install -y rsync | ||
| rsync --version | ||
| elif [ "${RUNNER_OS}" = "macOS" ]; then | ||
| brew install rsync | ||
| rsync --version | ||
| else | ||
| echo "Unsupported runner OS for rsync setup: ${RUNNER_OS}" | ||
| exit 1 | ||
| fi | ||
|
Member
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. Really nice to have this github-actions updating mechanism now! As mentioned before, I am only concerned that the PR mechanism won't work because we disabled all branches besides main...
Member
Author
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. Very good point as mentioned here, we should find a solution that remains as restrictive as possible. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| --- | ||
| version: 2 | ||
| updates: | ||
| - package-ecosystem: github-actions | ||
| directories: | ||
| - / | ||
| - /.github/actions/setup-queens-pixi | ||
| schedule: | ||
| interval: monthly | ||
| groups: | ||
| github-actions: | ||
| patterns: | ||
| - "*" | ||
| cooldown: | ||
| default-days: 7 |
Uh oh!
There was an error while loading. Please reload this page.