Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 5 additions & 38 deletions .github/actions/initialize_conda_env/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,43 +12,10 @@ runs:
steps:
# cache ref https://github.com/conda-incubator/setup-miniconda#caching-packages

- name: Setup conda-forge
uses: conda-incubator/setup-miniconda@v3
- name: Setup conda env
uses: prefix-dev/setup-pixi@v0.8.10
with:
miniforge-version: latest
activate-environment: sscp-env
python-version: ${{ inputs.python-version }}
use-mamba: true
# uncomment to install env in one go (without caching)
# environment-file: environment.yml

- name: Get Date
id: get-date
run: echo "today=$(/bin/date -u '+%Y%m%d')" >> "$GITHUB_OUTPUT"
shell: bash

- name: Cache conda env
uses: actions/cache@v3
id: cache-env
with:
path: ${{ env.CONDA }}/envs/sscp-env
key:
conda-env-${{ steps.get-date.outputs.today }}-${{ inputs.python-version }}-${{ hashFiles('environment.yml') }}-${{ hashFiles('.github/actions/install-dependencies/**') }}

- name: Clear package cache
# package cache seems to be stale
run:
mamba clean -y --index-cache

shell: bash -el {0}
- name: Update environment
if: steps.cache-env.outputs.cache-hit != 'true'
run:
mamba env update -n sscp-env -f environment.yml
shell: bash -el {0}

- name: List environment
run:
mamba list -n sscp-env
shell: bash -el {0}
pixi-version: v0.44.0
# building cache is slower than not caching
cache: false

4 changes: 2 additions & 2 deletions .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ jobs:
uses: actions/cache@v4
with:
path: _build/.jupyter_cache
key: jupyter-cache-${{ hashFiles('environment.yml') }}
key: jupyter-cache-${{ hashFiles('pixi.lock') }}

- name: Run the lecture notes and build webpage
run:
jupyter-book build . -W
pixi run jupyter-book build . -W

- uses: actions/upload-artifact@v4
# always upload artifact, which can include error messages
Expand Down
8 changes: 6 additions & 2 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ logo: logo.png

# See https://jupyterbook.org/content/execute.html
execute:
exclude_patterns:
- .pixi/*
execute_notebooks: cache
timeout: 1800

# Information about where the book exists on the web
repository:
url: https://github.com/Simula-SSCP/SSCP_2023_lectures # Online location of your book
url: https://github.com/Simula-SSCP/SSCP_lectures # Online location of your book
path_to_book: . # Optional path to your book, relative to the repository root
branch: main # Which branch of the repository should be used when creating links (optional)

Expand Down Expand Up @@ -50,5 +52,7 @@ sphinx:
html_last_updated_fmt: "%b %d, %Y"
suppress_warnings: ["mystnb.unknown_mime_type"]

exclude_patterns: [README.md]
exclude_patterns:
- README.md
- .pixi/*
only_build_toc_files: true
62 changes: 0 additions & 62 deletions environment.yml

This file was deleted.

Loading