Skip to content

Commit

Permalink
improve the doc building
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasLecocq committed Sep 18, 2024
1 parent 7b78d56 commit 51dd0e9
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 9 deletions.
7 changes: 6 additions & 1 deletion doc/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,19 @@ To build this documentation, some modules are required:
pip install "sphinx_rtd_theme>1"
pip install pillow==9.0.0
If you plan to build the interaction examples, you'll need to download this link:

.. todo:: ADD LINK TO THE BIG DATA REPO

and define an environment variable ``MSNOISE_DOC`` with the path to where that data has been extracted.

Then, this should simply work:

.. code-block:: sh
make html
it will create a .build folder containing the documentation.
it will create a .build/html folder containing the documentation.

You can also build the doc to Latex and then use your favorite Latex-to-PDF
tool.
Expand Down
5 changes: 3 additions & 2 deletions examples/plot_compute_hvsr.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
# Import & getting the data from the computed autocorrelations (ZZ, EE, NN)

import os
if "SPHINX_DOC_BUILD" in os.environ or 1:
os.chdir(r"C:\tmp\MSNOISE_DOC")
if "SPHINX_DOC_BUILD" in os.environ:
if "MSNOISE_DOC" in os.environ:
os.chdir(os.environ["MSNOISE_DOC"])

import matplotlib
matplotlib.use("agg")
Expand Down
5 changes: 3 additions & 2 deletions examples/plot_compute_hvsr_psd.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@

import os

if "SPHINX_DOC_BUILD" in os.environ or 1:
os.chdir(r"C:\tmp\MSNOISE_DOC")
if "SPHINX_DOC_BUILD" in os.environ:
if "MSNOISE_DOC" in os.environ:
os.chdir(os.environ["MSNOISE_DOC"])

import matplotlib
# matplotlib.use("agg")
Expand Down
10 changes: 6 additions & 4 deletions examples/plot_interferogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
"""

import os
if "SPHINX_DOC_BUILD" in os.environ or 1:
os.chdir(r"C:\tmp\MSNOISE_DOC")
if "SPHINX_DOC_BUILD" in os.environ:
if "MSNOISE_DOC" in os.environ:
os.chdir(os.environ["MSNOISE_DOC"])

import matplotlib
matplotlib.use("agg")
Expand Down Expand Up @@ -55,8 +56,9 @@
#############################################################
# Plotting the sub-daily stacks and zooming on +- 20 seconds:

if "SPHINX_DOC_BUILD" in os.environ or 1:
os.chdir(r"C:\tmp\MSNOISE_DOC")
if "SPHINX_DOC_BUILD" in os.environ:
if "MSNOISE_DOC" in os.environ:
os.chdir(os.environ["MSNOISE_DOC"])

# Get the last mov_stack configured:
mov_stack = params.mov_stack[-1]
Expand Down

0 comments on commit 51dd0e9

Please sign in to comment.