Skip to content

Commit 1ec6fbe

Browse files
authored
Merge pull request #361 from xylar/fix-mache-version-in-pixi
Fixes to mache.deploy
2 parents 0c558a0 + 6a0b185 commit 1ec6fbe

File tree

31 files changed

+1328
-189
lines changed

31 files changed

+1328
-189
lines changed

.github/workflows/build_workflow.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,10 @@ jobs:
119119
include:
120120
- python-version: "3.10"
121121
pixi-env: py310
122+
workflow-path: workflow_tests/test_deploy_workflow.py
122123
- python-version: "3.14"
123124
pixi-env: py314
125+
workflow-path: workflow_tests
124126
fail-fast: false
125127
steps:
126128
- id: skip_check
@@ -148,4 +150,4 @@ jobs:
148150
- if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
149151
name: Run workflow tests
150152
run: |
151-
pixi run -e ${{ matrix.pixi-env }} pytest workflow_tests
153+
pixi run -e ${{ matrix.pixi-env }} pytest ${{ matrix.workflow-path }}

conda/recipe/recipe.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ schema_version: 1
22

33
context:
44
name: mache
5-
version: 3.0.2
5+
version: 3.0.3
66

77
package:
88
name: ${{ name|lower }}

docs/design/mache_deploy.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,13 +195,16 @@ maintainers to do full shared-environment deployments when needed.
195195
“software” spack env)
196196
- `deploy.py` exposes CLI flags such as:
197197
- `--deploy-spack` (force-enable spack deployment)
198+
- `--no-spack` (disable all spack use for a single run)
198199
- `--spack-path <path>` (temporary override for `spack.spack_path`)
199200

200201
**Precedence**
201202

202-
1. If the user passes `--deploy-spack`, spack deployment is enabled regardless
203-
of the config default.
204-
2. Otherwise, fall back to the `config.yaml.j2` default.
203+
1. If the user passes `--no-spack`, all spack use is disabled for that run.
204+
2. Otherwise, if the user passes `--deploy-spack`, spack deployment is enabled
205+
regardless of the config default.
206+
3. Otherwise, fall back to the `config.yaml.j2` default for deployment and
207+
reuse any supported pre-existing spack environments in load scripts.
205208

206209
For spack checkout path resolution:
207210

docs/users_guide/deploy.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,8 @@ Important settings:
174174
- `pixi.prefix`: required in practice.
175175
- `pixi.channels`: required and must be non-empty.
176176
- `spack.spack_path`: required when Spack support is enabled and no hook or
177-
CLI override provides it.
177+
CLI override provides it, unless the user disables Spack for that run with
178+
`--no-spack`.
178179
- `jigsaw.enabled`: optional.
179180
- `hooks`: optional and disabled unless explicitly configured.
180181

@@ -492,13 +493,16 @@ Fix:
492493

493494
Cause:
494495

495-
- Spack support was enabled but no path was provided in config, hooks, or the
496-
CLI.
496+
- Spack support was enabled for this run, but no path was provided in config,
497+
hooks, or the CLI.
497498

498499
Fix:
499500

500501
- Set `spack.spack_path`, write it in a hook through
501502
`ctx.runtime["spack"]["spack_path"]`, or pass `--spack-path`.
503+
- If this should be a Pixi-only run, pass `--no-spack`.
504+
- A `pre_spack` hook may also disable Spack for one run by returning
505+
`{"spack": {"supported": false, "software": {"supported": false}}}`.
502506

503507
### `project.version` is still `dynamic`
504508

@@ -521,4 +525,4 @@ Cause:
521525

522526
Fix:
523527

524-
- Use `source load_<software>*.sh` from `bash`.
528+
- Use `source load_<software>*.sh` from `bash`.

0 commit comments

Comments
 (0)