-
Notifications
You must be signed in to change notification settings - Fork 0
Coding Conventions
Hendrik Roch edited this page Nov 6, 2024
·
6 revisions
All modules in this package follow distinct formatting structure which is summarized in the following:
-
Class members: Names of class members end with an underscore, e.g.
.mass_
-
Setter methods: Names of methods that assign values to members start with 'set', e.g.
.set_mass()
-
Getter methods: Names of methods to get members have the same name as the member without an underscore at the end, e.g.
.mass()
- If not otherwise explicitely stated, all methods that return multiple values return them as numpy array
- SPARKX transitions to static typing. As Python is inherently non-statically typed, we use type hints and return hints and use a linter. This will become an automatic action in the future
To run mypy on your entire project, follow these steps:
Install mypy (if not already installed):
pip install mypy
Navigate to your project directory:
cd /path/to/your/project
Run mypy:
mypy src/sparkx --ignore-missing-imports --show-error-codes --disallow-untyped-defs --disallow-untyped-calls
SPARKX - Software Package for Analyzing Relativistic Kinematics in Collision eXperiments
For the full documentation of the classes and functions visit: https://smash-transport.github.io/sparkx/