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

Remove redundant Sphinx build directory #387

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ WecOptTool.egg-info
dist/

# Sphinx
docs/_build/
docs/source/_examples
docs/source/api_docs
docs/pages/

# Tutorials results
results*
Expand Down
2 changes: 1 addition & 1 deletion docs/build_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ def move_pages(dest_dir=None):
print(f"Moving HTML pages to {os.path.join(docs_dir, 'pages', dest_dir)}...")
shutil.copytree(
html_dir, os.path.join(docs_dir, 'pages', dest_dir))
shutil.rmtree(build_dir, ignore_errors=True)
print('Done.')


Expand All @@ -108,4 +109,3 @@ def move_pages(dest_dir=None):
if name != home_name:
build_doc(name, tag, home_branch, build)
move_pages(dest_dir=name)
shutil.rmtree(html_dir)
4 changes: 2 additions & 2 deletions docs/clean_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
from shutil import rmtree

docs_dir = os.path.dirname(os.path.abspath(__file__))
build_dir = os.path.join(docs_dir, '_build')
source_dir = os.path.join(docs_dir, 'source')
build_dir = os.path.join(docs_dir, '_build')
example_dir = os.path.join(source_dir, '_examples')
api_dir = os.path.join(source_dir, 'api_docs')
pages_dir = os.path.join(docs_dir, 'pages')

def clean():
rmtree(build_dir, ignore_errors=True)
rmtree(example_dir, ignore_errors=True)
rmtree(api_dir, ignore_errors=True)
rmtree(build_dir, ignore_errors=True)
rmtree(pages_dir, ignore_errors=True)

if __name__ == '__main__':
Expand Down
6 changes: 0 additions & 6 deletions docs/source/_static/css/custom.css

This file was deleted.

1 change: 1 addition & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
'current_version' : current_branch,
'other_versions' : [],
}

with open(os.path.join(project_root, 'docs/versions.yaml'), 'r') as v_file:
versions = yaml.safe_load(v_file)
for name in versions.keys():
Expand Down
4 changes: 2 additions & 2 deletions docs/source/theory.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ How's this different from what I'm used to?
Most users will be more familiar with a time-stepping approach for differential equations--this is the method applied in Simulink and therefore `WEC-Sim`_.
Starting from an initial time (e.g., :math:`t=0`), the solution is solved by iteratively stepping forward in time.

.. image:: ../_build/html/_static/theory_animation_td.gif
.. image:: ../pages/_static/theory_animation_td.gif
:width: 600
:alt: Time-domain solution animation
:align: center

Pseudo-spectral methods can be applied to solve the same differential equations, but solve the entire time period of interest at once.
At first the solution will not be correct, but as the optimization algorithm iterates, it will progressively improve the solution.

.. image:: ../_build/html/_static/theory_animation_ps.gif
.. image:: ../pages/_static/theory_animation_ps.gif
:width: 600
:alt: Pseudo-spectral solution animation
:align: center
Expand Down
Loading