Skip to content

Commit 7c9c9b4

Browse files
author
Arun Persaud
committed
docs: use extra requirements for building docs, update docs
1 parent 2a4e4e9 commit 7c9c9b4

File tree

4 files changed

+40
-13
lines changed

4 files changed

+40
-13
lines changed

.readthedocs.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,6 @@ sphinx:
2121
python:
2222
install:
2323
- method: pip
24-
path: .
24+
path: .
25+
extra_requirements:
26+
- docs

docs/source/contributing.md

+15-6
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,40 @@ The best way to connect with us is to create a github issue.
88

99
## Installing
1010

11-
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:
11+
PyMCNP source code is accessable for contributions, suggestions, and
12+
bug reports on [GitHub](https://github.com/FSIBT/PyMCNP). The
13+
following command downloads PyMCNP source code and installs `pymcnp`
14+
and its dependencies in editable mode:
1215

1316
git clone https://github.com/FSIBT/PyMCNP
1417
cd PyMCNP
15-
pip install -e .
18+
pip install -e .[docs]
1619

1720
## Code formatting, pre-commit, etc.
1821

19-
If you plan to contribute, you should also enable `pre-commit`
22+
If you plan to contribute, you should also enable [pre-commit](https://pre-commit.com/):
2023

2124
pip install pre-commit
2225
# cd into repo
2326
pre-commit install
2427

25-
from within the top level directory in the git repository. Pre-commit will ensure that the code is formatted using ruff and that it will match the coding style in our repository.
28+
from within the top level directory in the git repository. Pre-commit
29+
will ensure that the code is formatted using ruff and that it will
30+
match the coding style in our repository.
2631

2732
We are happy to receive pull requests on github.
2833

2934
## Testings
3035

31-
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+
To run the PyMCNP test suite, after clone the PyMCNP GitHub
37+
repository, use the following commands to install Pytest
38+
([Docs](https://docs.pytest.org/en/stable/)) inside the PyMCNP
39+
directory:
3240

3341
pip install pytest
3442

35-
After instaling `pytest`, test the `pymcnp` package by calling the following commands inside the PyMCNP directory:
43+
After instaling `pytest`, test the `pymcnp` package by calling the
44+
following commands inside the PyMCNP directory:
3645

3746
cd PyMCNP
3847
python -m pytest

docs/source/installation.md

+15-2
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,27 @@ PyMCNP is available on [PyPI](https://pypi.org/project/pymcnp/) and can be `pip
66

77
pip install pymcnp
88

9+
## Latest Version
10+
11+
The latest pre-release version can be installed directly from Github:
12+
13+
pip install git+https://github.com/FSIBT/PyMCNP
914

1015
## Developer Version
1116

12-
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:
17+
PyMCNP source code is accessable for contributions, suggestions, and
18+
bug reports on [GitHub](https://github.com/FSIBT/PyMCNP). The
19+
following command downloads PyMCNP source code and installs `pymcnp`
20+
and its dependencies in editable mode:
1321

1422
git clone https://github.com/FSIBT/PyMCNP
1523
cd PyMCNP
1624
pip install -e .
1725

1826

19-
If you plan to contribute, please also check out the Contribution guidelines.
27+
To also be able to build the documentation, you should uses
28+
29+
pip install -e .[docs]
30+
31+
If you plan to contribute, please also check out the [Contribution](contributing.md)
32+
guidelines.

pyproject.toml

+7-4
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,22 @@ classifiers = [
2727
"Topic :: Scientific/Engineering :: Physics",
2828
]
2929
dependencies = [
30-
"Sphinx",
3130
"docopt",
31+
"fastparquet",
3232
"matplotlib",
3333
"molmass",
34-
"myst_parser",
3534
"numpy",
3635
"pandas",
3736
"pytest",
38-
"fastparquet",
3937
"rich",
4038
"scipy",
39+
]
40+
41+
[project.optional-dependencies]
42+
docs = [
43+
"myst_parser",
44+
"Sphinx",
4145
"sphinx_rtd_theme",
42-
"molmass",
4346
]
4447

4548
[project.urls]

0 commit comments

Comments
 (0)