Skip to content

Python code for rapid creation and conversion of radiation transport Monte Carlo (Geant4 and Fluka) geometries

License

Notifications You must be signed in to change notification settings

matbun/pyg4ometry

 
 

Repository files navigation

pyg4ometry

Python code for rapid creation and conversion of radiation transport Monte Carlo (Geant4 and Fluka) geometries.

PyPI GitHub tag (latest by date) GitHub Workflow Status pre-commit Code style: black Codecov GitHub issues GitHub pull requests License DOI Read the Docs

Installing from PyPI

> 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.

Building

> 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.

Manual

Online manual available at https://pyg4ometry.readthedocs.io

Developer commands (for detailed developer notes see readthedocs)

  • Building the manual
    • pip install '.[docs]' to install docs building dependencies
    • cd pyg4ometry/docs
    • make
    • <your browser> build/html/index.html to view the docs
  • Running tests
    • pip install '.[test]' to install test running dependencies
    • pytest
  • Git commit
    • pre-commit
      • pre-commit install to setup pre-commit in source dir (only once)
      • pre-commit run --all-files run pre-commit locally
      • pre-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
  • 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
    • Update the CHANGELOG.md file for generating the release notes

About

Python code for rapid creation and conversion of radiation transport Monte Carlo (Geant4 and Fluka) geometries

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 86.7%
  • C++ 9.0%
  • CMake 2.4%
  • Cython 1.5%
  • ANTLR 0.2%
  • HTML 0.1%
  • Other 0.1%