Skip to content

Commit 01202ab

Browse files
committed
Add support for using uv.
1 parent 3d5e1ea commit 01202ab

File tree

2 files changed

+76
-41
lines changed

2 files changed

+76
-41
lines changed

README.org

Lines changed: 17 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -2,64 +2,40 @@
22

33
* What's here.
44

5-
This package holds some Python modules that support Wire Cell Toolkit.
6-
Currently this is a stand-alone package that does not depend directly
7-
on the C++ packages of WCT.
5+
This package provides Python modules in the ~wirecell~ namespace as well as
6+
various ~wirecell-*~ command line programs. These support the Wire Cell Toolkit
7+
but do not depend on it. If this package is available during the WCT build
8+
process then some additonal unit tests can run using ~wirecell-*~ programs.
89

9-
Some of the functionality provided includes converters and generators
10-
of major WCT input data files including:
10+
Some of the functionality provided includes converters and generators of major
11+
WCT input data files including:
1112

1213
- field response functions
1314
- wire geometry
1415
- diagnostic plots
1516

1617
* Installation
1718

18-
#+BEGIN_EXAMPLE
19-
$ python3 -m venv venv
20-
$ source venv/bin/activate
21-
$ cd wire-cell-python
22-
$ pip install -r requirements/base.txt
23-
$ pip install -r requirements/img.txt
24-
$ pip install -r requirements/sigproc.txt
25-
$ pip install -e .
26-
#+END_EXAMPLE
19+
It is recommended to use [[https://github.com/astral-sh/uv][uv]] for user and developer tasks.
2720

28-
If you have trouble installing ~mayavi~ via ~pip~ consider installing it
29-
as a system package and then making the ~venv~ with:
21+
** User
22+
23+
The package is not yet available in PyPI but the command line programs can be used like:
3024

3125
#+begin_example
32-
$ python3 -m venv venv --system-site-packages
26+
uv run --with git+https://github.com/wirecell/wire-cell-python wirecell-util --help
3327
#+end_example
3428

35-
If you have trouble installing ~gojsonnet~ via ~pip~ consider replacing it
36-
to ~jsonnet~ in requirements/base.txt and setup.py. In addition, commenting
37-
out ~moo~ in setup.py might also help decouple with ~gojsonnet~
38-
39-
* Use
40-
41-
In fresh shells must repeat:
42-
43-
#+BEGIN_EXAMPLE
44-
$ source venv/bin/activate
45-
#+END_EXAMPLE
46-
47-
* Others
48-
49-
50-
** ZIO
51-
52-
The ZIO Python package can provide some functionality that WCT may
53-
make use of (flow/domo brokers). It's installation is somewhat
54-
irregular so a script is provided to help. It will also install the
55-
~wirecell~ Python module.
29+
** Developer
5630

5731
#+begin_example
58-
$ python3 -m venv venv
59-
$ source venv/bin/activate
60-
$ ./zioinst.sh
32+
git clone [email protected]:WireCell/wire-cell-python.git
33+
cd wire-cell-python
34+
uv sync
35+
uv run wirecell-util --help
6136
#+end_example
6237

38+
6339
* Command line interfaces
6440

6541
Each main ~wirecell.<module>~ exposes most of its functionality via a

pyproject.toml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
[project]
2+
name = "wirecell"
3+
version = "0.1.0"
4+
description = "Add your description here"
5+
requires-python = ">=3.11"
6+
readme = {file = "README.org", content-type = "text/org"}
7+
authors = [
8+
{ name = "Brett Viren", email = "[email protected]" }
9+
]
10+
11+
dependencies = [
12+
"anyconfig>=0.14.0",
13+
"click>=8.1.8",
14+
"gojsonnet>=0.21.0",
15+
"h5py>=3.13.0",
16+
"jsonnet>=0.21.0",
17+
"matplotlib>=3.9.4",
18+
"networkx>=3.2.1",
19+
"numpy>=2.0.2",
20+
"scipy>=1.15.3",
21+
"semver>=3.0.4",
22+
"sqlalchemy>=2.0.41",
23+
]
24+
25+
26+
[project.scripts]
27+
wirecell-sigproc = "wirecell.sigproc.__main__:main"
28+
wirecell-util = "wirecell.util.__main__:main"
29+
wirecell-gen = "wirecell.gen.__main__:main"
30+
wirecell-pgraph = "wirecell.pgraph.__main__:main"
31+
wirecell-resp = "wirecell.resp.__main__:main"
32+
wirecell-plot = "wirecell.plot.__main__:main"
33+
wirecell-aux = "wirecell.aux.__main__:main"
34+
wirecell-ls4gan = "wirecell.ls4gan.__main__:main"
35+
wirecell-validate = "wirecell.validate.__main__:main"
36+
wirecell-img = "wirecell.img.__main__:main"
37+
wirecell-test = "wirecell.test.__main__:main"
38+
39+
# needs torch
40+
wirecell-dnn = "wirecell.dnn.__main__:main"
41+
wirecell-pytorch = "wirecell.pytorch.__main__:main"
42+
43+
[project.optional-dependencies]
44+
torch = [
45+
"torch>=2.7.0",
46+
]
47+
48+
# other dependencies to take care of gravio, gvanim, shapely, tvtk, mlflow, pygraphviz, ROOT, semver,
49+
50+
[build-system]
51+
requires = ["setuptools"]
52+
build-backend = "setuptools.build_meta"
53+
54+
# we have non-standard directory layout where the top module is right here and
55+
# not under src.
56+
[tool.setuptools]
57+
package-dir = {"" = "."}
58+
[tool.setuptools.packages.find]
59+
where = ["."]

0 commit comments

Comments
 (0)