Skip to content

Commit

Permalink
chore(pixi): use custom install task for internal dev dependencies (#…
Browse files Browse the repository at this point in the history
…1728)

Restore the custom task approach to installing flopy, modflowapi, pymake, and modflow-devtools originally introduced by @Hofer-Julian in #1696. This unlocks them (removes them from pixi.lock) and allows rolling updates in CI, as we had before #1703. Going forward, contributors will need to run `pixi run install` instead of `pixi install` to get a full development environment.

Also remove hatchling from pixi.toml as it is not needed.
  • Loading branch information
wpbonelli authored Apr 17, 2024
1 parent 94ba5b9 commit 1d6e6b1
Show file tree
Hide file tree
Showing 8 changed files with 231 additions and 694 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ jobs:
pixi-version: v0.19.1
manifest-path: "modflow6/pixi.toml"

- name: Custom pixi install
working-directory: modflow6
run: pixi run install

- name: Build test-drive
working-directory: test-drive
run: |
Expand Down Expand Up @@ -224,6 +228,10 @@ jobs:
pixi-version: v0.19.1
manifest-path: "modflow6/pixi.toml"

- name: Custom pixi install
working-directory: modflow6
run: pixi run install

- name: Set LDFLAGS (macOS)
if: matrix.os == 'macos-14'
run: |
Expand Down Expand Up @@ -346,6 +354,10 @@ jobs:
pixi-version: v0.19.1
manifest-path: "modflow6/pixi.toml"

- name: Custom pixi install
working-directory: modflow6
run: pixi run install

- name: Setup ${{ env.FC }} ${{ env.FC_V }}
uses: fortran-lang/setup-fortran@v1
with:
Expand Down Expand Up @@ -433,6 +445,10 @@ jobs:
pixi-version: v0.19.1
manifest-path: "modflow6/pixi.toml"

- name: Custom pixi install
working-directory: modflow6
run: pixi run install

- name: Test parallel MF6
if: runner.os != 'Windows'
uses: ./modflow6/.github/actions/test-par
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/compilers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ jobs:
pixi-version: v0.19.1
manifest-path: "modflow6/pixi.toml"

- name: Custom pixi install
working-directory: modflow6
run: pixi run install

- name: Build modflow6
working-directory: modflow6
run: |
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ jobs:
with:
pixi-version: v0.19.1
manifest-path: "modflow6/pixi.toml"

- name: Custom pixi install
working-directory: modflow6
run: pixi run install

- name: Install additional packages for Sphinx using pip
working-directory: modflow6/.build_rtd_docs
Expand Down Expand Up @@ -198,6 +202,9 @@ jobs:
with:
pixi-version: v0.19.1

- name: Custom pixi install
run: pixi run install

- name: Print python package versions
run: pixi run pip list

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/large.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ jobs:
pixi-version: v0.19.1
manifest-path: "modflow6/pixi.toml"

- name: Custom pixi install
working-directory: modflow6
run: pixi run install

- name: Setup ${{ matrix.compiler }} ${{ matrix.version }}
uses: fortran-lang/setup-fortran@v1
with:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ jobs:
pixi-version: v0.19.1
manifest-path: "modflow6/pixi.toml"

- name: Custom pixi install
working-directory: modflow6
run: pixi run install

- name: Setup Micromamba
uses: mamba-org/setup-micromamba@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion DEVELOPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ The following tables are automatically generated by [a CI workflow](.github/work
Python 3.8+ is required to run MODFLOW 6 tests. Using Python via Pixi is recommended. Pixi installation docs can be found [here](https://pixi.sh). After installing `pixi`, to set up an environment with all development dependencies, run:

```
pixi install
pixi run install
```

#### Dependencies
Expand Down
869 changes: 183 additions & 686 deletions pixi.lock

Large diffs are not rendered by default.

19 changes: 12 additions & 7 deletions pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@ filelock = "*"
flaky = "*"
fortran-language-server = "*"
fprettify = "*"
hatchling = "*"
jupytext = "*"
matplotlib = "*"
meson = "1.3.0"
mfpymake = "*"
networkx = "*"
ninja = "*"
numpy = "*"
Expand All @@ -33,12 +31,19 @@ scipy = "*"
shapely = "*"
xmipy = "*"

[pypi-dependencies]
flopy = { git = "https://github.com/modflowpy/flopy.git" }
modflowapi = { git = "https://github.com/MODFLOW-USGS/modflowapi.git" }
modflow-devtools = { git = "https://github.com/MODFLOW-USGS/modflow-devtools.git" }

[tasks]
# install
install-flopy = "pip install --no-build-isolation --no-deps --disable-pip-version-check git+https://github.com/modflowpy/flopy.git"
install-pymake = "pip install --no-build-isolation --no-deps --disable-pip-version-check git+https://github.com/modflowpy/pymake.git"
install-modflowapi = "pip install --no-build-isolation --no-deps --disable-pip-version-check git+https://github.com/MODFLOW-USGS/modflowapi.git"
install-modflow-devtools = "pip install --no-build-isolation --no-deps --disable-pip-version-check git+https://github.com/MODFLOW-USGS/modflow-devtools.git"
install = { depends_on = [
"install-flopy",
"install-pymake",
"install-modflowapi",
"install-modflow-devtools",
] }

# format
fortran-format-check = "python .github/common/fortran_format_check.py"
msvs-vfproj-check = "python .github/common/msvs_vfproj_check.py"
Expand Down

0 comments on commit 1d6e6b1

Please sign in to comment.