Skip to content

Commit 8ccdc75

Browse files
Merge pull request #35 from ISISComputingGroup/uv
add docs on uv
2 parents b6c936e + 6360dcc commit 8ccdc75

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

doc/scripting/uv.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# `uv` and python environments
2+
3+
`uv` is a Python package and project manager. See [`uv`'s docs](https://docs.astral.sh/uv/) for more information.
4+
5+
We are currently considering whether we could use it to split up our python processes and use it for python version management on instrument machines.
6+
7+
## `uv` files
8+
9+
- `c:\Instrument\apps\uv\` is the main installation folder for `uv` itself.
10+
- `c:\Instrument\apps\uv\snakes` is the location of individually-versioned python interpreter executables. These are "bare" interpreters, that do not contain any dependencies such as `genie_python`.
11+
- `c:\Instrument\var\tmp\uvcache` is the location of `uv`'s pip download cache. This can safely be deleted and will be recreated as-needed.
12+
13+
## Details of `uv` setup
14+
15+
### IBEX install scripts
16+
17+
`uv` is used for a few things here.
18+
19+
Firstly, installing the python executable itself onto an instrument machine.
20+
21+
Secondly, setting up a temporary virtual environment, which gets deleted at the end of the script, for using the deploy scripts themselves.
22+
23+
### Build jobs e.g. ConfigChecker
24+
25+
`uv` is used for creating a virtual environment for jenkins-run python checks.
26+
27+
It can be used on Github actions CI, but isn't currently.
28+
29+
### Instrument processes
30+
31+
In the future we may consider using `uv` to create and build virtual environments for each respective python process that runs on the NDX. This requires some decisions and subsequent work:
32+
- `uv.lock` files - should we keep them in source, or at least on the build server, then build virtual environments on the NDXes with those specific versions?
33+
- python wheels need to be available for everything we use - the NDXes do not have compilers ie. Visual Studio installed.

0 commit comments

Comments
 (0)