Skip to content

Commit

Permalink
Apply WEC-Sim#1235 and WEC-Sim#1241 to dev branch (WEC-Sim#1240)
Browse files Browse the repository at this point in the history
* Update master to main (WEC-Sim#1235)
* Rename incorrect main_doc option to root_doc (WEC-Sim#1241)

---------

Co-authored-by: Adam Keester <[email protected]>
  • Loading branch information
H0R5E and akeeste authored Mar 15, 2024
1 parent 7cb7f62 commit 0ffa77a
Show file tree
Hide file tree
Showing 26 changed files with 52,158 additions and 88,665 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ assignees: ''

**The development team requests that before submitting a question on the theory and implementation behind WEC-Sim to first please:**
1. Read through our [WEC-Sim Documentation](http://wec-sim.github.io/WEC-Sim/man/theory.html) with additional description found in our [Advanced Features Section](http://wec-sim.github.io/WEC-Sim/man/advanced_features.html)
1. Review MATLAB source code ([functions](https://github.com/WEC-Sim/WEC-Sim/tree/master/source/functions), [objects](https://github.com/WEC-Sim/WEC-Sim/tree/master/source/objects)) and the Simulink blocks ([libraries](https://github.com/WEC-Sim/WEC-Sim/tree/master/source/lib))
1. Review the curated [WEC-Sim Examples](https://github.com/WEC-Sim/WEC-Sim/tree/master/examples) and the [WEC-Sim applications](https://github.com/WEC-Sim/WEC-Sim_Applications)
1. Review MATLAB source code ([functions](https://github.com/WEC-Sim/WEC-Sim/tree/main/source/functions), [objects](https://github.com/WEC-Sim/WEC-Sim/tree/main/source/objects)) and the Simulink blocks ([libraries](https://github.com/WEC-Sim/WEC-Sim/tree/main/source/lib))
1. Review the curated [WEC-Sim Examples](https://github.com/WEC-Sim/WEC-Sim/tree/main/examples) and the [WEC-Sim applications](https://github.com/WEC-Sim/WEC-Sim_Applications)
1. Review the [WEC-Sim issues page](https://github.com/WEC-Sim/WEC-Sim/issues) which allows you to search past resolved issues or questions that might help answer your own question.

**Note: italicized text below is include as an example and should be updated before submission. If you feel any section is not applicable to your request, please replace with 'N/A' rather than delete a section.**
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Trigger repository dispatch event
on:
push:
branches:
- master
- main
- dev
jobs:
dispatch:
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ name: Documentation
on:
push:
branches:
- master
- main
- dev
pull_request:
branches:
- master
- main
- dev
workflow_dispatch:
concurrency:
Expand Down Expand Up @@ -68,8 +68,10 @@ jobs:
cp docs/_assets/gh-pages.gitignore ${{ env.BUILD_DIR }}/.gitignore
cp docs/_assets/gh-pages-redirect.html ${{ env.BUILD_DIR }}/index.html
cp docs/_assets/gh-pages-readme.md ${{ env.BUILD_DIR }}/README.md
mkdir ${{ env.BUILD_DIR }}/master
cp docs/_assets/gh-pages-redirect.html ${{ env.BUILD_DIR }}/master/index.html
- name: Deploy
if: ${{ github.event_name == 'push' && (env.BRANCH == 'dev' || env.BRANCH == 'master') }}
if: ${{ github.event_name == 'push' && (env.BRANCH == 'dev' || env.BRANCH == 'main') }}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: Run MATLAB tests on master branch
name: Run MATLAB tests on main branch
on:
# Trigger the workflow on push or pull request,
# but only for the master branch
# but only for the main branch
workflow_dispatch: {}
push:
branches:
- master
- main
pull_request:
branches:
- master
- main
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
Expand Down
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ See the License for the specific language governing permissions and
limitations under the License.

See full list of WEC-Sim Developers and Acknowledgements on the
WEC-Sim Website (http://wec-sim.github.io/WEC-Sim/master/index.html).
WEC-Sim Website (http://wec-sim.github.io/WEC-Sim/main/index.html).
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
# Refer to [WEC-Sim documentation](http://wec-sim.github.io/WEC-Sim) for more information.
[![DOI](https://zenodo.org/badge/20451353.svg)](https://zenodo.org/badge/latestdoi/20451353)
[![Documentation](https://github.com/WEC-Sim/WEC-Sim/actions/workflows/docs.yml/badge.svg)](https://github.com/WEC-Sim/WEC-Sim/actions/workflows/docs.yml)
[![Run MATLAB tests on master branch](https://github.com/WEC-Sim/WEC-Sim/actions/workflows/run-tests-master.yml/badge.svg?branch=master)](https://github.com/WEC-Sim/WEC-Sim/actions/workflows/run-tests-master.yml)
[![Run MATLAB tests on main branch](https://github.com/WEC-Sim/WEC-Sim/actions/workflows/run-tests-main.yml/badge.svg?branch=main)](https://github.com/WEC-Sim/WEC-Sim/actions/workflows/run-tests-main.yml)
[![Run MATLAB tests on dev branch](https://github.com/WEC-Sim/WEC-Sim/actions/workflows/run-tests-dev.yml/badge.svg?branch=dev)](https://github.com/WEC-Sim/WEC-Sim/actions/workflows/run-tests-dev.yml)

## WEC-Sim Repository

* **Docs**: [WEC-Sim documentation](http://wec-sim.github.io/WEC-Sim), to refer to [doc compile instructions](https://github.com/WEC-Sim/WEC-Sim/tree/master/docs)
* **Docs**: [WEC-Sim documentation](http://wec-sim.github.io/WEC-Sim), to refer to [doc compile instructions](https://github.com/WEC-Sim/WEC-Sim/tree/main/docs)
* **Examples**: WEC-Sim examples
* **Source**: WEC-Sim source code
* **Tests**: WEC-Sim tests for [MATLAB Continuous Integration](https://www.mathworks.com/solutions/continuous-integration.html)
* **Tutorials**: [WEC-Sim tutorials](http://wec-sim.github.io/WEC-Sim/master/user/tutorials.html)
* **Tutorials**: [WEC-Sim tutorials](http://wec-sim.github.io/WEC-Sim/main/user/tutorials.html)

Refer to the [WEC-Sim Applications](https://github.com/WEC-Sim/WEC-Sim_Applications) repository for more applications of WEC-Sim.

## Source Code Management

A stable version of WEC-Sim is maintained on WEC-Sim's [master branch](https://github.com/WEC-Sim/WEC-Sim), and WEC-Sim [releases](https://github.com/WEC-Sim/WEC-Sim/releases) are tagged on GitHub.
A stable version of WEC-Sim is maintained on WEC-Sim's [main branch](https://github.com/WEC-Sim/WEC-Sim), and WEC-Sim [releases](https://github.com/WEC-Sim/WEC-Sim/releases) are tagged on GitHub.
WEC-Sim development is performed on WEC-Sim's [dev branch](https://github.com/WEC-Sim/WEC-Sim/tree/dev) using a [forking workflow](https://www.atlassian.com/git/tutorials/comparing-workflows/forking-workflow).
New WEC-Sim features are developed on forks of the WEC-Sim repository, and [pull-requests](https://github.com/WEC-Sim/WEC-Sim/pulls) are submitted to merge new features from a development fork into the main WEC-Sim repository.
Pull requests for new WEC-Sim features should be submitted to the WEC-Sim dev branch.
The only exception to this workflow is for bug fixes; pull requests for bug fixes should be should submitted to the WEC-Sim master branch.
When a new version of WEC-Sim is released, the dev branch becomes the master branch, and all updates are included in the tagged release.
The only exception to this workflow is for bug fixes; pull requests for bug fixes should be should submitted to the WEC-Sim main branch.
When a new version of WEC-Sim is released, the dev branch becomes the main branch, and all updates are included in the tagged release.

6 changes: 3 additions & 3 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ The front page of the docs can be accessed at

The final documentation can be built locally for inspection prior to
publishing. They are built in the `docs/_build` directory. Note, docs are
built from the remote so only pushed changes on the `master` and `dev`
built from the remote so only pushed changes on the `main` and `dev`
branches will be shown. To build the docs use the following command:

```
Expand All @@ -51,12 +51,12 @@ branches will be shown. To build the docs use the following command:
```

The front page of the docs can be accessed at
`docs/_build/html/master/index.html`.
`docs/_build/html/main/index.html`.

### Publishing Final Version Remotely

The WEC-Sim docs are rebuilt automatically following every merge commit made
to the master or dev branch of the [WEC-Sim/WEC-Sim](
to the main or dev branch of the [WEC-Sim/WEC-Sim](
https://github.com/WEC-Sim/WEC-Sim) repository.


Expand Down
4 changes: 2 additions & 2 deletions docs/_assets/gh-pages-readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# WEC-Sim Documentation

This branch is auto-generated by TravisCI upon pushes to the master or
dev branches. See the README.md file in the master branch for instructions
This branch is auto-generated by GitHub Actions upon pushes to the main or
dev branches. See the README.md file in the main branch for instructions
regarding building the docs locally.
6 changes: 3 additions & 3 deletions docs/_assets/gh-pages-redirect.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<title>Redirecting to master branch</title>
<title>Redirecting to main branch</title>
<meta charset="utf-8">
<meta http-equiv="refresh" content="0; url=./master/index.html">
<meta http-equiv="refresh" content="0; url=/WEC-Sim/main/index.html">
<meta name="description" content="WEC-Sim is a versatile open-source simulation platform for wave energy converter devices. Simulate, design, and optimize your wave energy systems with WEC-Sim to harness clean and renewable energy from ocean waves."
<link rel="canonical" href="https://wec-sim.github.io/WEC-Sim/master/index.html">
<link rel="canonical" href="https://wec-sim.github.io/WEC-Sim/main/index.html">
</head>
</html>
2 changes: 1 addition & 1 deletion docs/_include/mooring.rst
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ Applications <https://github.com/WEC-Sim/WEC-Sim_Applications>`_ repository.

.. _WECSimInputMoorDyn:

.. rli:: https://raw.githubusercontent.com/WEC-Sim/WEC-Sim_Applications/master/Mooring/MoorDyn/wecSimInputFile.m
.. rli:: https://raw.githubusercontent.com/WEC-Sim/WEC-Sim_Applications/main/Mooring/MoorDyn/wecSimInputFile.m
:language: matlab

* **MoorDyn Input File**: A mooring folder that includes a moorDyn input file
Expand Down
2 changes: 1 addition & 1 deletion docs/_include/pto.rst
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ accumulator, low pressure accumulator, hydraulic motor, and generator.
.. _WECSimInput:
.. rli:: https://raw.githubusercontent.com/WEC-Sim/WEC-Sim_Applications/master/PTO-Sim/RM3/RM3_cHydraulic_PTO/wecSimInputFile.m
.. rli:: https://raw.githubusercontent.com/WEC-Sim/WEC-Sim_Applications/main/PTO-Sim/RM3/RM3_cHydraulic_PTO/wecSimInputFile.m
:language: matlab
**Simulation and Post-processing**
Expand Down
20 changes: 10 additions & 10 deletions docs/_include/viz.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ However, the SimMechanics explorer shows the following information not included
Visualization with ParaView requires additional output files to be written to a ``vtk`` directory.
This makes the WEC-Sim simulation take more time and the case directory larger, so it should only be used when additional visualization is desired.
Users will also need to have some familiarity with using ParaView.
For more information about using ParaView for visualization, refer to the :ref:`webinar4`, and the `Paraview_Visualization <https://github.com/WEC-Sim/WEC-Sim_Applications/tree/master/Paraview_Visualization>`_ examples on the `WEC-Sim Applications <https://github.com/WEC-Sim/WEC-Sim_Applications>`_ repository.
For more information about using ParaView for visualization, refer to the :ref:`webinar4`, and the `Paraview_Visualization <https://github.com/WEC-Sim/WEC-Sim_Applications/tree/main/Paraview_Visualization>`_ examples on the `WEC-Sim Applications <https://github.com/WEC-Sim/WEC-Sim_Applications>`_ repository.


Install ParaView and WEC-Sim Macros
Expand Down Expand Up @@ -58,39 +58,39 @@ You can color waves and bodies by any of the available properties and apply any
:figwidth: 400pt
:align: center

`Reference Model 3 <https://github.com/WEC-Sim/WEC-Sim/tree/master/examples/RM3>`_
`Reference Model 3 <https://github.com/WEC-Sim/WEC-Sim/tree/main/examples/RM3>`_


.. figure:: /_static/images/overview/oswec_iso_side.png
:width: 400pt
:figwidth: 400pt
:align: center

`Bottom-fixed Oscillating Surge WEC (OSWEC) <https://github.com/WEC-Sim/WEC-Sim/tree/master/examples/OSWEC>`_
`Bottom-fixed Oscillating Surge WEC (OSWEC) <https://github.com/WEC-Sim/WEC-Sim/tree/main/examples/OSWEC>`_


.. figure:: /_static/images/overview/sphere_freedecay_iso_side.png
:width: 400pt
:figwidth: 400pt
:align: center

`Sphere <https://github.com/WEC-Sim/WEC-Sim_Applications/tree/master/Free_Decay>`_
`Sphere <https://github.com/WEC-Sim/WEC-Sim_Applications/tree/main/Free_Decay>`_


.. figure:: /_static/images/overview/ellipsoid_iso_side.png
:width: 400pt
:figwidth: 400pt
:align: center

`Ellipsoid <https://github.com/WEC-Sim/WEC-Sim_Applications/tree/master/Nonlinear_Hydro>`_
`Ellipsoid <https://github.com/WEC-Sim/WEC-Sim_Applications/tree/main/Nonlinear_Hydro>`_


.. figure:: /_static/images/overview/gbm_iso_side.png
:width: 400pt
:figwidth: 400pt
:align: center

`Barge with Four Flexible Body Modes <https://github.com/WEC-Sim/WEC-Sim_Applications/tree/master/Generalized_Body_Modes>`_
`Barge with Four Flexible Body Modes <https://github.com/WEC-Sim/WEC-Sim_Applications/tree/main/Generalized_Body_Modes>`_


.. figure:: /_static/images/overview/wigley_iso_side.png
Expand Down Expand Up @@ -120,9 +120,9 @@ You can color waves and bodies by any of the available properties and apply any



Two examples using Paraview for visualization of WEC-Sim data are provided in the `Paraview_Visualization <https://github.com/WEC-Sim/WEC-Sim_Applications/tree/master/Paraview_Visualization>`_ directory of the WEC-Sim Applications repository.
The `RM3_MoorDyn_Viz <https://github.com/WEC-Sim/WEC-Sim_Applications/tree/master/Paraview_Visualization/RM3_MoorDyn_Viz>`_ example uses ParaView for WEC-Sim data visualization of a WEC-Sim model coupled with `MoorDyn <http://wec-sim.github.io/WEC-Sim/advanced_features.html#moordyn>`_ to simulate a mooring system for the `RM3 <http://wec-sim.github.io/WEC-Sim/tutorials.html#two-body-point-absorber-rm3>`_ geometry.
The `OSWEC_NonLinear_Viz <https://github.com/WEC-Sim/WEC-Sim_Applications/tree/master/Paraview_Visualization/OSWEC_NonLinear_Viz>`_ example uses ParaView for WEC-Sim data visualization of a WEC-Sim model with `nonlinear Hydro <http://wec-sim.github.io/WEC-Sim/advanced_features.html#nonlinear-buoyancy-and-froude-krylov-excitation>`_ to simulate nonlinear wave excitation on the flap of the `OSWEC <http://wec-sim.github.io/WEC-Sim/tutorials.html#oscillating-surge-wec-oswec.>`_ geometry.
Two examples using Paraview for visualization of WEC-Sim data are provided in the `Paraview_Visualization <https://github.com/WEC-Sim/WEC-Sim_Applications/tree/main/Paraview_Visualization>`_ directory of the WEC-Sim Applications repository.
The `RM3_MoorDyn_Viz <https://github.com/WEC-Sim/WEC-Sim_Applications/tree/main/Paraview_Visualization/RM3_MoorDyn_Viz>`_ example uses ParaView for WEC-Sim data visualization of a WEC-Sim model coupled with `MoorDyn <http://wec-sim.github.io/WEC-Sim/advanced_features.html#moordyn>`_ to simulate a mooring system for the `RM3 <http://wec-sim.github.io/WEC-Sim/tutorials.html#two-body-point-absorber-rm3>`_ geometry.
The `OSWEC_NonLinear_Viz <https://github.com/WEC-Sim/WEC-Sim_Applications/tree/main/Paraview_Visualization/OSWEC_NonLinear_Viz>`_ example uses ParaView for WEC-Sim data visualization of a WEC-Sim model with `nonlinear Hydro <http://wec-sim.github.io/WEC-Sim/advanced_features.html#nonlinear-buoyancy-and-froude-krylov-excitation>`_ to simulate nonlinear wave excitation on the flap of the `OSWEC <http://wec-sim.github.io/WEC-Sim/tutorials.html#oscillating-surge-wec-oswec.>`_ geometry.

MoorDyn Visualization in ParaView
""""""""""""""""""""""""""""""""""""
Expand Down Expand Up @@ -184,7 +184,7 @@ If a previous ``*.pvsm`` ParaView state file was saved, the state can be applied
* Select the desired ``$CASE/<filename>.pvsm`` Paraview state file to apply
* Select the "Search files under specified directory" option, specify the desired WECS-Sim ``$CASE/vtk/`` directory, and click ``OK``

Paraview state files are provided for both `Paraview_Visualization <https://github.com/WEC-Sim/WEC-Sim_Applications/tree/master/Paraview_Visualization>`_ examples provided onthe WEC-Sim Applications repository, one for the RM3 using MoorDyn, and another for the OSWEC with nonlinear hydro.
Paraview state files are provided for both `Paraview_Visualization <https://github.com/WEC-Sim/WEC-Sim_Applications/tree/main/Paraview_Visualization>`_ examples provided onthe WEC-Sim Applications repository, one for the RM3 using MoorDyn, and another for the OSWEC with nonlinear hydro.


ParaView Visualization Parameters
Expand Down
13 changes: 7 additions & 6 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
matlab_keep_package_prefix = False

# sphinx_multiversion settings
smv_branch_whitelist = r'(master|dev)$'
smv_branch_whitelist = r'(main|dev)$'
smv_tag_whitelist = 'a^'
smv_remote_whitelist = r'^(origin)$'

Expand All @@ -87,8 +87,9 @@
# The encoding of source files.
#source_encoding = 'utf-8-sig'

# The master toctree document.
master_doc = 'index'
# The document name of therootdocument, that is, the document that contains
# the root toctree directive. Default is 'index'.
root_doc = 'index'

# -- Project information -----------------------------------------------------
# General information about the project.
Expand Down Expand Up @@ -276,7 +277,7 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'WEC-Sim.tex', 'WEC-Sim Documentation',
(root_doc, 'WEC-Sim.tex', 'WEC-Sim Documentation',
'Yi-Hsiang Yu, Kelley Ruehl, Jennifer Van Rij, Nathan Tom, Dominic Forbush', 'manual'),
]

Expand Down Expand Up @@ -306,7 +307,7 @@
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'WEC-Sim', 'WEC-Sim Documentation',
(root_doc, 'WEC-Sim', 'WEC-Sim Documentation',
[author], 1)
]

Expand All @@ -320,7 +321,7 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'WEC-Sim', 'WEC-Sim Documentation',
(root_doc, 'WEC-Sim', 'WEC-Sim Documentation',
author, 'WEC-Sim', 'WEC-Sim Documentation',
'Miscellaneous'),
]
Expand Down
6 changes: 3 additions & 3 deletions docs/developer/pull_requests.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
Pull Requests
===============

A stable version of WEC-Sim is maintained on the `WEC-Sim master branch <https://github.com/WEC-Sim/WEC-Sim>`_, and `WEC-Sim releases <https://github.com/WEC-Sim/WEC-Sim/releases>`_ are tagged on GitHub.
A stable version of WEC-Sim is maintained on the `WEC-Sim main branch <https://github.com/WEC-Sim/WEC-Sim>`_, and `WEC-Sim releases <https://github.com/WEC-Sim/WEC-Sim/releases>`_ are tagged on GitHub.
WEC-Sim development is performed on `WEC-Sim dev branch <https://github.com/WEC-Sim/WEC-Sim/tree/dev>`_ using a `fork-based workflow <https://www.atlassian.com/git/tutorials/comparing-workflows/forking-workflow>`_.
New WEC-Sim features are developed on forks of the WEC-Sim repository, and `pull-requests <https://github.com/WEC-Sim/WEC-Sim/pulls>`_ are submitted to merge new features from a development fork into the main WEC-Sim repository.
Pull-requests for new WEC-Sim features should be submitted to the WEC-Sim dev branch.
The only exception to this workflow is for bug fixes; pull-request for bug fixes should be should submitted to the WEC-Sim master branch.
When a new version of WEC-Sim is released, the dev branch is pulled into master where all changes are incorporated into the code.
The only exception to this workflow is for bug fixes; pull-request for bug fixes should be should submitted to the WEC-Sim main branch.
When a new version of WEC-Sim is released, the dev branch is pulled into main where all changes are incorporated into the code.


A `pull request (PR) <https://help.github.com/articles/using-pull-requests/>`_ should focus on one update at a time.
Expand Down
Loading

0 comments on commit 0ffa77a

Please sign in to comment.