From 1d1ce1a3fceaafab136e3aa82aa1c4fdf209c53b Mon Sep 17 00:00:00 2001 From: "Hammond, Rob" <13874373+RHammond2@users.noreply.github.com> Date: Fri, 8 May 2026 09:40:30 -0700 Subject: [PATCH 1/8] update jupyter badge --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 14586e9a..58cd294d 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,8 @@  [](https://codecov.io/gh/NLRWindSystems/WOMBAT) [](https://opensource.org/licenses/Apache-2.0) -[](https://mybinder.org/v2/gh/NLRWindSystems/WOMBAT/main?filepath=examples) -[](https://nlrwindsystems.github.io/WOMBAT) +[](https://mybinder.org/v2/gh/WISDEM/WOMBAT/main?filepath=examples) +[](nlrwindsystems.github.io/WOMBAT) [](https://github.com/pre-commit/pre-commit) [](https://github.com/psf/black) From 56c4059e0ddd51a519d3ff5c8bb75e5458c8ac77 Mon Sep 17 00:00:00 2001 From: "Hammond, Rob" <13874373+RHammond2@users.noreply.github.com> Date: Fri, 8 May 2026 09:40:39 -0700 Subject: [PATCH 2/8] convert codecov to coveralls for test coverage --- .github/workflows/ci-tests.yml | 55 +++++++++++++++++++++++++++++----- 1 file changed, 47 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index 068a24c4..0b987f13 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -14,11 +14,18 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - python-version: ["3.11", "3.12", "3.13"] + os: + - ubuntu-latest + - windows-latest + - macos-latest + python-version: + - "3.11" + - "3.12" + - "3.13" + - "3.14" steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v6 @@ -28,14 +35,46 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install -e . pip install -e ".[dev]" shell: bash - - name: Test with pytest + - name: Run unit tests run: | - pytest --cov=wombat --cov-report=xml + pytest --unit --cov=wombat --cov-report=lcov:./unit-coverage.lcov shell: bash - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v5 + - name: Upload test coverage + uses: coverallsapp/github-action@v2 + if: contains(matrix.os, 'ubuntu') && contains(matrix.python-version, '3.14') + with: + github-token: ${{ secrets.COVERALLS_REPO_TOKEN }} + files: ./unit-coverage.lcov + flag-name: unit + parallel: true + fail-on-error: false + + - name: Run regression tests + run: | + pytest --unit --cov=wombat --cov-report=lcov:./unit-coverage.lcov + shell: bash + + - name: Upload test coverage + uses: coverallsapp/github-action@v2 + if: contains(matrix.os, 'ubuntu') && contains(matrix.python-version, '3.14') + with: + github-token: ${{ secrets.COVERALLS_REPO_TOKEN }} + files: ./regression-coverage.lcov + flag-name: regression + parallel: true + fail-on-error: false + coverage-finish: + needs: build + if: always() + runs-on: ubuntu-latest + steps: + - name: Coveralls finished + uses: coverallsapp/github-action@v2 + with: + github-token: ${{ secrets.COVERALLS_REPO_TOKEN }} + parallel-finished: true + fail-on-error: false From 1ac2b2182706842d460d10d18ab50790acbbd4e6 Mon Sep 17 00:00:00 2001 From: "Hammond, Rob" <13874373+RHammond2@users.noreply.github.com> Date: Fri, 8 May 2026 09:43:11 -0700 Subject: [PATCH 3/8] update all actions versions to latest --- .github/workflows/ci_docs.yml | 2 +- .github/workflows/gh_pages.yml | 6 +++--- .github/workflows/pre-commit.yml | 2 +- .github/workflows/python-publish-test.yml | 2 +- .github/workflows/python-publish.yml | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci_docs.yml b/.github/workflows/ci_docs.yml index 8532a62d..a1b7bc9b 100644 --- a/.github/workflows/ci_docs.yml +++ b/.github/workflows/ci_docs.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - name: Set up Python uses: actions/setup-python@v6 with: diff --git a/.github/workflows/gh_pages.yml b/.github/workflows/gh_pages.yml index 381b7545..6a6f89af 100644 --- a/.github/workflows/gh_pages.yml +++ b/.github/workflows/gh_pages.yml @@ -11,10 +11,10 @@ jobs: pages: write 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.13 @@ -28,7 +28,7 @@ jobs: jupyter-book build docs - name: Upload artifact - uses: actions/upload-pages-artifact@v3 + uses: actions/upload-pages-artifact@v5 with: path: "docs/_build/html" diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index abb10fc4..dc1ebd52 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -9,7 +9,7 @@ jobs: pre-commit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - name: Set up Python uses: actions/setup-python@v6 with: diff --git a/.github/workflows/python-publish-test.yml b/.github/workflows/python-publish-test.yml index c9f5bf35..516825ab 100644 --- a/.github/workflows/python-publish-test.yml +++ b/.github/workflows/python-publish-test.yml @@ -20,7 +20,7 @@ jobs: id-token: write steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - name: Set up Python uses: actions/setup-python@v6 diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 7e16403b..a1181b1f 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -19,7 +19,7 @@ jobs: id-token: write steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - name: Set up Python uses: actions/setup-python@v6 From bcd383d7915644b9d656dd563224b22fbb72a907 Mon Sep 17 00:00:00 2001 From: "Hammond, Rob" <13874373+RHammond2@users.noreply.github.com> Date: Fri, 8 May 2026 09:54:02 -0700 Subject: [PATCH 4/8] fix typos throughout docs --- CHANGELOG.md | 14 +++++++------- docs/API/types.md | 2 +- docs/examples/default_data_demonstration.md | 2 +- docs/examples/examples_reference.md | 2 +- docs/examples/how_to.md | 8 ++++---- docs/examples/index.md | 2 +- docs/examples/metrics_demonstration.md | 2 +- docs/index.md | 2 +- docs/install.md | 2 +- 9 files changed, 18 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index afa4a2a1..21220751 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -224,7 +224,7 @@ - `by="turbine"` no longer includes the "windfarm" column for results - `process_times` now uses a `MultiIndex` with a `subassembly` and `task` column. - Improved cable, subassembly, and servicing equipment error handling to show which of - the cables, substations, turbines, or vessels produced the intialization error for + the cables, substations, turbines, or vessels produced the initialization error for easier input debugging. - Basic tests are now included for limited set of the `Metrics` class with a focus cost summaries. @@ -444,7 +444,7 @@ cables: - `RepairRequest.prior_operating_level` has been added to allow 100% reduction factor failures to correctly and consistently restore the operating level of a subassembly following a repair. - Replaces the `valid_reduction` attrs validator with `validate_0_1_inclusive` to reuse the logic in multiple places without duplicating checking methods. - Adds a `replacement` flag for interruption methods, so that a failure or replacement comment can be added as a cause for `simpy.process.interrupt`. This update allows the failure and maintenance processes to check if an interruption should cause the process to exit completely. Additionally, the forced exit ensures that processes can't persist after a replacement event when a process is recreated, which was happening in isolated cases. -- Fixes a bug in `RepairManager.purge_subassemble_requests()` where the pending tows are cleared regardless of whether or not the focal subassembly is the cause of the tow, leading to a simulation failure. +- Fixes a bug in `RepairManager.purge_subassembly_requests()` where the pending tows are cleared regardless of whether or not the focal subassembly is the cause of the tow, leading to a simulation failure. - Fixes a bug in `utilities/utilities.py:create_variable_from_string()` to operate in a way that is expected. The original method was removing all numerics, but only leading punctuation and numerics should be replaced, with any punctuation being replaced with an underscore. - Adds additional inline comments for clarification on internal methods. - Update README.md to be inline with current conda and Python standards. @@ -531,13 +531,13 @@ cables: ### Features - Adds a `non_stop_shift` attribute to `ServiceEquipmentData`, `UnscheduledServiceEquipmentData`, `ScheduledServiceEquipmentData`, and `PortConfig` that is set in the post-initialization hook or through `DateLimitsMixin._set_environment_shift()` to ensure it is updated appropriately. Additionally, all checks for a 24 hour shift now check for the `non_stop_shift` attribute. -- `Metrics.emissions()` has been added to the list of available metrics to calculate the emissions from idling at port or sea, tranisiting, and maneuvering. Co-authored by and inspired by analysis work from @hemezz. +- `Metrics.emissions()` has been added to the list of available metrics to calculate the emissions from idling at port or sea, transiting, and maneuvering. Co-authored by and inspired by analysis work from @hemezz. - `Simulation` now accepts a `random_seed` or `random_generator` variable to seed the random number generators for Weibull failure timeouts and wait timing between event completions. Setting the `random_seed` to the same value from one simulation to the next will net the same results between different simulations, whereas the `random_generator` can be used to use the same generator for a batch of simulations. ### General - All `assert` statements are now only called when type checking is performed -- Replaces all `.get(lamda x: x == request)` with a 10x faster `.get(lambda x: x is request)` to more efficiently filter out the desired event to be removed from the repair manager and port repair management. +- Replaces all `.get(lambda x: x == request)` with a 10x faster `.get(lambda x: x is request)` to more efficiently filter out the desired event to be removed from the repair manager and port repair management. - `WombatEnvironment.weather` is now a Polars DataFrame to improve efficiency and indexing bottlenecks introduced in Pandas 2.0. - All subassembly cable files are read in once, and stored in a dictionary to provide a modest speed up for the simulation initialization. @@ -553,7 +553,7 @@ cables: - Features: - Weather data now has the ability to contain more than just the required "windspeed" and "waveheight" columns. This will allow for easier expansion of the weather model in the future, and increase compatibility with other NLR techno economic modeling frameworks. - Bug fixes: - - Maintenance and failure simulation process interruptions were occuring prior to starting the process timing, and causing simulation failures. + - Maintenance and failure simulation process interruptions were occurring prior to starting the process timing, and causing simulation failures. - Duplicated parameters were being processed in `WombatEnvironment.log_action` stemming from improper handling of varying parameters in some of the more complex control flow logic in *in situ* repairs. - Another edge case of negative delays during crew transfers where there is insufficient time remaining in the shift after account for weather, so the method was called recursively, but not exiting the original loop. - `Port` management of *in situ* and tow-to-port capable tugboats wasn't properly accounting for tugboats of varying capabilities, and assuming all tugboats could do both. The vessel management and repair processing were out of sync causing duplicated turbine servicing/towing. @@ -697,7 +697,7 @@ In v0.6, due to a series of bug fixes, logic improvements, and feature additions - `wombat.core.environment.WombatEnvironment.cleanup_log_files` will only try to delete files that actually exist to avoid unexpected simulation failures at the last step. - `wombat.core.environment.WombatEnvironment.date_ix` accepts `datetime.datetime` and `datetime.date` inputs to - avoid unnecesary errors or manipulations in a simulation. + avoid unnecessary errors or manipulations in a simulation. - `wombat.core.environment.WombatEnvironment.log_action` now only accepts numeric inputs for `system_ol` and `part_ol`. - `wombat.core.environment.WombatEnvironment.weather_forecast` now rounds the starting time down to @@ -760,7 +760,7 @@ In v0.6, due to a series of bug fixes, logic improvements, and feature additions - `wombat.core.service_equipment.ServiceEquipment.register_repair_with_subassembly` correctly retrieves the cable information for upstream cables to be reset. -- `wombat.core.post_processor.Metrics.service_equipment_utilization` has a new methodolgy that uses the +- `wombat.core.post_processor.Metrics.service_equipment_utilization` has a new methodology that uses the actual number of days in operation instead of a backwards computation that consistently and accurately accounts for the days where the servicing equipment is in operation. Additionally, the filtering is updated to match the filter for total days, which also improves accuracy of results. diff --git a/docs/API/types.md b/docs/API/types.md index 70009c4a..c1579d2e 100644 --- a/docs/API/types.md +++ b/docs/API/types.md @@ -1,5 +1,5 @@ (types)= -# Conifgurations (Data Classes) +# Configurations (Data Classes) The WOMBAT architecture relies heavily on a base set of data classes to process most of the model's inputs. This enables a rigid, yet robust data model to properly define a diff --git a/docs/examples/default_data_demonstration.md b/docs/examples/default_data_demonstration.md index 6e6cd0e2..879a1858 100644 --- a/docs/examples/default_data_demonstration.md +++ b/docs/examples/default_data_demonstration.md @@ -17,7 +17,7 @@ kernelspec: In this example, we'll show what each of the reference plants look like and what results they yield when simulated. ```{important} -The land-based data are expiremental, and should only be used as a starting point for +The land-based data are experimental, and should only be used as a starting point for developing a more robust simulation. Please see the [default data section of the user guide for further details](index.md#default-data) ``` diff --git a/docs/examples/examples_reference.md b/docs/examples/examples_reference.md index 5947a2c4..93de53be 100644 --- a/docs/examples/examples_reference.md +++ b/docs/examples/examples_reference.md @@ -11,7 +11,7 @@ DOE. The results are displayed in ## Ongoing Analysis Work & Default Data Results Demonstration -### `COWER_om_worflow.ipynb` +### `COWER_om_workflow.ipynb` This workflow example demonstrates the new (as of v0.13) default offshore wind data sets and the O&M portion of the NLR Cost of Wind Energy Review (COWER) analysis. The underlying data and example diff --git a/docs/examples/how_to.md b/docs/examples/how_to.md index dd8f20a1..49ddc115 100644 --- a/docs/examples/how_to.md +++ b/docs/examples/how_to.md @@ -212,7 +212,7 @@ later input reviews: - subassembly is all "vestas_v90.yaml", but having to input the turbine subassembly model means that multiple turbine types can be used on a windfarm. - This same logic applies to the upstream_cable so that multiple cable types can be - used as appopriate. + used as appropriate. ```