-
Notifications
You must be signed in to change notification settings - Fork 46
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 #356 from NREL/develop
v3.0 release
- Loading branch information
Showing
183 changed files
with
44,141 additions
and
8,571 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/HOPP | ||
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 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 |
---|---|---|
@@ -1,79 +1,93 @@ | ||
# Hybrid Optimization and Performance Platform | ||
# HOPP: Hybrid Optimization and Performance Platform | ||
|
||
[![PyPI version](https://badge.fury.io/py/hopp.svg)](https://badge.fury.io/py/hopp) | ||
![CI Tests](https://github.com/NREL/HOPP/actions/workflows/ci.yml/badge.svg) | ||
[![image](https://img.shields.io/pypi/pyversions/hopp.svg)](https://pypi.python.org/pypi/hopp) | ||
[![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. | ||
|
||
## 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 | ||
|
||
- Python version 3.9, 3.10, and 3.11 only (PySAM 4.2 is incompatible with 3.12) | ||
|
||
## Installing from Package Repositories | ||
|
||
1. HOPP is available as a PyPi package: | ||
|
||
``` | ||
```bash | ||
pip install HOPP | ||
``` | ||
|
||
## Installing from Source | ||
|
||
1. Using Git, navigate to a local target directory and clone repository: | ||
``` | ||
|
||
```bash | ||
git clone https://github.com/NREL/HOPP.git | ||
``` | ||
|
||
2. Navigate to `HOPP` | ||
``` | ||
|
||
```bash | ||
cd HOPP | ||
``` | ||
|
||
3. Create a new virtual environment and change to it. Using Conda and naming it 'hopp': | ||
``` | ||
|
||
```bash | ||
conda create --name hopp python=3.8 -y | ||
conda activate hopp | ||
``` | ||
|
||
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 | ||
4. Install HOPP and its dependencies: | ||
|
||
```bash | ||
conda install -y -c conda-forge coin-or-cbc=2.10.8 glpk | ||
``` | ||
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: | ||
Note if you are on Windows, you will have to manually install Cbc: https://github.com/coin-or/Cbc. | ||
|
||
``` | ||
pip install -r requirements-dev.txt | ||
``` | ||
- If you want to just use HOPP: | ||
|
||
5. Install HOPP: | ||
``` | ||
pip install -e . | ||
``` | ||
```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]" | ||
``` | ||
|
||
5. The functions which download resource data require an NREL API key. Obtain a key from: | ||
|
||
6. 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 tests/hopp | ||
``` | ||
|
||
2. To set up `NREL_API_KEY` for resource downloads, first refer to section 7 and 8 above. But for the `.env` file method, | ||
8. To set up `NREL_API_KEY` for resource downloads, first refer to section 6 and 7 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`. | ||
|
||
## Getting Started | ||
|
@@ -82,4 +96,4 @@ The [Examples](./examples/) contain Jupyter notebooks and sample YAML files for | |
## Contributing | ||
Interested in improving HOPP? Please see the [Contributing](./CONTRIBUTING.md) section for more information. | ||
Interested in improving HOPP? Please see the [Contributing](./CONTRIBUTING.md) section for more information. |
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
Oops, something went wrong.