Contributing

We welcome contributions to code, documentation, tests, and files, just create a GitHub issue.

Contributing

PyMCNP source code is accessible for contributions, suggestions, and bug reports on GitHub:

# Installing
git clone https://github.com/FSIBT/PyMCNP
cd PyMCNP
pip install -e .[dev]

# Running
pymcnp

To contribute, use pre-commit and ruff. These will be automatically included when using the optional dev dependency.

# Installing
cd PyMCNP
pre-commit install

Testing

To run the PyMCNP test suite, after cloning the PyMCNP GitHub repository, use the following commands to install pytest with pytest-cov inside the PyMCNP directory. This can be done automatically using the test dependency. By default coverage and testmon will be used with pytest.

# Installing
cd PyMCNP
pip install -e .[test]
python -m pytest

# Running
pytest --cov --cov-report term-missing:skip-covered

Documenting

To rebuild the documentation using Sphinx and Napolean. This can be done automatically using the doc dependency.

# Installing
pip install -e .[doc]

# Running
cd docs
make html