Skip to content

Commit cd6aa02

Browse files
authored
Merge pull request #267 from xylar/add-spack-to-docs
Add documentation for `mache.spack`
2 parents 8bfcdb7 + e901fb8 commit cd6aa02

File tree

11 files changed

+635
-336
lines changed

11 files changed

+635
-336
lines changed

.github/pull_request_template.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,17 @@ Please add a description of what is accomplished in the PR here at the top:
44
-->
55

66
<!--
7-
Below are a few things we ask you or your reviewers to kindly check.
7+
Below are a few things we ask you or your reviewers to kindly check.
88
***Remove checks that are not relevant by deleting the line(s) below.***
99
-->
1010
Checklist
11-
* [ ] Developer's Guide has been updated
12-
* [ ] API documentation in the Developer's Guide (`api.md`) has any new or modified class, method and/or functions listed
13-
* [ ] Documentation has been [built locally](https://docs.e3sm.org/mache/main/developers_guide/building_docs.html) and changes look as expected
14-
* [ ] `Testing` comment in the PR documents testing used to verify the changes
11+
- [ ] User's Guide has been updated if needed
12+
- [ ] Developer's Guide has been updated if needed
13+
- [ ] API documentation lists any new or modified class, method, or function
14+
- [ ] Documentation [builds](https://docs.e3sm.org/mache/main/developers_guide/building_docs.html) cleanly and changes look as expected
15+
- [ ] Tests pass and new features are covered by tests
16+
- [ ] PR description includes a summary and any relevant issue references
17+
- [ ] `Testing` comment, if appropriate, in the PR documents testing used to verify the changes
1518

1619
<!--
1720
Please note any issues this fixes using closing keywords: https://help.github.com/articles/closing-issues-using-keywords

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@
6464

6565
intersphinx_mapping = {
6666
'geometric_features':
67-
('https://mpas-dev.github.io/geometric_features/stable', None),
67+
('https://mpas-dev.github.io/geometric_features/main', None),
6868
'matplotlib': ('https://matplotlib.org/stable', None),
69-
'mpas_tools': ('https://mpas-dev.github.io/MPAS-Tools/stable', None),
69+
'mpas_tools': ('https://mpas-dev.github.io/MPAS-Tools/master', None),
7070
'numpy': ('https://numpy.org/doc/stable', None),
7171
'python': ('https://docs.python.org', None),
7272
'scipy': ('https://docs.scipy.org/doc/scipy/reference', None),

docs/developers_guide/api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ documentation.
3131
## spack
3232

3333
```{eval-rst}
34-
.. currentmodule:: mache.spack.templates
34+
.. currentmodule:: mache.spack
3535
3636
.. autosummary::
3737
:toctree: generated/
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Contributing to mache
2+
3+
Thank you for your interest in contributing to `mache`! We welcome
4+
contributions of all kinds, including bug reports, feature requests, code, and
5+
documentation improvements.
6+
7+
## How to Contribute
8+
9+
- **Bug Reports & Feature Requests:**
10+
Please use [GitHub Issues](https://github.com/E3SM-Project/mache/issues) to
11+
report bugs or request features.
12+
13+
- **Pull Requests:**
14+
Fork the repository, create a new branch for your changes, and submit a pull
15+
request (PR) to the `main` branch. Please provide a clear description of
16+
your changes.
17+
18+
## Development Environment
19+
20+
1. **Set up an isolated environment:**
21+
```bash
22+
conda config --add channels conda-forge
23+
conda config --set channel_priority strict
24+
conda create -y -n mache_dev --file spec-file.txt
25+
conda activate mache_dev
26+
python -m pip install --no-deps --no-build-isolation -e .
27+
```
28+
29+
2. **Install pre-commit hooks:**
30+
```bash
31+
pre-commit install
32+
```
33+
This ensures code style and quality checks run automatically on each
34+
commit.
35+
36+
## Code Style and Linting
37+
38+
- Follow [PEP8](https://peps.python.org/pep-0008/) and project code style.
39+
- The following tools are used (via [pre-commit](https://pre-commit.com/)):
40+
- [ruff](https://docs.astral.sh/ruff/) for linting and formatting
41+
- [flynt](https://github.com/ikamensh/flynt) for f-string conversion
42+
- [mypy](https://mypy-lang.org/) for type checking
43+
44+
If a pre-commit hook fails, fix the reported issues and recommit.
45+
46+
## Testing
47+
48+
- Add or update tests for new features or bug fixes.
49+
- Run the test suite before submitting a PR:
50+
```bash
51+
pytest
52+
```
53+
54+
## Documentation
55+
56+
- Document all public functions and classes using docstrings.
57+
- Update the [API documentation](api.md) if you add or modify public APIs.
58+
- Build and preview the documentation locally:
59+
```bash
60+
cd docs
61+
DOCS_VERSION=test make clean versioned-html
62+
```
63+
64+
## Pull Request Checklist
65+
66+
- [ ] User's Guide has been updated if needed
67+
- [ ] Developer's Guide has been updated if needed
68+
- [ ] API documentation lists any new or modified class, method, or function
69+
- [ ] Documentation builds cleanly and changes look as expected
70+
- [ ] Tests pass and new features are covered by tests
71+
- [ ] PR description includes a summary and any relevant issue references
72+
- [ ] `Testing` comment, if appropriate, in the PR documents testing used to verify the changes
73+
74+
Thank you for helping improve `mache`!

0 commit comments

Comments
 (0)