Wilson is a 3D visualization tool aimed for (astro) particle physics. It provides a python package for creating event files / catalogues and a static web based app for viewing them in your browser written using TypeScript.
The Python package is hosted on PyPI and can simply be
installed using pip
:
pip install wilson3d
Note that it is wilson3d
not wilson
.
For deployment, it's enough to just copy the build files onto your server. Since it's a static app, a simple file serving is enough.
You can also run the app locally if you have installed the Python package using a command line:
wilson
You can also pass a file or directory to serve. If you pass a file a new tab in your browser should open showing the file:
wilson event.wlsn
For building the python package a npm script is provided. On Linux using yarn you can simply run
yarn buildpy
This handles several steps:
- Builds the web app, as it is used within the Python package
- Bundles the web app into
app.zip
stored in the package root source directory - Runs
python3 -m build
- Checks the build via
python3 -m twine check dist/wilson*
After building finished, you can install it via
pip install dist/wilson*.whl
- Install yarn. It will handle all further steps for you through its CLI.
- Fetch dependencies by running
yarn
from the repository root - Issue the build command via
yarn build
- The build files are now in the
dist
subdirectory.
The documentation is generated via Sphinx. To install the necessary dependencies you can simply run:
pip install -r docs/requirements.txt
Afterwards you can build the documentation via
cd docs
make html
The repository uses static code analyzing tools like linters. Namely they are:
There exist yarn scripts for easier use:
yarn lint # typescript
yarn black # python black
See proto for a detailed description of the event file format.