Skip to content
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

Tutorial cleanup #339

Merged
merged 10 commits into from
Apr 23, 2024
Merged

Conversation

michaelcdevin
Copy link
Collaborator

@michaelcdevin michaelcdevin commented Apr 21, 2024

Description

This is a major PR with various edits of the four tutorials included in the examples directory. This PR includes the following changes:

  • Tutorial 1 is substantially reworked to make it easier to follow
    • Part 1 is reordered to define the wave conditions, then the WEC object, then the objective function in sequence. Currently, Tutorial 1 starts defining the WEC object, switches to defining the wave condition, then goes back to the WEC object, which can be difficult to follow.
    • More details are added about some WecOptTool fundamentals that could be confusing to new users (or at least were confusing to me!)
    • Fixes Tutorial 1 inconsistent force constraints #293
  • Changed the plot size and path lengths of the Sankey diagram in Tutorial 4 so the text is not overlapping
  • Adjusted markdown to make equations and lists appear correctly, fixing Minor rendering problems in documentation #320
  • Changed colorcycles and colormaps in Tutorials 1 and 2 to be colorblind-friendly
  • Added more explanation in a few spots where the process being taken was not sufficiently clear
  • Added more links back in following Remove linkcheck #287
  • Split up markdown so each sentence is a separate line to make git diff easier to read in the future (this was done occasionally before, but inconsistently)
  • Made various editorial changes (word and syntax adjustments, reordering text to improve sentence readability, changing paragraphs into list where appropriate, adding emphasis to important points, adding consistent voice across tutorials) to improve general readability

Type of PR

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

Checklist for PR

@coveralls
Copy link

coveralls commented Apr 21, 2024

Pull Request Test Coverage Report for Build 8792786632

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 94.034%

Totals Coverage Status
Change from base Build 8545890991: 0.0%
Covered Lines: 2506
Relevant Lines: 2665

💛 - Coveralls

examples/tutorial_1_WaveBot.ipynb Outdated Show resolved Hide resolved
examples/tutorial_4_Pioneer.ipynb Outdated Show resolved Hide resolved
examples/tutorial_2_AquaHarmonics.ipynb Show resolved Hide resolved
examples/tutorial_2_AquaHarmonics.ipynb Outdated Show resolved Hide resolved
examples/tutorial_3_LUPA.ipynb Outdated Show resolved Hide resolved
examples/tutorial_3_LUPA.ipynb Outdated Show resolved Hide resolved
examples/tutorial_3_LUPA.ipynb Outdated Show resolved Hide resolved
@jtgrasb
Copy link
Collaborator

jtgrasb commented Apr 23, 2024

Thanks for the updates! Looks ready for merging to me.

@michaelcdevin michaelcdevin merged commit ea039c5 into sandialabs:dev Apr 23, 2024
10 checks passed
michaelcdevin added a commit that referenced this pull request May 6, 2024
* 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 (#313)

* Make uniform shift default false and fix test_core

* Allow for non-uniform shift for impedance

* update docstrings (#326)

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

* run CI + codeQL on dev PRs/pushses

* Fix test failures (#330)

* fix tests

* fix pioneer

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

* Update test_integration with new scaling (#333)

* Phase Realizations Demo and Docs (#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 (#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 #332

* nodf -> ndof (#334)

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

* Tutorial cleanup (#339)

* run CI on PRs against dev branch

* revamped tutorial 1, including fix for #293

* more tutorial cleanup and editorial changes

* more cleanup and incorporated changes in #315

* fixed tutorial 2 colormaps

* finishing touches

* reverted a few accidental changes

* fixes as per Jeff's review comments

---------

Co-authored-by: Ryan Coe <rcoe@sandia.gov>

* Utils dev - replaces old utilities PR (#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 <rcoe@sandia.gov>
Co-authored-by: Michael Devin <michaelcdevin@outlook.com>

* Post process docstrings; use loops for multiple realizations (#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 <cmichel@sandia.gov>
Co-authored-by: Carlos A. Michelén Ströfer <c.michelen.strofer@gmail.com>
Co-authored-by: jtgrasb <jtgrasb@sandia.gov>
Co-authored-by: jtgrasb <87095491+jtgrasb@users.noreply.github.com>

* v3.0.0

---------

Co-authored-by: Carlos A. Michelén Ströfer <cmichel@sandia.gov>
Co-authored-by: jtgrasb <87095491+jtgrasb@users.noreply.github.com>
Co-authored-by: Ryan Coe <rcoe@sandia.gov>
Co-authored-by: Daniel Gaebele <86246113+dtgaebe@users.noreply.github.com>
Co-authored-by: Carlos A. Michelén Ströfer <c.michelen.strofer@gmail.com>
Co-authored-by: jtgrasb <jtgrasb@sandia.gov>
@michaelcdevin michaelcdevin deleted the tutorial_cleanup branch May 7, 2024 01:09
@michaelcdevin michaelcdevin mentioned this pull request May 8, 2024
12 tasks
michaelcdevin added a commit that referenced this pull request Jun 21, 2024
* 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 (#313)

* Make uniform shift default false and fix test_core

* Allow for non-uniform shift for impedance

* update docstrings (#326)

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

* run CI + codeQL on dev PRs/pushses

* Fix test failures (#330)

* fix tests

* fix pioneer

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

* Update test_integration with new scaling (#333)

* Phase Realizations Demo and Docs (#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 (#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 #332

* nodf -> ndof (#334)

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

* Tutorial cleanup (#339)

* run CI on PRs against dev branch

* revamped tutorial 1, including fix for #293

* more tutorial cleanup and editorial changes

* more cleanup and incorporated changes in #315

* fixed tutorial 2 colormaps

* finishing touches

* reverted a few accidental changes

* fixes as per Jeff's review comments

---------

Co-authored-by: Ryan Coe <rcoe@sandia.gov>

* Utils dev - replaces old utilities PR (#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 <rcoe@sandia.gov>
Co-authored-by: Michael Devin <michaelcdevin@outlook.com>

* Post process docstrings; use loops for multiple realizations (#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 <cmichel@sandia.gov>
Co-authored-by: Carlos A. Michelén Ströfer <c.michelen.strofer@gmail.com>
Co-authored-by: jtgrasb <jtgrasb@sandia.gov>
Co-authored-by: jtgrasb <87095491+jtgrasb@users.noreply.github.com>

* v3.0.0

* Lower tolerance for new test to fix CI failing occasionally

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

* Merge to dev, not main (#349)

* Dev version of documentation site (#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 (#346)

* CI workflow cleanup (#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

---------

Co-authored-by: Carlos A. Michelén Ströfer <cmichel@sandia.gov>
Co-authored-by: jtgrasb <87095491+jtgrasb@users.noreply.github.com>
Co-authored-by: Ryan Coe <rcoe@sandia.gov>
Co-authored-by: Daniel Gaebele <86246113+dtgaebe@users.noreply.github.com>
Co-authored-by: Carlos A. Michelén Ströfer <c.michelen.strofer@gmail.com>
Co-authored-by: jtgrasb <jtgrasb@sandia.gov>
jtgrasb added a commit that referenced this pull request Aug 13, 2024
…ing) (#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 (#313)

* Make uniform shift default false and fix test_core

* Allow for non-uniform shift for impedance

* update docstrings (#326)

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

* run CI + codeQL on dev PRs/pushses

* Fix test failures (#330)

* fix tests

* fix pioneer

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

* Update test_integration with new scaling (#333)

* Phase Realizations Demo and Docs (#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 (#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 #332

* nodf -> ndof (#334)

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

* Tutorial cleanup (#339)

* run CI on PRs against dev branch

* revamped tutorial 1, including fix for #293

* more tutorial cleanup and editorial changes

* more cleanup and incorporated changes in #315

* fixed tutorial 2 colormaps

* finishing touches

* reverted a few accidental changes

* fixes as per Jeff's review comments

---------

Co-authored-by: Ryan Coe <rcoe@sandia.gov>

* Utils dev - replaces old utilities PR (#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 <rcoe@sandia.gov>
Co-authored-by: Michael Devin <michaelcdevin@outlook.com>

* Post process docstrings; use loops for multiple realizations (#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 <cmichel@sandia.gov>
Co-authored-by: Carlos A. Michelén Ströfer <c.michelen.strofer@gmail.com>
Co-authored-by: jtgrasb <jtgrasb@sandia.gov>
Co-authored-by: jtgrasb <87095491+jtgrasb@users.noreply.github.com>

* v3.0.0

* Lower tolerance for new test to fix CI failing occasionally

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

* Merge to dev, not main (#349)

* Dev version of documentation site (#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 (#346)

* Add data and update tutorial 4

* CI workflow cleanup (#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 (#360)

* Revert "v3.0.1 (#360)" (#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 <cmichel@sandia.gov>
Co-authored-by: Ryan Coe <rcoe@sandia.gov>
Co-authored-by: Daniel Gaebele <86246113+dtgaebe@users.noreply.github.com>
Co-authored-by: Michael Devin <michaelcdevin@outlook.com>
Co-authored-by: Carlos A. Michelén Ströfer <c.michelen.strofer@gmail.com>
Co-authored-by: mcdevin <mcdevin@sandia.gov>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Minor rendering problems in documentation Tutorial 1 inconsistent force constraints
4 participants