. ¶
install-locked-env ¶
I take some time to write a small utility for Fluiddyn users and students.
With UV and Pixi installed, it is now possible to install a good production environment for running parallel simulations with Fluidsim and MPI with just this command:
uvx install-locked-env https://github.com/fluiddyn/fluidsim/tree/branch/default/pixi-envs/env-fluidsim-mpi
A strong advantage is that the environment is locked so we can be sure that one would get exactly the same environment than we I created (and tested) it. It means that there is a high probability that it’s just going to work without weird issues.
I think it can be useful to other people so I write a short note here.
The project is available on PyPI and hosted on foss.heptapod.net .
The project now supports different web platform (GitHub, GitLab and Heptapod) and different types of lock files (pylock.toml, uv.lock, pdm.lock, pixi.lock).
To learn more about install-locked-file, read its README .
Coding with Claude.ia ¶
An interesting aspect in terms of programming is that I wrote install-locked-file with the help of Claude. I use this LLM in a very naive way just with the web chat (i.e. not with an agent that would be able to locally modify files and commit changes). I also continue to code and refactor manually some parts. I tend to wait for Toad to test coding with generative AI agents.
Even like that, it’s very useful and nice for me and it largely improves my productivity.
For example, I was able to get a quite satisfying state for
install-locked-env
in few
hours. It is also nice since I learn things and I struggle less for boring stuff.
I also see that to produce clean and good code, the models available in late 2025 still need a strong guidance of an experienced programmer. It still makes sense to learn Python (and potentially other programming languages) in 2025 and I’m happy that we have py-edu-fr .
Future ¶
It might become possible to do with UV things like
uv venv -r https://foss.heptapod.net/fluiddyn/install-locked-env/-/raw/branch/default/envs/env-pdm-pylock/pylock.toml
which would be convenient and quite similar to what can already be done with
uvx install-locked-env https://foss.heptapod.net/fluiddyn/install-locked-env/-/tree/branch/default/envs/env-pdm-pylock
It’s nice but
install-locked-env
will still be simpler and more adapted for students
(in particular with automatic registration of a Jupyter kernel). Moreover, it will
continue to be one tool supporting different locked file formats (in particular uv.lock
and Pixi).
Note that the
uv
venv
command creates by default a virtual environment in a directory
.venv
and does not save the lock file.
In contract,
install-locked-env
does things reasonable for this task (good automatic
directory name and useful files saved):
$ uvx install-locked-env https://foss.heptapod.net/fluiddyn/install-locked-env/-/tree/branch/default/envs/env-pdm-pylock
✓ Detected heptapod repository
Repository: fluiddyn/install-locked-env
Path: envs/env-pdm-pylock
✓ Downloaded 2 file(s)
Environment type: uv-pylock
✓ Saved files to /home/users/augier3pi/tmp/env-pdm-pylock
pyproject.toml, pylock.toml
log file installation: env-pdm-pylock/log_install.txt
✓ Installed environment: env-pdm-pylock
⚠ ipykernel not found, skipping kernel registration
Installation complete!
Activate with: source env-pdm-pylock/.venv/bin/activate
$ ls env-pdm-pylock/
log_install.txt pylock.toml pyproject.toml