-
Notifications
You must be signed in to change notification settings - Fork 45
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 #365 from RHammond2/release-prep
GreenHEART Release Preparation
- Loading branch information
Showing
457 changed files
with
300 additions
and
302,109 deletions.
There are no files selected for viewing
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
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,34 @@ | ||
name: Upload to PyPi | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | ||
environment: | ||
name: pypi-publishing | ||
url: https://test.pypi.org/p/greenheart | ||
permissions: | ||
id-token: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.9 | ||
- name: Build package | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools build wheel twine | ||
python -m build | ||
twine check --strict dist/* | ||
- name: Publish package to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
verbose: True | ||
repository-url: https://test.pypi.org/legacy/ | ||
|
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# CHANGELOG | ||
|
||
## v0.1 [16 October 2024] | ||
|
||
- Project has been separated from HOPP and moved into GreenHEART, removing all HOPP infrastructure. |
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 |
---|---|---|
@@ -1,105 +1,138 @@ | ||
# Packages | ||
# Packages | ||
|
||
## HOPP: Hybrid Optimization and Performance Platform | ||
## GreenHEART: Green Hydrogen Energy and Renewable Technologies | ||
|
||
![CI Tests](https://github.com/NREL/HOPP/actions/workflows/ci.yml/badge.svg) | ||
[![PyPI version](https://badge.fury.io/py/greeheart.svg)](https://badge.fury.io/py/hopp) | ||
![CI Tests](https://github.com/NREL/GreenHEART/actions/workflows/ci.yml/badge.svg) | ||
[![image](https://img.shields.io/pypi/pyversions/greeheart.svg)](https://pypi.python.org/pypi/greeheart) | ||
[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) | ||
|
||
As part of NREL's [Hybrid Energy Systems Research](https://www.nrel.gov/wind/hybrid-energy-systems-research.html), this | ||
software assesses optimal designs for the deployment of utility-scale hybrid energy plants, particularly considering wind, | ||
solar and storage. | ||
Hybrid project power-to-x component-level system performance and financial modeling for control and | ||
design optimization. Currently includes renewable energy, hydrogen, ammonia, and steel. Other | ||
elements such as desalination systems, pipelines, compressors, and storage systems can also be | ||
included as needed. | ||
|
||
## GreenHEART: Grean Hydrogen Energy and Renewable Technologies | ||
Hybrid project power-to-x component-level system performance and financial modeling for control and design optimization. Currently includes renewable energy, hydrogen, ammonia, and steel. Other elements such as desalination systems, pipelines, compressors, and storage systems can also be included as needed. | ||
|
||
`greenheart` will install alongside `hopp` by following the instructions for installing HOPP from source. | ||
`greenheart` will install alongside `hopp` by following the instructions for installing HOPP from | ||
source. | ||
|
||
## Software requirements | ||
|
||
- Python version 3.8, 3.9, 3.10 64-bit | ||
- Other versions may still work, but have not been extensively tested at this time | ||
|
||
## Installing from Package Repositories | ||
1. HOPP is available as a PyPi package: | ||
|
||
1. GreenHEART is available as a PyPi package: | ||
|
||
```bash | ||
pip install greenheart | ||
``` | ||
pip install HOPP | ||
``` | ||
|
||
## Installing from Source | ||
## Installing from Source | ||
|
||
1. Using Git, navigate to a local target directory and clone repository: | ||
``` | ||
git clone https://github.com/NREL/HOPP.git | ||
``` | ||
|
||
2. Navigate to `HOPP` | ||
``` | ||
cd HOPP | ||
```bash | ||
git clone https://github.com/NREL/GreenHEART.git | ||
``` | ||
|
||
3. Create a new virtual environment and change to it. Using Conda and naming it 'hopp': | ||
``` | ||
conda create --name hopp python=3.8 -y | ||
conda activate hopp | ||
``` | ||
2. Navigate to `GreenHEART` | ||
|
||
4. Install dependencies: | ||
``` | ||
conda install -c conda-forge coin-or-cbc=2.10.8 -y | ||
conda install -c conda-forge glpk -y | ||
pip install -r requirements.txt | ||
```bash | ||
cd GreenHEART | ||
``` | ||
|
||
Note if you are on Windows, you will have to manually install Cbc: https://github.com/coin-or/Cbc | ||
|
||
If you also want development dependencies for running tests and building docs: | ||
3. Create a new virtual environment and change to it. Using Conda and naming it 'greenheart': | ||
|
||
``` | ||
pip install -r requirements-dev.txt | ||
```bash | ||
conda create --name greenheart python=3.9 -y | ||
conda activate greenheart | ||
``` | ||
|
||
5. Install HOPP: | ||
``` | ||
pip install -e . | ||
4. Install GreenHEART and its dependencies: | ||
|
||
```bash | ||
conda install -y -c conda-forge coin-or-cbc=2.10.8 glpk | ||
``` | ||
|
||
6. The functions which download resource data require an NREL API key. Obtain a key from: | ||
|
||
Note if you are on Windows, you will have to manually install Cbc: https://github.com/coin-or/Cbc. | ||
|
||
- If you want to just use GreenHEART: | ||
|
||
```bash | ||
pip install . | ||
``` | ||
|
||
- If you want to work with the examples: | ||
|
||
```bash | ||
pip install ".[examples]" | ||
``` | ||
|
||
- If you also want development dependencies for running tests and building docs: | ||
|
||
```bash | ||
pip install -e ".[develop]" | ||
``` | ||
|
||
- In one step, all dependencies can be installed as: | ||
|
||
```bash | ||
pip install -e ".[all] | ||
``` | ||
5. The functions which download resource data require an NREL API key. Obtain a key from: | ||
[https://developer.nrel.gov/signup/](https://developer.nrel.gov/signup/) | ||
|
||
7. To set up the `NREL_API_KEY` and `NREL_API_EMAIL` required for resource downloads, you can create Environment Variables called `NREL_API_KEY` and `NREL_API_EMAIL`. Otherwise, you can keep the key in a new file called ".env" in the root directory of this project. | ||
6. To set up the `NREL_API_KEY` and `NREL_API_EMAIL` required for resource downloads, you can create | ||
Environment Variables called `NREL_API_KEY` and `NREL_API_EMAIL`. Otherwise, you can keep the key | ||
in a new file called ".env" in the root directory of this project. | ||
Create a file ".env" that contains the single line: | ||
``` | ||
```bash | ||
NREL_API_KEY=key | ||
[email protected] | ||
``` | ||
8. Verify setup by running tests: | ||
``` | ||
7. Verify setup by running tests: | ||
```bash | ||
pytest | ||
``` | ||
2. To set up `NREL_API_KEY` for resource downloads, first refer to section 7 and 8 above. But for the `.env` file method, | ||
the file should go in the working directory of your Python project, e.g. directory from where you run `python`. | ||
2. To set up `NREL_API_KEY` for resource downloads, first refer to section 7 and 8 above. But for | ||
the `.env` file method, the file should go in the working directory of your Python project, e.g. | ||
directory from where you run `python`. | ||
## Parallel Processing for GreenHEART finite differences and design of experiments | ||
GreenHEART is set up to run in parallel using MPI and PETSc for finite differencing and for design of experiments runs through OpenMDAO. To use this capability you will need to follow the addtional installation instruction below: | ||
``` | ||
conda install -c conda-forge mpi4py petsc4py | ||
GreenHEART is set up to run in parallel using MPI and PETSc for finite differencing and for design of | ||
experiments runs through OpenMDAO. To use this capability you will need to follow the addtional installation | ||
instruction below: | ||
```bash | ||
conda install -c conda-forge mpi4py petsc4py | ||
``` | ||
For more details on implementation and installation, reference the documentation for OpenMDAO. | ||
To to check that your installation is working, do the following: | ||
``` | ||
cd tests/greenheart/ | ||
mpirun -n 2 pytest test_openmdao_mpi.py | ||
```bash | ||
cd tests/greenheart/ | ||
mpirun -n 2 pytest test_openmdao_mpi.py | ||
``` | ||
## Getting Started | ||
The [Examples](./examples/) contain Jupyter notebooks and sample YAML files for common usage scenarios in HOPP. These are actively maintained and updated to demonstrate HOPP's capabilities. For full details on simulation options and other features, see the [documentation](https://hopp.readthedocs.io/en/latest/). | ||
The [Examples](./examples/) contain Jupyter notebooks and sample YAML files for common usage | ||
scenarios in GreenHEART. These are actively maintained and updated to demonstrate GreenHEART's | ||
capabilities. For full details on simulation options and other features, documentation is | ||
forthcoming. | ||
## Contributing | ||
Interested in improving HOPP? Please see the [Contributing](./CONTRIBUTING.md) section for more information. | ||
Interested in improving GreenHEART? Please see the [Contributing](./CONTRIBUTING.md) section for more information. |
Oops, something went wrong.