Skip to content

Commit 78191ab

Browse files
Merge pull request #241 from NatLabRockies/develop
Hercules v2.1 release
2 parents efb5fd6 + 37467cc commit 78191ab

96 files changed

Lines changed: 5313 additions & 670 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/dependabot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "pip"
4+
directory: "/" # Location of package manifests
5+
target-branch: "develop"
6+
schedule:
7+
interval: "monthly"
8+
labels:
9+
- "package"
10+
ignore:
11+
- dependency-name: "*"
12+
update-types: ["version-update:semver-minor", "version-update:semver-patch"]

.github/workflows/continuous-integration-workflow.yaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
strategy:
1010
fail-fast: False
1111
matrix:
12-
python-version: ["3.9", "3.10", "3.11"]
12+
python-version: [ "3.11", "3.12", "3.13"]
1313
os: [ubuntu-latest] #, macos-latest, windows-latest]
1414

1515
steps:
@@ -22,8 +22,6 @@ jobs:
2222
run: |
2323
python -m pip install --upgrade pip
2424
pip install -e ".[develop]"
25-
pip install git+https://github.com/NREL/electrolyzer.git
26-
pip install https://github.com/NREL/SEAS/blob/v1/SEAS.tar.gz?raw=true
2725
# - uses: pre-commit/action@v3.0.0
2826
- name: Run ruff
2927
run: |
@@ -42,11 +40,10 @@ jobs:
4240
pip install pytest
4341
pip install pytest-cov
4442
pytest --cov=./ --cov-report=xml tests/
45-
- name: Upload coverage to Codecov
43+
- name: Upload coverage to Codecov
4644
if: ${{ env.CODECOV_TOKEN }} # Don't attempt to upload if the codecov token is not configured
4745
uses: codecov/codecov-action@v3
4846
with:
4947
token: ${{ secrets.CODECOV_TOKEN }}
5048
files: ./coverage.xml
5149
fail_ci_if_error: true
52-

.github/workflows/deploy-pages.yaml

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -19,38 +19,11 @@ jobs:
1919
- name: Set up Python
2020
uses: actions/setup-python@v4
2121
with:
22-
python-version: "3.10"
22+
python-version: "3.12"
2323

2424
- name: Install dependencies
2525
run: |
2626
pip install -e ".[docs]"
27-
28-
- name: Make copies of example docs
29-
run: |
30-
mkdir -vp docs/examples
31-
32-
cp -v examples/00_wind_farm_only/README.md docs/examples/00_wind_farm_only.md
33-
cp -v examples/01_wind_farm_dof1_model/README.md docs/examples/01_wind_farm_dof1_model.md
34-
cp -v examples/02_wind_farm_realistic_inflow/README.md docs/examples/02_wind_farm_realistic_inflow.md
35-
cp -v examples/02b_wind_farm_realistic_inflow_precom_floris/README.md docs/examples/02b_wind_farm_realistic_inflow_precom_floris.md
36-
cp -v examples/03_wind_and_solar/README.md docs/examples/03_wind_and_solar.md
37-
cp -v examples/04_wind_and_storage/README.md docs/examples/04_wind_and_storage.md
38-
ls -l docs/examples
39-
40-
- name: Debug directory structure
41-
run: |
42-
echo "Current directory: $(pwd)"
43-
echo "GitHub workspace: ${{github.workspace}}"
44-
echo "Runner workspace: ${{runner.workspace}}"
45-
ls -la
46-
ls -la docs/
47-
ls -la docs/examples/
48-
49-
# # Build the book
50-
# - name: Build the book
51-
# working-directory: ${{runner.workspace}}/hercules/docs/
52-
# run: |
53-
# jupyter-book build .
5427
5528
# Build the book
5629
- name: Build the book
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# This workflows will upload a Python Package using Twine when a release is created
2+
# Published via GitHub Actions as a PyPI Trusted Publisher.
3+
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
4+
# and: https://docs.pypi.org/trusted-publishers/
5+
6+
name: Upload Python Package
7+
8+
on:
9+
release:
10+
types: [published]
11+
12+
jobs:
13+
deploy:
14+
environment: release-pypi
15+
if: github.repository_owner == 'NatLabRockies'
16+
runs-on: ubuntu-latest
17+
permissions:
18+
id-token: write
19+
steps:
20+
- uses: actions/checkout@v6
21+
- name: Set up Python
22+
uses: actions/setup-python@v6
23+
with:
24+
python-version: '3.x'
25+
- name: Install dependencies and build package
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install build twine
29+
python -m build
30+
twine check --strict dist/*
31+
- name: Publish package to PyPI
32+
uses: pypa/gh-action-pypi-publish@release/v1
33+
with:
34+
verbose: True

.gitignore

Lines changed: 89 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,114 @@
1-
# Gitignore file
1+
# =============================================================================
2+
# Python
3+
# =============================================================================
24
*.pyc
3-
*.log
4-
*.egg-info
5-
data.db
5+
__pycache__/
6+
*.egg-info/
67
*.python-version
7-
*.DS_Store
8-
*.conda
9-
*.sqlite
10-
slices
118

12-
# macOS files
9+
# =============================================================================
10+
# macOS
11+
# =============================================================================
1312
.DS_Store
13+
__MACOSX/
1414

15-
# ide settings and files
16-
.idea
17-
.vscode
15+
# =============================================================================
16+
# IDE/Editor Settings
17+
# =============================================================================
18+
.idea/
19+
.vscode/
20+
.cursor/rules/
1821

19-
# Some c++ stuff
20-
a.out
21-
*.plist
22-
test_client.dSYM
22+
# =============================================================================
23+
# Jupyter Notebooks
24+
# =============================================================================
2325
*checkpoint.ipynb
24-
hercules/sampling00000.nc
25-
hercules/front_end.db
26-
hercules/control_center.db
27-
hercules/test_client_cpp/test_client
28-
hercules/df_flow.p
29-
hercules/flow_data.p
30-
31-
t_*.txt
32-
hercules/sample_copy.nc
33-
hercules/t_0*
34-
hercules/local_amr_wind_demo/sample_copy.nc
26+
*.nbconvert.ipynb
27+
.ipynb_checkpoints/
3528

36-
#Ignore csv files
29+
# =============================================================================
30+
# Data Files (large/generated)
31+
# =============================================================================
32+
# CSV files (except test inputs)
3733
*.csv
3834
!tests/test_inputs/*.csv
39-
!example_case_folders/00_wind_farm_only/inputs/floris_standin_data.csv
40-
!example_case_folders/00_wind_farm_only/inputs/wind_power_reference_data.csv
4135

42-
# h5 files
36+
# Binary data formats
4337
*.h5
4438
*.hdf5
39+
*.feather
40+
*.ftr
41+
*.parquet
4542

46-
# Larger wind input file
47-
wind_resource_rex
43+
# Pickle files (generated input data)
44+
*.p
45+
*.pkl
4846

49-
# Wind input pickle files
50-
wind_input.p
47+
# Large wind resource data
48+
wind_resource_rex/
5149

52-
# Solar input pickle files
53-
solar_input.p
50+
# =============================================================================
51+
# Hercules Simulation Outputs
52+
# =============================================================================
53+
# Output directories contain generated results
54+
outputs/
5455

55-
# Intermediate notebook files
56-
*.nbconvert.ipynb
57-
*.ipynb_checkpoints
56+
# Log files (generated during simulation)
57+
*.log
5858

59-
# Some output files to ignore
59+
# H_dict echo files (simulation state dumps)
60+
*.echo
61+
62+
# =============================================================================
63+
# Documentation Build Artifacts
64+
# =============================================================================
65+
docs/_build/
66+
67+
# =============================================================================
68+
# Testing/CI Artifacts
69+
# =============================================================================
70+
.pytest_cache/
71+
.ruff_cache/
72+
73+
# =============================================================================
74+
# LEGACY HERCULES - May remove in future cleanup
75+
# =============================================================================
76+
# Old example folder path (renamed to examples/)
77+
!example_case_folders/00_wind_farm_only/inputs/floris_standin_data.csv
78+
!example_case_folders/00_wind_farm_only/inputs/wind_power_reference_data.csv
79+
80+
# C++ build artifacts (from old AMR-Wind integration)
81+
a.out
82+
*.plist
83+
test_client.dSYM
84+
hercules/test_client_cpp/test_client
85+
86+
# NetCDF files (from old AMR-Wind demos)
87+
hercules/sampling00000.nc
88+
hercules/sample_copy.nc
89+
hercules/local_amr_wind_demo/sample_copy.nc
90+
91+
# Database files (from old front-end/control center)
92+
data.db
93+
*.sqlite
94+
*.conda
95+
hercules/front_end.db
96+
hercules/control_center.db
97+
98+
# Old data/flow pickle files
99+
hercules/df_flow.p
100+
hercules/flow_data.p
101+
102+
# AMR-Wind time step outputs
103+
t_*.txt
104+
hercules/t_0*
60105
t_00*
106+
slices
107+
108+
# Old log file patterns (now covered by *.log)
61109
logdummy
62110
loghelics
63111
loghercules*
64112
logstandin*
65113
logfloris*
66-
*echo
67114
*out-example.json
68-
69-
.vscode/*
70-
71-
# Doc builds
72-
docs/_build
73-
docs/examples
74-
75-
.cursor/rules/
76-
*.feather
77-
*.ftr
78-
*.parquet

CITATION.cff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ authors:
55
- family-names: NLR
66
given-names:
77
title: "HERCULES"
8-
version: 2
8+
version: 2.1
99
url: https://github.com/NatLabRockies/hercules
1010

11-
date-released: 2025-12-31
11+
date-released: 2026-03-30
Lines changed: 71 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)