-
Notifications
You must be signed in to change notification settings - Fork 10
Release candidate for beta.3 #179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
* Bump version from 0.1.0-beta0 to 0.1.0-beta1 * added first cut at multi-objective stuff * Bump version from 0.1.0-beta1 to 0.1.0-beta2 * multi-objective refactor * fix example code * black reformat * invert erroneous exclusion * improved unit testing * get rid of pyoptsparse dependencies and broaden test coverage * fixed erroneous inclusion of options * address copilot comments * address jared's requests on #153 * add the file that i renamed the wrong way --------- Co-authored-by: Jared Thomas <jaredthomas68@users.noreply.github.com>
* added viewshed and empty test component. * Bump version from 0.1.0-beta0 to 0.1.0-beta1 * Bump version from 0.1.0-beta1 to 0.1.0-beta2 * viewshed should be done * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * restore change i didn't like --------- Co-authored-by: Jared Thomas <jaredthomas68@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Bump version from 0.1.0-beta0 to 0.1.0-beta1 * Bump version from 0.1.0-beta1 to 0.1.0-beta2 * removed zero velocity rows from floris results * adjust values with lt one percent error due to renormalization after wind resource pdf adjustment --------- Co-authored-by: Jared Thomas <jaredthomas68@users.noreply.github.com>
* Bump version from 0.1.0-beta0 to 0.1.0-beta1 * Bump version from 0.1.0-beta1 to 0.1.0-beta2 * prototype stdout/stderr capturing implemented. * missed a bunch, trying again. * fix bounds manager * adjust file paths * clear ipynb * remove viz script which isn't actually involved in that pr * Apply typo suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fixed black formatting * wip logging with iterations * black reformatting * remove messy iteration debug statements * black reformat again * update optimization demo * update logging code for error handling and docs * made stdio capture optional modeling option and updated * bring floris input file generator in with logger * added case name to address @jaredthomas68's comment on #161 * cleanup some iter_count discovery and defaulting code w/ multiple returns * updated the logging docstrings * ard system fixed * fixing stuff and added some features related to the fixes * try again to overcome windows error * add teardown to fix windows file access issue * use case_name distinction to make sure the reports end up in unique places * wip try teardown to fix file access on windows * fix discovered typo, test mistake * added another necessary teardown * forgot two more * retry * black reformat... * adjust case names for better use * black reformat... * ... stupid omission --------- Co-authored-by: Jared Thomas <jaredthomas68@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Bump version from 0.1.0-beta0 to 0.1.0-beta1 * Bump version from 0.1.0-beta1 to 0.1.0-beta2 * updated tests to check jitter * address comments from copilot * add substation test * deal with jared's comments * black reformat and adding comments jared asked for * added convenience printing to test. * final black reformatting --------- Co-authored-by: Jared Thomas <jaredthomas68@users.noreply.github.com>
* Bump version from 0.1.0-beta0 to 0.1.0-beta1 * Bump version from 0.1.0-beta1 to 0.1.0-beta2 * added NSGA2 to optimizer options * removed zero velocity rows from floris results * add example 06 * udpate * adjust pyproject to use dev branch * added gfortran for running on GH action runner * undo dev branching * black reformat plus added copilot-requested changes for viz utils * added forgotten file * add unit testing for nsga2 implementation * address @jaredthomas68 comments * add ard yaml --------- Co-authored-by: Jared Thomas <jaredthomas68@users.noreply.github.com>
* fix logomaker * black reformat
* Bump version from 0.1.0-beta0 to 0.1.0-beta1 * Bump version from 0.1.0-beta1 to 0.1.0-beta2 * update for WISDEM/ORBIT pyrite standard value changes * fix typo --------- Co-authored-by: Jared Thomas <jaredthomas68@users.noreply.github.com>
* bring in the exclusions and their viz implications * added exclusion code * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * new gold standard test, weird failure * fixed value of the exclusion distance; still failing now on two: mysterious sign flip, sometimes... * add a boundary test case that lights up the strange error * rename and add some tests * added exclusion test even though it's in tatters * debugging * use switch instead of pad to fix boundary in/out identification. also clean up debug statements * black reformat * black reformat --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Jared Thomas <jaredthomas68@gmail.com>
* Bump version from 0.1.0-beta0 to 0.1.0-beta1 * Bump version from 0.1.0-beta1 to 0.1.0-beta2 * update for WISDEM/ORBIT pyrite standard value changes * black v2026 reformat --------- Co-authored-by: Jared Thomas <jaredthomas68@users.noreply.github.com>
* bring in the exclusions and their viz implications * added exclusion code * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * added eagle density code and tested it * fix filepath * improved documentation, added and tested derivatives on eagles splines * black reformat * first tranche of copilot changes * second tranche of copilot fixes * Apply suggestions from copilot code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * more consistent error messages * black reformat * new gold standard test, weird failure * fixed value of the exclusion distance; still failing now on two: mysterious sign flip, sometimes... * add a boundary test case that lights up the strange error * rename and add some tests * added exclusion test even though it's in tatters * debugging * use switch instead of pad to fix boundary in/out identification. also clean up debug statements * black reformat * black reformat * address jared comments * fix accidentally stashed and dropped changes * black reformat... * fix calling convention * black are you kidding me --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Jared Thomas <jaredthomas68@gmail.com>
Co-authored-by: Cory Frontin <cory.frontin@nrel.gov>
* create house style update * update house style to actually work
* Bump version from 0.1.0-beta0 to 0.1.0-beta1 * Bump version from 0.1.0-beta1 to 0.1.0-beta2 * eliminating wrongthink just kidding removed references to WISDEM repo and replaced with renamed NLRWindSystems --------- Co-authored-by: Cory Frontin <cory.frontin@nrel.gov>
* Bump version from 0.1.0-beta0 to 0.1.0-beta1 * Bump version from 0.1.0-beta1 to 0.1.0-beta2 * eliminating wrongthink just kidding removed references to WISDEM repo and replaced with renamed NLRWindSystems --------- Co-authored-by: Jared Thomas <jaredthomas68@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR is a broad “beta.3” release candidate that restructures the test suite under test/ard/**, adds new analysis/constraint components (e.g., viewshed, exclusions, eagle density), introduces component-level stdout/stderr capture utilities, and updates docs/examples/dependencies to reflect the repository rename and newer WISDEM support.
Changes:
- Restructure/expand unit + system test coverage (many new tests + updated scripts/CI paths).
- Add new modeling components/utilities: viewshed area, windIO polygon exclusions, eagle density constraint, plotting/house styles, and OpenMDAO component log capture.
- Update examples/docs/metadata for repository rename + objective schema changes (
objective→objectives) and dependency/runtime constraints.
Reviewed changes
Copilot reviewed 58 out of 115 changed files in this pull request and generated 15 comments.
Show a summary per file
| File | Description |
|---|---|
| test/unit/ard/viz/init.py | Legacy test-package init (pre-restructure path). |
| test/unit/ard/cost/test_orbit_wrap_baseline_farm.npz | Legacy pyrite artifact (pre-restructure path). |
| test/unit/ard/collection/test_optiwindnet.py | Removed legacy optiwindnet unit test (migrated to new test layout). |
| test/run_local_test_unit.sh | Update local unit test runner paths to test/ard/unit. |
| test/run_local_test_system.sh | Update local system test runner paths to test/ard/system. |
| test/ard/unit/viz/test_utils.py | New tests for ard.viz.utils.get_plot_range. |
| test/ard/unit/viz/test_plot_layout.py | New tests for layout plotting component. |
| test/ard/unit/viz/init.py | New test-package init for viz tests. |
| test/ard/unit/utils/test_utils.py | Placeholder utils unit test file. |
| test/ard/unit/utils/test_matematics.py | New tests for ard.utils.mathematics smooth ops + gradients. |
| test/ard/unit/utils/test_io.py | New tests for replace_key_value. |
| test/ard/unit/utils/test_geometry.py | Expanded geometry tests (ray casting, padding, edge cases). |
| test/ard/unit/test_wind_query.py | New tests for WindQuery setters/validity + FLORIS interop. |
| test/ard/unit/offshore/test_mooringdesign.py | New tests for constant-depth mooring design helpers/component. |
| test/ard/unit/layout/test_viewshed.py | New tests for viewshed helper funcs + ViewshedAreaComp. |
| test/ard/unit/layout/test_templates.py | New tests for layout template base classes. |
| test/ard/unit/layout/test_sunflower_7D_pyrite.npz | New pyrite artifact for sunflower layout @ 7D. |
| test/ard/unit/layout/test_sunflower_4D_pyrite.npz | New pyrite artifact for sunflower layout @ 4D. |
| test/ard/unit/layout/test_sunflower.py | New tests for sunflower layout incl. pyrite validation. |
| test/ard/unit/layout/test_spacing.py | New spacing function/component tests + totals check. |
| test/ard/unit/layout/test_fullfarm.py | New tests for full-farm landuse area calculations. |
| test/ard/unit/layout/test_boundary.py | Expanded boundary distance tests (reversed polys/triangles/offsets). |
| test/ard/unit/layout/init.py | New test-package init for layout tests. |
| test/ard/unit/layout/.gitignore | Ignore layout pytest output dirs. |
| test/ard/unit/geographic/test_geomorphology_depth_default_pyrite.npz | New geographic pyrite artifact. |
| test/ard/unit/geographic/test_geomorphology_depth_default_gradients_pyrite.npz | New geographic gradients pyrite artifact. |
| test/ard/unit/farm_aero/test_templates.py | New tests for farm aero templates. |
| test/ard/unit/farm_aero/test_floris.py | New tests for FLORIS wrappers incl. pyrite validation. |
| test/ard/unit/farm_aero/init.py | New test-package init for farm_aero tests. |
| test/ard/unit/eco/test_eagle_density.py | New tests for eagle density component + partials. |
| test/ard/unit/eco/inputs/ard_system_eagle_density.yaml | New eco test input YAML. |
| test/ard/unit/cost/test_wisdem_wrap.py | New WISDEM wrapper tests for LandBOSSE/ORBIT + pyrite. |
| test/ard/unit/cost/test_spacing_approximations.py | New tests for spacing approximations component. |
| test/ard/unit/cost/test_orbit_wrap_baseline_farm.npz | New cost pyrite artifact (ORBIT). |
| test/ard/unit/cost/test_landbosse_wrap_baseline_farm.npz | New cost pyrite artifact (LandBOSSE). |
| test/ard/unit/cost/init.py | New test-package init for cost tests. |
| test/ard/unit/collection/test_templates.py | New tests for collection template base class. |
| test/ard/unit/collection/test_optiwindnet_pyrite.npz | New unit pyrite artifact for optiwindnet outputs. |
| test/ard/unit/collection/init.py | New test-package init for collection tests. |
| test/ard/unit/api/test_multiobjective.py | New tests for multiobjective setup + NSGA2 driver usage. |
| test/ard/unit/api/test_interface_unit.py | Update invalid-default-system error matching formatting. |
| test/ard/unit/api/inputs_onshore/windio.yaml | New test windIO YAML under restructured tests. |
| test/ard/unit/api/inputs_onshore/ard_system_multiobjective.yaml | New/updated multiobjective test system definition. |
| test/ard/unit/api/inputs_onshore/ard_system_bad_windio.yaml | Update schema: objective → objectives. |
| test/ard/unit/api/inputs_onshore/ard_system_NSGA2.yaml | New/updated NSGA2 test system definition. |
| test/ard/system/offshore/test_mooring_packing.py | New system test for mooring + spacing + collection constraints. |
| test/ard/system/geometry/test_constraints.py | Update expected validation values + add TODO note. |
| test/ard/system/geometry/test_boundary_distances_7p0D_pyrite.npz | New system pyrite artifact. |
| test/ard/system/geometry/test_boundary_distances_5p0D_pyrite.npz | New system pyrite artifact. |
| test/ard/system/geometry/test_boundary_distances_2p0D_pyrite.npz | New system pyrite artifact. |
| test/ard/system/cost/test_spacing_approximations_connections.py | New system test for LandBOSSE spacing approximation wiring. |
| test/ard/system/collection/test_optiwindnet_pyrite.npz | New system pyrite artifact for optiwindnet outputs. |
| test/ard/system/collection/test_optiwindnet.py | New system test combining layout + aero + collection with pyrite validation. |
| test/ard/system/api/test_interface.py | Add cleanup in teardown + update expected numeric baselines. |
| test/ard/system/api/test_LCOE_OFL_stack_pyrite.npz | Update LCOE stack pyrite artifact. |
| test/ard/system/api/test_LCOE_OFL_stack.py | Switch input path + add teardown cleanup + fix pyrite path. |
| test/ard/system/api/test_LCOE_OFB_stack_pyrite.npz | Update LCOE stack pyrite artifact. |
| test/ard/system/api/test_LCOE_OFB_stack.py | Add teardown cleanup + fix pyrite path. |
| test/ard/system/api/test_LCOE_LB_stack_pyrite.npz | Update LCOE stack pyrite artifact. |
| test/ard/system/api/test_LCOE_LB_stack.py | Add teardown cleanup + fix pyrite path. |
| test/ard/system/api/inputs_onshore/ard_system.yaml | Add case_name + objective → objectives. |
| test/ard/system/api/inputs_offshore_monopile/ard_system.yaml | Add case_name + objective → objectives. |
| test/ard/system/api/inputs_offshore_floating/ard_system.yaml | Add case_name + objective → objectives. |
| test/ard/data/wrg_example.wrg | Add test WRG input data. |
| test/ard/data/power_thrust_table_ccblade_IEA-3p4-130-RWT.csv | Add test power/thrust table. |
| test/ard/data/power_thrust_table_ccblade_IEA-22-284-RWT.csv | Add test power/thrust table. |
| pyproject.toml | Bump version, relax python constraint, update deps (numpy/wisdem). |
| examples/06_onshore_multiobjective/inputs/windio.yaml | New example windIO input YAML. |
| examples/06_onshore_multiobjective/inputs/ard_system.yaml | New multiobjective example using NSGA2 + objectives list. |
| examples/05_onshore_batch/inputs/ard_system.yaml | objective → objectives + minor formatting/link updates. |
| examples/03_offshore_floating_custom_system/inputs/ard_system.yaml | objective → objectives. |
| examples/02_offshore_fixed/inputs/ard_system.yaml | objective → objectives. |
| examples/01_onshore/inputs/ard_system.yaml | Add case_name + stdio_capture + objective → objectives. |
| docs/testing.md | Update issue URL to new org (contains duplicated sentence). |
| docs/installation.md | Update clone URL + fix conda command snippets. |
| assets/logomaker/inputs/ard_system.yaml | Add aero options + objective → objectives. |
| assets/house_style/stylesheet_nrel.mplstyle | Add NREL color cycle. |
| assets/house_style/stylesheet_ard_notex.mplstyle | Add non-TeX Ard matplotlib style. |
| assets/house_style/stylesheet_ard.mplstyle | Add TeX-enabled Ard matplotlib style. |
| ard/viz/utils.py | Add get_plot_range helper. |
| ard/viz/layout.py | Plot windIO exclusions polygons in layout plotting. |
| ard/viz/house_style.py | Add helper to return matplotlib stylesheet URIs. |
| ard/utils/logging.py | Add component-level stdout/stderr capture + storage directory helpers. |
| ard/utils/geometry.py | Geometry improvements (pad polygon, updated ray casting internals). |
| ard/layout/viewshed.py | Add viewshed computations + ViewshedAreaComp. |
| ard/layout/sunflower.py | Minor formatting cleanup. |
| ard/layout/gridfarm.py | Use units=None for unitless spacing inputs. |
| ard/layout/exclusions.py | Add polygon-exclusion distance component and derivatives via JAX. |
| ard/farm_aero/templates.py | Make aero.return_turbine_output optional via .get(...). |
| ard/farm_aero/floris.py | Add component log capture + new storage directory usage + minor refactor. |
| ard/eco/eagle_density.py | Add eagle density component (spline eval + exact partials). |
| ard/cost/orbit_wrap.py | Update ORBIT repo link in docstring. |
| ard/collection/optiwindnet_wrap.py | Add perturbations/warnings for coincident turbine/substation coordinates. |
| ard/api/interface.py | Add NSGA2 driver support, multiobjective schema (objectives), and output cleanup. |
| ard/init.py | Import viz subpackage + adjust BASE_DIR construction. |
| README.md | Rewrite/update links, install instructions, and repo rename references. |
| .gitignore | Ignore case_files and ard_prob_out. |
| .github/workflows/python-tests-consolidated.yaml | Update CI test paths to test/ard/unit and test/ard/system. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| # extract the iter count if it exists, returning and handling none otherwise | ||
| problem_meta = getattr(component, "_problem_meta", None) | ||
| model = problem_meta.get("model_ref", lambda _: None)() |
Copilot
AI
Feb 6, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
problem_meta can be None here, in which case problem_meta.get(...) will raise an AttributeError. Guard for a missing _problem_meta (and missing model_ref) and return None early when that metadata isn't available.
| model = problem_meta.get("model_ref", lambda _: None)() | |
| if problem_meta is None: | |
| return None | |
| model_ref = problem_meta.get("model_ref") | |
| if model_ref is None: | |
| return None | |
| model = model_ref() |
| @@ -279,6 +318,8 @@ def set_up_system_recursive( | |||
| units="m", | |||
| ) | |||
Copilot
AI
Feb 6, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
set_input_defaults is being called without providing a default value (val). This likely doesn't achieve the intended initialization (and may error depending on OpenMDAO version). Pass an explicit default array (e.g., from the windIO layout coordinates or zeros sized to N_turbines) so the promoted inputs have a defined starting value.
test/ard/unit/api/inputs_onshore/ard_system_multiobjective.yaml
Outdated
Show resolved
Hide resolved
|
|
||
| # create the OpenMDAO model | ||
| model = om.Group() | ||
| collection_mini = model.add_subsystem( |
Copilot
AI
Feb 6, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Variable collection_mini is not used.
|
|
||
| # create the OpenMDAO model | ||
| model = om.Group() | ||
| collection_mini = model.add_subsystem( |
Copilot
AI
Feb 6, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Variable collection_mini is not used.
|
|
||
| optiwindnet = pytest.importorskip("optiwindnet") | ||
|
|
||
| from optiwindnet.plotting import gplot |
Copilot
AI
Feb 6, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import of 'gplot' is not used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
jaredthomas68
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few changes need to be made. I'm happy to make them if you would like.
| # clean out any pre-existing results for this problem | ||
| print("Running OpenMDAO util to clean the output directories...") | ||
| prepend_tabs_to_stdio(clean_outputs)(recurse=True, prompt=False) | ||
| print("... done.\n") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a very good point
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like git missed the renaming on this file
Remove pad_polygon
Remove tests for no longer used `pad_polygon` function
Remove duplicate line Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
jaredthomas68
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be ready to release once the tests pass unless there are other changes you want to make first @cfrontin
A bunch of odds and ends: