Skip to content

WireCell/wire-cell-python

Repository files navigation

Wire Cell Toolkit Python

What’s here.

This package provides Python modules in the wirecell namespace as well as various wirecell-* command line programs. These support the Wire Cell Toolkit but do not depend on it. If this package is available during the WCT build process then some additonal unit tests can run using wirecell-* programs.

Some of the functionality provided includes converters and generators of major WCT input data files including:

  • field response functions
  • wire geometry
  • diagnostic plots

Installation

It is recommended to use uv for user and developer tasks.

User

You can use “uv run” to run the command line programs “live”:

uv run --with git+https://github.com/wirecell/wire-cell-python wirecell-util --help

Or to install as a “uv tool”

uv tool install git+https://github.com/wirecell/wire-cell-python
wcpy util  --help

To later upgrade

uv tool upgrade wirecell

Or to later uninstall

uv tool uninstall wirecell

Developer

git clone git@github.com:WireCell/wire-cell-python.git
cd wire-cell-python
uv sync
uv run wcpy util --help

This will use a local virtualenv which does not require explicit activation when using uv run. Or, you may do the usual

source .venv/bin/activate
wcpy util --help

Optional dependencies

Some dependencies are optional and not installed by default. In particular, PyTorch is a very large package and not generally required and so is kept optional. In order to use optional functionality must add torch to the commands above:

For “live” running:

uv run --with torch --with git+https://github.com/wirecell/wire-cell-python wcpy util --help

For “tool” based installation:

uv tool install --with torch git+https://github.com/wirecell/wire-cell-python

For developers, the “sync” command needs additional info:

uv sync --all-extras

Documentation

In addition to the online -h/--help for main and sub commands, some notes on specific aspects are in docs/. Some in particular

About

Python modules in support of Wire Cell

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 7