diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4d9048477..272ce3d11 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,16 +13,16 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.11", "3.12"] + python-version: ["3.11", "3.13"] optional: [false] include: - python-version: "3.11" optional: true steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} - name: Install dependencies @@ -31,12 +31,11 @@ jobs: run: | sudo apt-get update && sudo apt-get install -y libglpk-dev glpk-utils coinor-cbc python -m pip install --upgrade pip - pip install git+https://github.com/NREL/HOPP@develop if [ "${{ matrix.optional }}" = "true" ]; then - pip install ".[develop,gis]" + pip install ".[develop]" pip install git+https://github.com/NREL/MarineCarbonManagement.git else - pip install ".[develop,gis]" + pip install ".[develop]" fi - name: Create env file run: | @@ -44,8 +43,3 @@ jobs: - name: Run tests run: | pytest . - - name: Lint with flake8 - run: | - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - pip install flake8 - flake8 . --count --exit-zero --statistics --ignore=E501 diff --git a/.github/workflows/ci_docs.yml b/.github/workflows/ci_docs.yml deleted file mode 100644 index e53806264..000000000 --- a/.github/workflows/ci_docs.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Test Documentation Build - -on: [ push, pull_request ] - -jobs: - build: - - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: 3.11 - - name: Install dependencies - run: | - pip install git+https://github.com/NREL/HOPP@develop - pip install ".[develop]" - - name: Build documentation - run: | - jupyter-book build docs/ diff --git a/.github/workflows/gh_pages.yml b/.github/workflows/gh_pages.yml deleted file mode 100644 index 392ae7e9b..000000000 --- a/.github/workflows/gh_pages.yml +++ /dev/null @@ -1,52 +0,0 @@ -name: deploy-book - -# Run this when the master or main branch changes -on: - push: - branches: - - main - -jobs: - deploy-book: - runs-on: ubuntu-latest - permissions: - pages: write - id-token: write - steps: - - uses: actions/checkout@v4 - - - name: Set up Python 3.11 - uses: actions/setup-python@v5 - with: - python-version: 3.11 - - - name: Install dependencies - run: | - pip install git+https://github.com/NREL/HOPP@develop - pip install -e ".[develop]" - - # (optional) Cache your executed notebooks between runs - # if you have config: - # execute: - # execute_notebooks: cache - # - name: cache executed notebooks - # uses: actions/cache@v3 - # with: - # path: _build/.jupyter_cache - # key: jupyter-book-cache-${{ hashFiles('requirements.txt') }} - - # Build the book - - name: Build the book - run: | - jupyter-book build docs/ - - # Upload the book's HTML as an artifact - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - path: "docs/_build/html" - - # Deploy the book's HTML to GitHub Pages - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 3090833f0..3623ee093 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -1,18 +1,19 @@ name: pre-commit on: - pull_request: push: - branches: [main] + branches: [main, develop] + pull_request: + branches: [main, develop] jobs: pre-commit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: - python-version: 3.9 + python-version: 3.13 - name: Run pre-commit uses: pre-commit/action@v3.0.1 diff --git a/.github/workflows/publish_to_pypi.yml b/.github/workflows/publish_to_pypi.yml index 1027a3729..250ebc5e3 100644 --- a/.github/workflows/publish_to_pypi.yml +++ b/.github/workflows/publish_to_pypi.yml @@ -14,11 +14,11 @@ jobs: permissions: id-token: write steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: - python-version: 3.9 + python-version: 3.13 - name: Build package run: | python -m pip install --upgrade pip diff --git a/.github/workflows/publish_to_test_pypi.yml b/.github/workflows/publish_to_test_pypi.yml index 95aa621d9..3acbd144c 100644 --- a/.github/workflows/publish_to_test_pypi.yml +++ b/.github/workflows/publish_to_test_pypi.yml @@ -15,11 +15,11 @@ jobs: permissions: id-token: write steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: - python-version: 3.9 + python-version: 3.13 - name: Build package run: | python -m pip install --upgrade pip diff --git a/CHANGELOG.md b/CHANGELOG.md index 607448fdf..d1d0617cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Changelog ## 0.5.x [TBD] + - Updates models for NumPy version 2.4.0 - Update test values for WOMBAT update to 0.13.0 - Added standalone iron DRI and steel EAF performance and cost models diff --git a/README.md b/README.md index d3cf64618..2697f37a7 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,7 @@ For more context about H2Integrate and to see analyses that have been performed PDFs are available in the linked titles. ### Nationwide techno-economic analysis of clean hydrogen production powered by a hybrid renewable energy plant for over 50,000 locations in the United States. + The levelized cost of hydrogen is calculated for varying technology costs, and tax credits to explore cost sensitivities independent of plant design, performance, and site selection. Our findings suggest that strategies for cost reduction include selecting sites with abundant wind @@ -65,6 +66,7 @@ assets to maximize the hybrid plant capacity factor. Grant, E., et al. "[Hybrid power plant design for low-carbon hydrogen in the United States.](https://iopscience.iop.org/article/10.1088/1742-6596/2767/8/082019/pdf)" Journal of Physics: Conference Series. Vol. 2767. No. 8. IOP Publishing, 2024. ### Exploring the role of producing low-carbon hydrogen using water electrolysis powered by offshore wind in facilitating the United States’ transition to a net-zero emissions economy by 2050. + Conducting a regional techno-economic analysis at four U.S. coastal sites, the study evaluates two energy transmission configurations and examines associated costs for the years 2025, 2030, and 2035. The results highlight that locations using fixed-bottom technology may achieve cost-competitive @@ -74,6 +76,7 @@ federal policy incentives. Brunik, K., et al. "[Potential for large-scale deployment of offshore wind-to-hydrogen systems in the United States.](https://iopscience.iop.org/article/10.1088/1742-6596/2767/6/062017/pdf)" Journal of Physics: Conference Series. Vol. 2767. No. 6. IOP Publishing, 2024. ### Examining how tightly-coupled gigawatt-scale wind- and solar-sourced H2 depends on the ability to store and deliver otherwise-curtailed H2 during times of shortages. + Modeling results suggest that the levelized cost of storage is highly spatially heterogeneous, with minor impact on the cost of H2 in the Midwest, and potentially significant impact in areas with emerging H2 economies such as Central California and the Southeast. While TOL/MCH may be the @@ -84,6 +87,7 @@ concerns. Breunig, Hanna, et al. "[Hydrogen Storage Materials Could Meet Requirements for GW-Scale Seasonal Storage and Green Steel.](https://assets-eu.researchsquare.com/files/rs-4326648/v1_covered_338a5071-b74b-4ecd-9d2a-859e8d988b5c.pdf?c=1716199726)" (2024). ### DOE Hydrogen Program review presentation of H2Integrate + King, J. and Hammond, S. "[Integrated Modeling, TEA, and Reference Design for Renewable Hydrogen to Green Steel and Ammonia - GreenHEART](https://www.hydrogen.energy.gov/docs/hydrogenprogramlibraries/pdfs/review24/sdi001_king_2024_o.pdf?sfvrsn=a800ca84_3)" (2024). ## Software requirements @@ -97,6 +101,11 @@ King, J. and Hammond, S. "[Integrated Modeling, TEA, and Reference Design for Re pip install h2integrate ``` +> [!NOTE] +> If using the Ard models `h2integrate[ard]`, see the source installation instructions (item 3) for +> creating a conda environment with WISDEM installed through conda, not pip as it can cause issues +> on some machines. + ## Installing from Source ### Easiest approach (recommended) @@ -113,29 +122,28 @@ pip install h2integrate cd H2Integrate ``` -3. Create a conda environment and install H2Integrate and all its dependencies +3. Create a conda environment and install H2Integrate and all its dependencies. Please read the + following two notes about modified installation steps. + + 1. If on a Unix machine, uncomment line 8 in `environment.yml` to install Cbc. Windows + users will need to manually install from . + 2. If you plan to use Ard, please uncomment line 9 in `environment.yml` to ensure WISDEM (an Ard + dependency) is installed from conda to avoid installation issues with some systems. ```bash conda env create -f environment.yml ``` -4. Install Cbc. - 1. If using a Unix machine (not Windows), install a final dependency - - ```bash - conda install -y -c conda-forge coin-or-cbc=2.10.8 - ``` - - 2. Windows users will have to manually install Cbc: https://github.com/coin-or/Cbc - An additional step can be added if additional dependencies are required, or you plan to use this environment for development work. - Pass `-e` for an editable developer install - Use one of the extra flags as needed: - - `examples`: allows you to use the Jupyter Notebooks - - `develop`: adds developer and documentation tools - - `all` simplifies adding all the dependencies + - `gis`: adds the iron mapping tools. + - `ard`: adds the Ard-based wind models. + - `develop`: adds developer and documentation tools, plus optional analysis modifiers `gis` and `ard`. + - `examples`: allows you to use the Jupyter Notebooks and all examples (includes `ard` and `gis`). + - `all` simplifies adding all the dependencies. This looks like the following for a developer installation: diff --git a/docs/getting_started/install.md b/docs/getting_started/install.md index 1f6d5ba23..cabee8aae 100644 --- a/docs/getting_started/install.md +++ b/docs/getting_started/install.md @@ -56,29 +56,28 @@ If you want to develop new models or contribute to H2Integrate, you can install NREL_API_EMAIL= ``` -4. Create a conda environment and install H2Integrate and all its dependencies +4. Create a conda environment and install H2Integrate and all its dependencies. Please read the + following two notes about modified installation steps. + + 1. If on a Unix machine, uncomment line 8 in `environment.yml` to install Cbc. Windows + users will need to manually install from . + 2. If you plan to use Ard, please uncomment line 9 in `environment.yml` to ensure WISDEM (an Ard + dependency) is installed from conda to avoid installation issues with some systems. ```bash conda env create -f environment.yml ``` -5. Install Cbc. - 1. If using a Unix machine (not Windows), install a final dependency - - ```bash - conda install -y -c conda-forge coin-or-cbc=2.10.8 - ``` - - 2. Windows users will have to manually install Cbc: https://github.com/coin-or/Cbc - An additional step can be added if additional dependencies are required, or you plan to use this environment for development work. - Pass `-e` for an editable developer install - Use one of the extra flags as needed: - - `examples`: allows you to use the Jupyter Notebooks - - `develop`: adds developer and documentation tools - - `all` simplifies adding all the dependencies + - `gis`: adds the iron mapping tools. + - `ard`: adds the Ard-based wind models. + - `develop`: adds developer and documentation tools, plus optional analysis modifiers `gis` and `ard`. + - `examples`: allows you to use the Jupyter Notebooks and all examples (includes `ard` and `gis`). + - `all` simplifies adding all the dependencies. This looks like the following for a developer installation: diff --git a/environment.yml b/environment.yml index 45bdd4b86..199406b14 100644 --- a/environment.yml +++ b/environment.yml @@ -5,6 +5,7 @@ channels: dependencies: - python=3.11 - glpk + # - coin-or-cbc=2.10.8 # NOTE: uncomment if on Unix # - wisdem # NOTE: uncomment if installing with Ard - pip - pip: diff --git a/pyproject.toml b/pyproject.toml index fd0e41a91..27238f40e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -79,6 +79,7 @@ classifiers = [ # https://pypi.org/classifiers/ "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Topic :: Scientific/Engineering", "Topic :: Software Development :: Libraries :: Python Modules", ]