Skip to content

Conversation

michaelcdevin
Copy link
Contributor

Description

With autograd being updated to work with NumPy v2.0 as of autograd v1.7.0 (yay!), we can now remove the version limitation for NumPy. This required updating a few references to variable aliases that NumPy v2 removes, but should still be compatible with earlier NumPy versions.

Type of PR

  • Bug fix
  • New feature
  • Documentation
  • Other: (specify)

Checklist for PR

cmichelenstrofer and others added 26 commits August 2, 2024 16:12
* bug bix : DC and Nyquist frequency should not be devided by two before ifft

* Changed td_to_fd to scale single sided frequency components rather than TD signal

* minor bug fix from issue332 sandialabs#332
* added initial file changes based on sphinx_multiversion docs and WEC-Sim implementation

* removed sphinx-multiversion since it is no longer supported and made manual multiversion

* now uses absolute paths, commented out linkcheck for debugging

* fixed docstring errors in utilities module

* updating files again that somehow got reverted

* fixing path in conf.py

* don't run tutorials (will revert later)

* handle file moves correctly, fixed if statement to make other versions appear

* fixed two bugs in versions template

* reverted temp changes, changes latest to main

* switched latest to main

* main branch now in root directory of pages

* fixed URLs with change from last commit

* make other branches visible before building

* switched main branch tag for more testing

* fixed typo

* switched dev branch to an existing branch

* renamed main to latest, changed version.html file name to avoid confusion

* added prints about moving files so Sphinx output isn't misleading

* fixed typo with quotations

* changed versions.html name back because that broke things I guess

* modified contributing documentation to reflect changes

* add logic to remove duplicate 'latest' branch

* Fixed pathing when already on latest

* remove typo

* Troubleshooting complete, switching back to correct branches for deployment

* Removed extra word in docstring

* removed redundant function

* fixed pathing so returns to same file (and fixes tutorial/API docs)

* changed latest branch for demonstration

* switched back latest branch for deployment
* removed conda environment from workflows since newer capytaine/wavespectra work with Windows

* fixed unnecessary capitalization

* still create CI conda environment to fix Mac environment failures

* added conda env fully back in, push workflow deploys docs, split PR workflow

* conda environment activates again

* mambaforge instead of miniforge

* manual cache reset

* reset to older version of setup-miniconda to troubleshoot
…ing) (sandialabs#362)

* Update CONTRIBUTING.md to indicate PRs should be to the new `dev` branch

* Update RELEASING.md to reflect new workflow with the `dev` branch

* Set Default uniform_shift to False (sandialabs#313)

* Make uniform shift default false and fix test_core

* Allow for non-uniform shift for impedance

* update docstrings (sandialabs#326)

* damping naming and consistently change radiation damping (sandialabs#328)

* run CI + codeQL on dev PRs/pushses

* Fix test failures (sandialabs#330)

* fix tests

* fix pioneer

* actually test power solution for irregular wave (sandialabs#327)

* Update test_integration with new scaling (sandialabs#333)

* Phase Realizations Demo and Docs (sandialabs#315)

* Pioneer tutorial realizations demo

Add frequency array and realization study to beginning of pioneer tutorial

* Update pioneer

* Clean pioneer and update docs

* remove print

* Units

* Update pioneer plots

* Waves before frequencies

* Explain less frequencies

* Minor updates

* Update pioneer

* Merge branch 'dev' of https://github.com/sandialabs/WecOptTool into phases_demo

* issue 321 fd_to_td() bug (sandialabs#329)

* bug bix : DC and Nyquist frequency should not be devided by two before ifft


* Changed td_to_fd to scale single sided frequency components rather than TD signal

* minor bug fix from issue332 sandialabs#332

* nodf -> ndof (sandialabs#334)

* add DOI for Daniel's paper (sandialabs#336)

* Tutorial cleanup (sandialabs#339)

* run CI on PRs against dev branch

* revamped tutorial 1, including fix for sandialabs#293

* more tutorial cleanup and editorial changes

* more cleanup and incorporated changes in sandialabs#315

* fixed tutorial 2 colormaps

* finishing touches

* reverted a few accidental changes

* fixes as per Jeff's review comments

---------

Co-authored-by: Ryan Coe <[email protected]>

* Utils dev - replaces old utilities PR (sandialabs#343)

* run CI on PRs against dev branch

* coppied fundamental utility files

* import utilities module

* added utilities funtions to tut1

* added bem plot from utils

* added bem plot from utils

* updated sankey plot

* updated check_radiation_damping

* cleared outputs

* corrected bug

* changed Zi to hydro_impedance to be consistent with our variables name python convention

* PR review edits

* add grid to plots

* removed draft functions in utilities.py

* typo

* Fixed one more typo I found while reviewing Daniel's changes

---------

Co-authored-by: Ryan Coe <[email protected]>
Co-authored-by: Michael Devin <[email protected]>

* Post process docstrings; use loops for multiple realizations (sandialabs#337)

* post_processing docstrings

- examples
- parameters (order)

* handle multiple phase realizations internally

* Update wecopttool/core.py

* making outputs lists

* Update implementation to function with tutorial 1 for now

* Update tutorials

* Update LUPA

* Make sure same WEC is passed in

* Add test_utilities

Revert "Add test_utilities"

This reverts commit 27399f0.

* Update utilities module

* Update utilities

* Update test_utilities

* Update tutorial 1 utilities call

---------

Co-authored-by: Carlos A. Michelén Ströfer <[email protected]>
Co-authored-by: Carlos A. Michelén Ströfer <[email protected]>
Co-authored-by: jtgrasb <[email protected]>
Co-authored-by: jtgrasb <[email protected]>

* v3.0.0

* Lower tolerance for new test to fix CI failing occasionally

* hyperlinks no longer have formatting, plus other small adjustments (sandialabs#348)

* Merge to dev, not main (sandialabs#349)

* Dev version of documentation site (sandialabs#347)

* added initial file changes based on sphinx_multiversion docs and WEC-Sim implementation

* removed sphinx-multiversion since it is no longer supported and made manual multiversion

* now uses absolute paths, commented out linkcheck for debugging

* fixed docstring errors in utilities module

* updating files again that somehow got reverted

* fixing path in conf.py

* don't run tutorials (will revert later)

* handle file moves correctly, fixed if statement to make other versions appear

* fixed two bugs in versions template

* reverted temp changes, changes latest to main

* switched latest to main

* main branch now in root directory of pages

* fixed URLs with change from last commit

* make other branches visible before building

* switched main branch tag for more testing

* fixed typo

* switched dev branch to an existing branch

* renamed main to latest, changed version.html file name to avoid confusion

* added prints about moving files so Sphinx output isn't misleading

* fixed typo with quotations

* changed versions.html name back because that broke things I guess

* modified contributing documentation to reflect changes

* add logic to remove duplicate 'latest' branch

* Fixed pathing when already on latest

* remove typo

* Troubleshooting complete, switching back to correct branches for deployment

* Removed extra word in docstring

* removed redundant function

* fixed pathing so returns to same file (and fixes tutorial/API docs)

* changed latest branch for demonstration

* switched back latest branch for deployment

* updated with new Capytaine docs URL

* Add warnings when adding inertia and hydrostatic stiffness automatically (sandialabs#346)

* Add data and update tutorial 4

* CI workflow cleanup (sandialabs#352)

* removed conda environment from workflows since newer capytaine/wavespectra work with Windows

* fixed unnecessary capitalization

* still create CI conda environment to fix Mac environment failures

* added conda env fully back in, push workflow deploys docs, split PR workflow

* conda environment activates again

* mambaforge instead of miniforge

* manual cache reset

* reset to older version of setup-miniconda to troubleshoot

* Specify NumPy version <2.0 since it breaks autograd

* v3.0.1 (sandialabs#360)

* Revert "v3.0.1 (sandialabs#360)" (sandialabs#361)

This reverts commit f79ff8b.

* Update pyproject.toml

* Update pioneer tutorial with nl spring and empirical model

* Clear outputs

* Consolidate empirical data and fix small issues

* Remove consolidation file

---------

Co-authored-by: Carlos A. Michelén Ströfer <[email protected]>
Co-authored-by: Ryan Coe <[email protected]>
Co-authored-by: Daniel Gaebele <[email protected]>
Co-authored-by: Michael Devin <[email protected]>
Co-authored-by: Carlos A. Michelén Ströfer <[email protected]>
Co-authored-by: mcdevin <[email protected]>
* added production and debug options for docs build

* limited choices for input options
* added reference to Devin et al. 2024 (Pioneer journal paper)

* use DOI without "doi.org" prefix

---------

Co-authored-by: Ryan Coe <[email protected]>
* added missing input argument

* fixed HTML pages destination folder not being version specific
* Update CONTRIBUTING.md to indicate PRs should be to the new `dev` branch

* Update RELEASING.md to reflect new workflow with the `dev` branch

* Set Default uniform_shift to False (sandialabs#313)

* Make uniform shift default false and fix test_core

* Allow for non-uniform shift for impedance

* update docstrings (sandialabs#326)

* damping naming and consistently change radiation damping (sandialabs#328)

* run CI + codeQL on dev PRs/pushses

* Fix test failures (sandialabs#330)

* fix tests

* fix pioneer

* actually test power solution for irregular wave (sandialabs#327)

* Update test_integration with new scaling (sandialabs#333)

* Phase Realizations Demo and Docs (sandialabs#315)

* Pioneer tutorial realizations demo

Add frequency array and realization study to beginning of pioneer tutorial

* Update pioneer

* Clean pioneer and update docs

* remove print

* Units

* Update pioneer plots

* Waves before frequencies

* Explain less frequencies

* Minor updates

* Update pioneer

* Merge branch 'dev' of https://github.com/sandialabs/WecOptTool into phases_demo

* issue 321 fd_to_td() bug (sandialabs#329)

* bug bix : DC and Nyquist frequency should not be devided by two before ifft


* Changed td_to_fd to scale single sided frequency components rather than TD signal

* minor bug fix from issue332 sandialabs#332

* nodf -> ndof (sandialabs#334)

* add DOI for Daniel's paper (sandialabs#336)

* Tutorial cleanup (sandialabs#339)

* run CI on PRs against dev branch

* revamped tutorial 1, including fix for sandialabs#293

* more tutorial cleanup and editorial changes

* more cleanup and incorporated changes in sandialabs#315

* fixed tutorial 2 colormaps

* finishing touches

* reverted a few accidental changes

* fixes as per Jeff's review comments

---------

Co-authored-by: Ryan Coe <[email protected]>

* Utils dev - replaces old utilities PR (sandialabs#343)

* run CI on PRs against dev branch

* coppied fundamental utility files

* import utilities module

* added utilities funtions to tut1

* added bem plot from utils

* added bem plot from utils

* updated sankey plot

* updated check_radiation_damping

* cleared outputs

* corrected bug

* changed Zi to hydro_impedance to be consistent with our variables name python convention

* PR review edits

* add grid to plots

* removed draft functions in utilities.py

* typo

* Fixed one more typo I found while reviewing Daniel's changes

---------

Co-authored-by: Ryan Coe <[email protected]>
Co-authored-by: Michael Devin <[email protected]>

* Post process docstrings; use loops for multiple realizations (sandialabs#337)

* post_processing docstrings

- examples
- parameters (order)

* handle multiple phase realizations internally

* Update wecopttool/core.py

* making outputs lists

* Update implementation to function with tutorial 1 for now

* Update tutorials

* Update LUPA

* Make sure same WEC is passed in

* Add test_utilities

Revert "Add test_utilities"

This reverts commit 27399f0.

* Update utilities module

* Update utilities

* Update test_utilities

* Update tutorial 1 utilities call

---------

Co-authored-by: Carlos A. Michelén Ströfer <[email protected]>
Co-authored-by: Carlos A. Michelén Ströfer <[email protected]>
Co-authored-by: jtgrasb <[email protected]>
Co-authored-by: jtgrasb <[email protected]>

* v3.0.0

* Lower tolerance for new test to fix CI failing occasionally

* hyperlinks no longer have formatting, plus other small adjustments (sandialabs#348)

* Merge to dev, not main (sandialabs#349)

* Dev version of documentation site (sandialabs#347)

* added initial file changes based on sphinx_multiversion docs and WEC-Sim implementation

* removed sphinx-multiversion since it is no longer supported and made manual multiversion

* now uses absolute paths, commented out linkcheck for debugging

* fixed docstring errors in utilities module

* updating files again that somehow got reverted

* fixing path in conf.py

* don't run tutorials (will revert later)

* handle file moves correctly, fixed if statement to make other versions appear

* fixed two bugs in versions template

* reverted temp changes, changes latest to main

* switched latest to main

* main branch now in root directory of pages

* fixed URLs with change from last commit

* make other branches visible before building

* switched main branch tag for more testing

* fixed typo

* switched dev branch to an existing branch

* renamed main to latest, changed version.html file name to avoid confusion

* added prints about moving files so Sphinx output isn't misleading

* fixed typo with quotations

* changed versions.html name back because that broke things I guess

* modified contributing documentation to reflect changes

* add logic to remove duplicate 'latest' branch

* Fixed pathing when already on latest

* remove typo

* Troubleshooting complete, switching back to correct branches for deployment

* Removed extra word in docstring

* removed redundant function

* fixed pathing so returns to same file (and fixes tutorial/API docs)

* changed latest branch for demonstration

* switched back latest branch for deployment

* updated with new Capytaine docs URL

* Add warnings when adding inertia and hydrostatic stiffness automatically (sandialabs#346)

* CI workflow cleanup (sandialabs#352)

* removed conda environment from workflows since newer capytaine/wavespectra work with Windows

* fixed unnecessary capitalization

* still create CI conda environment to fix Mac environment failures

* added conda env fully back in, push workflow deploys docs, split PR workflow

* conda environment activates again

* mambaforge instead of miniforge

* manual cache reset

* reset to older version of setup-miniconda to troubleshoot

* Specify NumPy version <2.0 since it breaks autograd

* v3.0.1 (sandialabs#360)

* Revert "v3.0.1 (sandialabs#360)" (sandialabs#361)

This reverts commit f79ff8b.

* Update pyproject.toml

* Test out lid feature

* Add lid to pioneer and remove extra files

* Revert LUPA and add lid comment

* Revert LUPA bem data

* Fix pioneer

* Test lid LUPA

* Update LUPA with lid

* LUPA lid

* Revert LUPA unnecessary changes

* Resolve Daniel's suggestions

---------

Co-authored-by: Carlos A. Michelén Ströfer <[email protected]>
Co-authored-by: Ryan Coe <[email protected]>
Co-authored-by: Daniel Gaebele <[email protected]>
Co-authored-by: Michael Devin <[email protected]>
Co-authored-by: Carlos A. Michelén Ströfer <[email protected]>
Co-authored-by: mcdevin <[email protected]>
@michaelcdevin michaelcdevin added upstream Related to a dependency of our package clean-up Tidy up code, fix non-breaking problems labels Jan 14, 2025
@michaelcdevin
Copy link
Contributor Author

I'm keeping this as a draft for now due to some issues with wavespectra cooperating with newer versions of NumPy on Conda, see wavespectra/wavespectra#145. Because wavespectra doesn't have an explicit NumPy <2.0 designation (even though it is still downgrading for some reason), it doesn't downgrade other WecOptTool dependencies, which breaks the CI. So hold off on merging this until the upstream issue with wavespectra is resolved.

@michaelcdevin
Copy link
Contributor Author

Error I'm seeing while running tests/test_integration.py if you're curious:

Windows fatal exception: code 0xWindows fatal exception: code 0xc06d007f

Thread 0x00000b90 (most recent call first):
  File "C:\Users\mcdevin\AppData\Local\miniforge3\envs\wot_py312_conda\Lib\site-packages\numpy\core\numeric.py

I believe numeric.py was one of the "problem modules" that caused autograd to break with NumPy v2.0 originally, so I think the NumPy downgrade due to wavespectra (without it downgrading other packages) is the culprit here.

michaelcdevin and others added 2 commits January 27, 2025 12:10
* switch to Miniforge distribution since Mambaforge is no longer supported

* updated name

* updated to newer GitHub Action version

* changed miniforge variant

* switched to v2 of GH Action since v3 defaults to osx-arm64
@cmichelenstrofer
Copy link
Member

@michaelcdevin would this work now?

@michaelcdevin
Copy link
Contributor Author

@cmichelenstrofer I just tested it and wavespectra is still wanting to downgrade to NumPy 1.26.4 for some reason, and it doesn't look like there's been any movement on wavespectra/wavespectra#145. So still waiting on upstream before this can be merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clean-up Tidy up code, fix non-breaking problems upstream Related to a dependency of our package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants