Python code for rapid creation and conversion of radiation transport Monte Carlo (Geant4 and Fluka) geometries.
> pip install pyg4ometry
Note
Most dependencies are available from pip but you will need to install OpenCASCADE cgal, mpfr, gmp, ROOT. Find here installers for Ubuntu and MacOS.
> git clone https://github.com/g4edge/pyg4ometry.git
> cd pyg4ometry
> pip install . # add --editable for a version which you can edit
Note
If you update your Git clone and the pybind11 C++ has changes you will need to reinstall and thus trigger a rebuild.
Online manual available at https://pyg4ometry.readthedocs.io
- Building the manual
pip install '.[docs]'
to install docs building dependenciescd pyg4ometry/docs
make
<your browser> build/html/index.html
to view the docs
- Running tests
pip install '.[test]'
to install test running dependenciespytest
- Git commit
- pre-commit
pre-commit install
to setup pre-commit in source dir (only once)pre-commit run --all-files
run pre-commit locallypre-commit run --all-files black
run only black
- messages
- Start commit message with
submodule : (type of change) detailed notes
- e.g
pycgal : (extra functionality) more 2d mesh processing
- Start commit message with
- pre-commit
- Pull requests
- PR messages should just explain the change in a concise way as they will form part of the change log
- e.g
FLUKA region viewer
- e.g
- Update the CHANGELOG.md file for generating the release notes
- PR messages should just explain the change in a concise way as they will form part of the change log