Skip to content

Commit 8fd040a

Browse files
move python package listing to docs site page
1 parent 21231ad commit 8fd040a

3 files changed

Lines changed: 67 additions & 12 deletions

File tree

README.md

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -57,21 +57,12 @@ Software Package | Version | Construction Process
5757
[ONNX Runtime](https://github.com/microsoft/onnxruntime) | 1.15.0 | Download pre-built binaries
5858
[Clang](https://clang.llvm.org/) | 18.1.3 | From Ubuntu Repos
5959

60-
A detailed list of all packages installed from ubuntu repositories is given
61-
[here](https://ldmx-software.github.io/dev-build-context/ubuntu-packages.html),
60+
More detailed documentation of the available software is online.
61+
- [Ubuntu Packages](https://ldmx-software.github.io/dev-build-context/ubuntu-packages.html)
62+
- [Python Packages](https://ldmx-software.github.io/dev-build-context/python-packages.html)
6263
and documentation on the workflow and runner used to build the image is
6364
[here](https://ldmx-software.github.io/dev-build-context/runner.html).
6465

65-
### Python Packages for Analyses
66-
Installed in Python 3.
67-
- pip
68-
- Cython
69-
- numpy
70-
- uproot
71-
- matplotlib
72-
- xgboost
73-
- sklearn
74-
7566
### Other Configuration
7667
- SSL Certificates that will be trusted by container are in the `certs` directory
7768

docs/src/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
# Developing
1212
- [Contributing](contributing.md)
1313
- [Ubuntu Packages](ubuntu-packages.md)
14+
- [Python Packages](python-packages.md)
1415
- [Runtime Configuration](runtime-config.md)
1516
- [GitHub Workflows](workflows.md)
1617
- [Legacy Interop](interop.md)

docs/src/python-packages.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Python Packages
2+
3+
Many Python packages are useful for late stage analysis of data,
4+
so many are included within this image to make them readily available
5+
for downstream LDMX collaborators.
6+
7+
## Do you need to use ldmx/dev?
8+
If you are just using Python and supporting libraries (like `uproot`, `awkward`, and `hist`)
9+
for your analysis, then you do not need to use this large and heavy image.
10+
Instead, it is recommended for you to craft your own environment which is lighter (making
11+
it easier to reproduce and move around clusters) and more nimble (allowing you to upgrade
12+
packages if you want to).
13+
14+
```
15+
cd my-analysis
16+
denv init python:3.12 # choose python version
17+
denv pip install scikit-hep # install packages you need
18+
denv pip freeze > requirements.txt # write packages you've used for later reproducibility
19+
git add requirements.txt .denv/config # store the configuration in git with your analysis code
20+
```
21+
22+
Then, using the code in `my-analysis` on any other computer with `denv` installed would
23+
get started by
24+
25+
```
26+
git clone git@github.com:my-username/my-analysis.git
27+
cd my-analysis
28+
denv pip install -r requirements.txt
29+
```
30+
No `denv init` is required since the `.denv/config` is present in the `my-analysis` git repository.
31+
32+
~~~admonish tip title="Necessity of the ldmx/dev Image"
33+
The only time you **need** to use the Python packages within the ldmx/dev image
34+
is if you are using PyROOT (`import ROOT`) or the ldmx-sw ROOT dictionary.
35+
If you use the `scikit-hep` libraries, then you can move to this more nimble
36+
workflow.
37+
~~~
38+
39+
## What's installed?
40+
Many python packages evolve at a faster rate than we build the ldmx/dev image,
41+
so many of the packages installed within the ldmx/dev image will be behind what has
42+
been most recently released.
43+
44+
You can get the full list and specific versions of the Python packages installed
45+
within your ldmx/dev image by running `denv pip freeze`.
46+
The table below is just documentation of the packages we request to be installed
47+
and not the full dependency tree.
48+
49+
- `scikit-hep`
50+
- Meta-package holding [scikit-hep](https://scikit-hep.org/) libraries
51+
- Includes (among others) `uproot`, `mplhep`, `hist`, `awkward`, `pandas`, `vector`, and `pylhe`
52+
- `pyhepmc`
53+
- IO for the HEPMC data format
54+
- `pip`, `wheel`, `setuptools`
55+
- Helpful for packaging and downstream upgrading
56+
- `Cython`
57+
- Write C extensions for Python
58+
- `numba`
59+
- Pre-compile Python functions for performance improvements
60+
- `scikit-learn`, `xgboost`
61+
- Machine Learning libraries
62+
63+

0 commit comments

Comments
 (0)