updated workflow and description

This commit is contained in:
FreekPols 2026-09-01 10:42:37 +02:00
parent 1d30b1102c
commit f0bd553233
4 changed files with 1916 additions and 2283 deletions

View file

@ -6,11 +6,14 @@ Pixi is a package management tool that allows you to install Python, TeachBooks,
We present Pixi here as an alternative installation and workflow to the approach presented in the rest of this documentation. When using Pixi, you do not need to separately install Python, TeachBooks, JupyterLab, or manage a virtual environment. Simply start making your book using the [ten steps](https://teachbooks.tudelft.nl/jupyter-book-manual/draft/external/template/README.html#your-first-teachbook-using-the-github-template) and install the project environment as described below.
## Steps
> If you already have a TeachBooks project, download this [pixi.toml file](../../pixi.toml), place it in the root folder of your project, and follow the steps below.
Using the terminal, navigate to the root folder of your project and run `pixi install`. This will install all necessary software and packages - these are installed in the project folder in `.pixi/`.
1. Install [pixi](https://pixi.prefix.dev/latest/installation/) on your machine
2. Follow [the 10 steps]([ten steps](https://teachbooks.tudelft.nl/jupyter-book-manual/draft/external/template/README.html#your-first-teachbook-using-the-github-template)) to start your Teachbooks project
3. Clone your project to a local folder [see details here](https://teachbooks.io/manual/workflows/branches.html)
4. Using the terminal, navigate to the root folder of your project and run `teachbooks_install`. This will install all necessary software and packages (listed in the requirements.txt file) - these are installed in the project folder in `.pixi/`.
In the pixi.toml file we have created three tasks:
- `pixi run editor` this will start jupyterlab as the editor for both markdown and jupyternotebooks
@ -19,7 +22,7 @@ In the pixi.toml file we have created three tasks:
## Add dependencies
In the pixi.toml file, we included some of the most used depencies. If you want to add packages, use `pixi add <packages>` or if it is only available through pypi, use `pixi add --pypi <packages>`. Pixi adds the dependency to your project and updates the environment.
In the requirements file we included some of the most used depencies. If you want to add packages, add them to the requirements file and run again `pixi run teachbooks_install`. Pixi will then add the dependency to your project and updates the environment.
## Editing with Jupyter lab
As an alternative to VSC, JupyterLab can be used to edit of your Jupyter Notebook and Markdown files. Start JupyterLab by running `pixi run editor`

4176
pixi.lock generated

File diff suppressed because it is too large Load diff

View file

@ -2,24 +2,18 @@
authors = ["FreekPols <c.f.j.pols@tudelft.nl>"]
channels = ["conda-forge"]
name = "manual"
platforms = ["win-64"]
platforms = ["win-64", "linux-64", "osx-64", "osx-arm64"]
version = "0.1.0"
[tasks]
teachbooks = "teachbooks build book"
server = "teachbooks serve"
editor = "jupyter lab"
teachbooks_install = "pixi import --format=pypi-txt --environment=default requirements.txt"
[dependencies]
python = ">=3.14.7,<3.15"
jupyterlab = ">=4.6.3,<5"
numpy = ">=2.5.2,<3"
matplotlib = ">=3.11.1,<4"
[pypi-dependencies]
teachbooks = ">=0.2.5, <0.3"
teachbooks-favourites = { git = "https://github.com/TeachBooks/TeachBooks-Favourites.git" }
sphinx-inline-tabs = ">=2025.12.21.14, <2026"
sphinx-apa-references = ">=1.0.1, <2"
jupyterlab-myst = ">=2.7.0, <3"
teachbooks-sphinx-grasple = ">=1.3.0, <2"

View file

@ -1,7 +1,7 @@
teachbooks == 0.2.5
sphinx-inline-tabs
git+https://github.com/TeachBooks/TeachBooks-Favourites@all_authors
teachbooks-favourites @ git+https://github.com/TeachBooks/TeachBooks-Favourites@all_authors
teachbooks-sphinx-grasple