Skip to content

Commit f68c3b0

Browse files
authored
Merge pull request #364 from abkfenris/pixi
Use pixi to manage environment
2 parents bfa965d + b4218b1 commit f68c3b0

File tree

7 files changed

+5873
-37
lines changed

7 files changed

+5873
-37
lines changed

.github/workflows/check_sphinx_build.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,20 @@ jobs:
1818
with:
1919
submodules: true
2020

21-
- name: Install Conda environment from environment.yml
22-
uses: mamba-org/setup-micromamba@0dea6379afdaffa5d528b3d1dabc45da37f443fc # v2.0.4
21+
- uses: prefix-dev/setup-pixi@v0.8.14
2322
with:
24-
environment-file: environment.yml
25-
cache-environment: true
23+
pixi-version: v0.51.0
24+
cache: true
2625

2726
- name: Build documentation
2827
shell: bash -l {0}
2928
run: |
30-
make html
29+
pixi run html
3130
3231
# - name: Check links
3332
# shell: bash -l {0}
3433
# run: |
35-
# make linkcheck
34+
# pixi run linkcheck
3635

3736
# workaround https://github.com/actions/upload-artifact/issues/38
3837
- name: tarball

.github/workflows/deploy-docs.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,16 @@ jobs:
1111
with:
1212
submodules: true
1313

14-
- name: Install Conda environment from environment.yml
15-
uses: mamba-org/setup-micromamba@v2.0.0
14+
- uses: prefix-dev/setup-pixi@v0.8.14
1615
with:
17-
environment-file: environment.yml
18-
cache-environment: true
16+
pixi-version: v0.51.0
17+
cache: true
1918

2019

2120
- name: Build documentation
2221
shell: bash -l {0}
2322
run: |
24-
make html
23+
pixi run html
2524
2625
- name: Deploy
2726
uses: JamesIves/github-pages-deploy-action@3.7.1

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@ _config_localdev.yml
1111
_build
1212
**/.ipynb_checkpoints/*
1313
__pycache__
14+
15+
.pixi

_InstructionSiteUpdates.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,14 @@ It is worth noting that we are using the `source` branch as the base for this re
5656

5757
#### Environment
5858

59-
There is a pre-configured conda environment in `environment.yml`.
60-
To use it, `conda env create --file environment.yml`, then activate with `conda activate ohw-site`.
59+
There is a pre-configured conda environment in `pixi.toml`.
60+
To use it, prefix commands with `pixi run` to make sure the environment is up to date.
6161

6262
#### Commands
6363

64-
- `make live` - The environment is setup with [sphinx-autobuild](https://pypi.org/project/sphinx-autobuild/) which will update open browsers when files are saved. The site will be available at [http://127.0.0.1:8000/](http://127.0.0.1:8000/).
65-
- `make html` - Launch a one off build of HTML output.
66-
- `make clean` - Clean all the build directories. This can be useful as Sphinx tries to do incremental builds, and sometimes it will end up out of sync.
64+
- `pixi run live` - The environment is setup with [sphinx-autobuild](https://pypi.org/project/sphinx-autobuild/) which will update open browsers when files are saved. The site will be available at [http://127.0.0.1:8000/](http://127.0.0.1:8000/).
65+
- `pixi run html` - Launch a one off build of HTML output.
66+
- `pixi run clean` - Clean all the build directories. This can be useful as Sphinx tries to do incremental builds, and sometimes it will end up out of sync.
6767
- `git pull upstream source` to bring in any changes from the main repo.
6868

6969
### Writing and Linking Pages
@@ -210,7 +210,7 @@ After you create a PR, Netlify will build the site and make a comment with a lin
210210
While most pages follow the same structure in the repo, as they do on the website, there are a few additional files to be aware of:
211211

212212
- `conf.pd` - This is the Sphinx configuration file.
213-
- `environment.yml` - The conda environment needed to build the website.
213+
- `pixi.toml` - The conda environment needed to build the website.
214214
- `requirements.txt` - A pip installable environment to build the website. This is mainly used by Netlify to create previews of Pull Requests. It is generated with `pip list --format=freeze > requirements.txt`
215215
- `posts.md` - A stub page that is replaced when blog posts are generated.
216216
- `_build/` - Automatically generated output from Sphinx.

environment.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)