|
4 | 4 |
|
5 | 5 | # PyMCNP |
6 | 6 |
|
7 | | -PyMCNP supports running [Monte Carlo N-Particle (MCNP) simulations](https://mcnp.lanl.gov/). It parses MCNP files, enabling automation such as parameter scans, creates MCNP geometry visualization using [cadquery](https://cadquery.readthedocs.io/en/latest/), and can run MCNP in parallel across multiple machines (including support for clusters). PyMCNP provides a Python API for MCNP input and output files and a command line interface for interacting with MCNP and MCNP files. |
| 7 | +PyMCNP supports running [Monte Carlo N-Particle (MCNP) simulations](https://mcnp.lanl.gov/). It parses MCNP files, enabling automation such as parameter scans, creates MCNP geometry visualization using [pyvista](https://pyvista.org). PyMCNP provides a Python API for MCNP input and output files and a command line interface for interacting with MCNP and MCNP files. |
8 | 8 |
|
9 | 9 | Find more information on [ReadTheDocs](https://pymcnp.readthedocs.io). |
10 | 10 |
|
11 | 11 | ## Installation |
12 | 12 |
|
13 | | -PyMCNP is available on [PyPI](https://pypi.org/project/pymcnp/) and can be `pip installed`. |
| 13 | +PyMCNP is available on [PyPI](https://pypi.org/project/pymcnp/) and can be "pip installed": |
14 | 14 |
|
15 | 15 | pip install pymcnp |
16 | 16 |
|
17 | 17 | ## Contributing |
18 | 18 |
|
19 | | -PyMCNP source code is accessable for contributions, suggestions, and bug reports on [GitHub](https://github.com/FSIBT/PyMCNP). The following command downloads PyMCNP source code and installs `pymcnp` and its dependencies in editable mode: |
| 19 | +PyMCNP source code is accessable for contributions, suggestions, and bug reports on [GitHub](https://github.com/FSIBT/PyMCNP): |
20 | 20 |
|
| 21 | + # Installing |
21 | 22 | git clone https://github.com/FSIBT/PyMCNP |
22 | 23 | cd PyMCNP |
23 | 24 | pip install -e . |
24 | 25 |
|
| 26 | + # Running |
| 27 | + pymcnp |
25 | 28 |
|
26 | | -If you plan to contribute, you should also enable `pre-commit`: |
| 29 | +To contribute, use [pre-commit](https://pre-commit.com) and [ruff](https://docs.astral.sh/ruff/): |
27 | 30 |
|
28 | | - pip install pre-commit |
29 | | - # cd into repo |
| 31 | + # Installing |
| 32 | + pip install pre-commit ruff |
| 33 | + cd PyMCNP |
30 | 34 | pre-commit install |
31 | 35 |
|
32 | | -from within the top level directory in the git repository. |
33 | | - |
34 | | -## Testings |
35 | | - |
36 | | -To run the PyMCNP test suite, after clone the PyMCNP GitHub repository, use the following commands to install Pytest ([Docs](https://docs.pytest.org/en/stable/)) inside the PyMCNP directory: |
| 36 | + # Running |
| 37 | + pre-commit |
37 | 38 |
|
38 | | - pip install pytest |
| 39 | +## Testing |
39 | 40 |
|
40 | | -After instaling `pytest`, test the `pymcnp` package by calling the following commands inside the PyMCNP directory: |
| 41 | +To run the PyMCNP test suite, after cloning the PyMCNP GitHub repository, use the following commands to install [pytest](https://docs.pytest.org/en/stable/) with [pytest-cov](https://pytest-cov.readthedocs.io/en/latest/) inside the PyMCNP directory: |
41 | 42 |
|
| 43 | + # Installing |
| 44 | + pip install pytest-cov |
42 | 45 | cd PyMCNP |
43 | 46 | python -m pytest |
44 | 47 |
|
45 | | -## Metaprogramming |
46 | | - |
47 | | -To regenerate the autogenerated, run the following Python script: |
48 | | - |
49 | | - python3 src/pymcnp/_text.py |
| 48 | + # Running |
| 49 | + pytest --cov --cov-report term-missing:skip-covered |
50 | 50 |
|
51 | 51 | ## Copyright and License |
52 | 52 |
|
53 | | -For copyright and license infromation, see the `COPYRIGHT` and `LICENSE` files in the top level directory. |
| 53 | +For copyright and license information, see the `COPYRIGHT` and `LICENSE` files in the top level directory. |
0 commit comments