-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from RHammond2/docs/create-jupyter-book
Documentation: Create a base site
- Loading branch information
Showing
73 changed files
with
2,523 additions
and
52 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
# Contributing | ||
|
||
We welcome contributions in the form of bug reports, bug fixes, improvements to the documentation, | ||
ideas for enhancements (or the enhancements themselves!). | ||
|
||
You can find a [list of current issues](https://github.com/NREL/GreenHEART/issues) in the project's | ||
GitHub repo. Feel free to tackle any existing bugs or enhancement ideas by submitting a | ||
[pull request](https://github.com/NREL/GreenHEART/pulls). | ||
|
||
## Bug Reports | ||
|
||
* Please include a short (but detailed) Python snippet or explanation for reproducing the problem. | ||
Attach or include a link to any input files that will be needed to reproduce the error. | ||
* Explain the behavior you expected, and how what you got differed. | ||
|
||
## Pull Requests | ||
|
||
* Please reference relevant GitHub issues in your commit message using `GH123` or `#123`. | ||
* Changes should be [PEP8](http://www.python.org/dev/peps/pep-0008/) compatible. | ||
* Keep style fixes to a separate commit to make your pull request more readable. | ||
* Docstrings are required and should follow the | ||
[Google style](https://www.sphinx-doc.org/en/master/usage/extensions/example_google.html). | ||
* When you start working on a pull request, start by creating a new branch pointing at the latest | ||
commit on [main](https://github.com/NREL/GreenHEART). | ||
* The GreenHEART copyright policy is detailed in the [`LICENSE`](https://github.com/NREL/GreenHEART/blob/main/LICENSE). | ||
|
||
## Documentation | ||
|
||
When contributing new features, or fixing existing capabilities, be sure to add and/or update the | ||
docstrings as needed to ensure the documentation site stays up to date with the latest changes. | ||
|
||
To build the documentation locally, the following command can be run in your terminal in the main | ||
directory of the repository. | ||
|
||
```bash | ||
jupyter-book build docs/ | ||
``` | ||
|
||
In addition to generating the documentation, be sure to check the results by opening the following | ||
path in your browser: `file:///<path-to-greenheart>/GreenHEART/docs/_build/html/index.html`. | ||
|
||
```{note} | ||
If the browser appears to be out of date from what you expected to built, please try the following: | ||
1. Reload the page | ||
2. Clear your browser's cache and open the page again. | ||
``` | ||
|
||
## Tests | ||
|
||
The test suite can be run using `pytest tests/greenheart`. Individual test files can be run by specifying them: | ||
|
||
```bash | ||
pytest tests/greenheart/test_hybrid.py | ||
``` | ||
|
||
and individual tests can be run within those files | ||
|
||
```bash | ||
pytest tests/greenheart/test_hybrid.py::test_greenheart_system | ||
``` | ||
|
||
When you push to your fork, or open a PR, your tests will be run against the | ||
[Continuous Integration (CI)](https://github.com/NREL/HOPP/actions) suite. This will start a build | ||
that runs all tests on your branch against multiple Python versions, and will also test | ||
documentation builds. | ||
|
||
## Release Process | ||
|
||
### Standard | ||
|
||
Most contributions will be into the `develop` branch, and once the threshold for a release has been | ||
met the following steps should be taken to create a new release | ||
|
||
1. On `develop`, bump the version appropriately, see the | ||
[semantic versioning guidelines](https://semver.org/) for details. | ||
2. Open a pull request from `develop` into `main`. | ||
3. When all CI tests pass, and the PR has been approved, merge the PR into main. | ||
4. Pull the latest changes from GitHub into the local copy of the main branch. | ||
5. Tag the latest commit to match the version bump in step 1 (replace "v0.1" in all instances below), | ||
and push it to the repository. | ||
|
||
```bash | ||
git tag -a v0.1 -m "v0.1 release" | ||
git push --orign v0.1 | ||
``` | ||
|
||
6. Check that the | ||
[Test PyPI GitHub Action](https://github.com/NREL/GreenHEART/actions/workflows/publish_to_test_pypi.yml) | ||
has run successfully. | ||
1. If the action failed, identify and fix the issue, then | ||
2. delete the local and remote tag using the following (replace "v0.1" in all instances just like | ||
in step 5): | ||
|
||
```bash | ||
git tag -d v0.1 | ||
git push --delete origin v0.1 | ||
``` | ||
|
||
3. Start back at step 1. | ||
7. When the Test PyPI Action has successfully run, | ||
[create a new release](https://github.com/NREL/GreenHEART/releases/new) using the tag created in | ||
step 5. | ||
|
||
### Patches | ||
|
||
Any pull requests directly into the main branch that alter the GreenHEART model (excludes anything | ||
in `docs/`, or outside of `greenheart/` and `tests/`), should be sure to follow the instructions | ||
below: | ||
|
||
1. All CI tests pass and the patch version has been bumped according to the | ||
[semantic versioning guidelines](https://semver.org/). | ||
2. Follow steps 4 through 7 above. | ||
3. Merge the NREL main branch back into the develop branch and push the changes. |
42 changes: 42 additions & 0 deletions
42
docs/_autosummary/greenheart.simulation.greenheart_simulation.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
greenheart.simulation.greenheart\_simulation | ||
============================================ | ||
|
||
.. automodule:: greenheart.simulation.greenheart_simulation | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
.. rubric:: Functions | ||
|
||
.. autosummary:: | ||
|
||
run_design_options | ||
run_policy_options_storage_types | ||
run_policy_storage_design_options | ||
run_simulation | ||
run_storage_options | ||
run_sweeps | ||
setup_greenheart_simulation | ||
|
||
|
||
|
||
|
||
|
||
.. rubric:: Classes | ||
|
||
.. autosummary:: | ||
|
||
GreenHeartSimulationConfig | ||
GreenHeartSimulationOutput | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
greenheart.simulation | ||
===================== | ||
|
||
.. automodule:: greenheart.simulation | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
.. rubric:: Modules | ||
|
||
.. autosummary:: | ||
:toctree: | ||
:recursive: | ||
|
||
greenheart.simulation.greenheart_simulation | ||
greenheart.simulation.technologies | ||
|
46 changes: 46 additions & 0 deletions
46
docs/_autosummary/greenheart.simulation.technologies.ammonia.ammonia.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
greenheart.simulation.technologies.ammonia.ammonia | ||
================================================== | ||
|
||
.. automodule:: greenheart.simulation.technologies.ammonia.ammonia | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
.. rubric:: Functions | ||
|
||
.. autosummary:: | ||
|
||
run_ammonia_cost_model | ||
run_ammonia_finance_model | ||
run_ammonia_full_model | ||
run_ammonia_model | ||
run_size_ammonia_plant_capacity | ||
|
||
|
||
|
||
|
||
|
||
.. rubric:: Classes | ||
|
||
.. autosummary:: | ||
|
||
AmmoniaCapacityModelConfig | ||
AmmoniaCapacityModelOutputs | ||
AmmoniaCostModelConfig | ||
AmmoniaCostModelOutputs | ||
AmmoniaCosts | ||
AmmoniaFinanceModelConfig | ||
AmmoniaFinanceModelOutputs | ||
Feedstocks | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
31 changes: 31 additions & 0 deletions
31
docs/_autosummary/greenheart.simulation.technologies.ammonia.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
greenheart.simulation.technologies.ammonia | ||
========================================== | ||
|
||
.. automodule:: greenheart.simulation.technologies.ammonia | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
.. rubric:: Modules | ||
|
||
.. autosummary:: | ||
:toctree: | ||
:recursive: | ||
|
||
greenheart.simulation.technologies.ammonia.ammonia | ||
|
29 changes: 29 additions & 0 deletions
29
.../_autosummary/greenheart.simulation.technologies.hydrogen.desal.desal_model.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
greenheart.simulation.technologies.hydrogen.desal.desal\_model | ||
============================================================== | ||
|
||
.. automodule:: greenheart.simulation.technologies.hydrogen.desal.desal_model | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
.. rubric:: Functions | ||
|
||
.. autosummary:: | ||
|
||
RO_desal | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
29 changes: 29 additions & 0 deletions
29
...tosummary/greenheart.simulation.technologies.hydrogen.desal.desal_model_eco.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
greenheart.simulation.technologies.hydrogen.desal.desal\_model\_eco | ||
=================================================================== | ||
|
||
.. automodule:: greenheart.simulation.technologies.hydrogen.desal.desal_model_eco | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
.. rubric:: Functions | ||
|
||
.. autosummary:: | ||
|
||
RO_desal_eco | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
Oops, something went wrong.