From 386c903ed027fc6d8e487d4f77aaef27f12ce799 Mon Sep 17 00:00:00 2001 From: Michael Wathen Date: Thu, 25 Jun 2026 12:44:07 +0100 Subject: [PATCH 1/5] Adding read the docs config --- .readthedocs.yaml | 6 +++--- README.md | 2 ++ doc/requirements.txt | 5 +++-- doc/source/conf.py | 25 +++++++++++++------------ doc/source/cookbook/index.rst | 11 +++++++++-- doc/source/index.rst | 12 ++++-------- 6 files changed, 34 insertions(+), 27 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index aa60a95..41ff210 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -5,9 +5,9 @@ version: 2 # Set the OS, Python version and other tools you might need build: - os: ubuntu-22.04 + os: ubuntu-24.04 tools: - python: "3.11" + python: "3.12" # Build documentation in the "doc/" directory with Sphinx sphinx: @@ -28,4 +28,4 @@ python: extra_requirements: - docs # Install additional requirements for building docs - - requirements: doc/requirements.txt \ No newline at end of file + - requirements: doc/requirements.txt diff --git a/README.md b/README.md index 7936d6c..665e3d9 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # PyFVCOM2 +[![Documentation Status](https://readthedocs.org/projects/pyfvcom2/badge/?version=latest)](https://pyfvcom2.readthedocs.io/en/latest/?badge=latest) + A Python package for processing FVCOM (Finite Volume Community Ocean Model) data. ## Description diff --git a/doc/requirements.txt b/doc/requirements.txt index 5e0f003..d911b4e 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -4,11 +4,12 @@ # Core Sphinx packages sphinx>=3.0 sphinx_rtd_theme>=0.5 +myst-parser # Sphinx extensions used in conf.py +sphinx-autodoc2 sphinx-copybutton nbsphinx -sphinxext-opengraph # Scientific documentation extensions numpydoc @@ -26,4 +27,4 @@ netcdf4>=1.5.0 xarray>=0.16.0 # For any plots or examples in documentation -matplotlib>=3.3.0 \ No newline at end of file +matplotlib>=3.3.0 diff --git a/doc/source/conf.py b/doc/source/conf.py index 5d574f1..4510200 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -32,9 +32,9 @@ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = ['autodoc2', + 'myst_parser', 'sphinx.ext.autosummary', 'sphinx.ext.napoleon', - 'sphinx.ext.intersphinx', 'sphinx.ext.todo', 'sphinx.ext.mathjax', 'sphinx.ext.viewcode', @@ -42,20 +42,17 @@ 'sphinx_copybutton', 'nbsphinx', 'sphinx_rtd_theme', - 'sphinxcontrib.googleanalytics', 'IPython.sphinxext.ipython_console_highlighting'] # Autodoc2 autodoc2_packages = ['../../pyfvcom2'] # Control autodoc2 output depth and content -autodoc2_output_dir = "apidocs" +autodoc2_output_dir = "../build/apidocs" autodoc2_index_template = None # Use default template # Configure autodoc2 to generate less nested content -autodoc2_module_all_regexes = [ - r"pyfvcom2\..*", -] +autodoc2_module_all_regexes = [] # Control autodoc2 content inclusion autodoc2_skip_module_regexes = [ @@ -76,10 +73,14 @@ # The suffix(es) of source filenames. # You can specify multiple suffix as a list of string: # -source_suffix = ['.rst', '.md'] +source_suffix = { + '.rst': 'restructuredtext', + '.md': 'markdown', +} # The master toctree document. master_doc = 'index' +root_doc = 'index' # Control HTML table of contents depth html_theme_options = { @@ -120,7 +121,8 @@ # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This patterns also effect to html_static_path and html_extra_path -exclude_patterns = ['**.ipynb_checkpoints'] +exclude_patterns = ['**.ipynb_checkpoints', 'api.rst', 'apidocs/**'] +suppress_warnings = ['myst.xref_missing'] # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' @@ -141,7 +143,7 @@ # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] +html_static_path = [] # Custom sidebar templates, must be a dictionary that maps document names # to template names. @@ -212,9 +214,8 @@ 'Miscellaneous'), ] -# Execute notebooks -nbsphinx_execute = 'auto' -#nbsphinx_execute = 'always' +# Display the committed notebooks without executing them during RTD builds. +nbsphinx_execute = 'never' # Example configuration for intersphinx: refer to the Python standard library. diff --git a/doc/source/cookbook/index.rst b/doc/source/cookbook/index.rst index 5609e55..b89de28 100644 --- a/doc/source/cookbook/index.rst +++ b/doc/source/cookbook/index.rst @@ -8,8 +8,15 @@ In the cookbook, you can find hints and tips for working with PyFVCOM2. .. toctree:: :maxdepth: 1 - + + compare_tpxo_atlas_vs_coarse generate_fvcom_restart_using_cmems_data + tidal_harmonic_analysis_fvcom + interpolate_tpxo_tidal_harmonics + create_tide_only_inputs + interpolate_fvcom_data predict_tides_and_adjust_nest_forcing + generate_nest_forcing_file_from_cmems_data + tidal_harmonic_analysis_tide_gauge apply_ramp_demonstration - bathymetry_smoothing \ No newline at end of file + bathymetry_smoothing diff --git a/doc/source/index.rst b/doc/source/index.rst index f30f0b1..443c943 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -1,13 +1,9 @@ -PyFVCOM2 -======== - -PyFVCOM2 is a Python library designed to work with FVCOM model output data, providing tools for data analysis, visualization, and processing of unstructured grid ocean model results. It is intended to be the successor of PyFVCOM. - -Contents -======== +.. include:: ../../README.md + :parser: myst_parser.sphinx_ .. toctree:: :maxdepth: 1 + :caption: Contents installation cookbook/index @@ -15,4 +11,4 @@ Contents contributing license acknowledgements - + From 020a348f6ce79de8e3837a26036aac7889ee3991 Mon Sep 17 00:00:00 2001 From: Michael Wathen Date: Thu, 25 Jun 2026 12:49:55 +0100 Subject: [PATCH 2/5] Adding docs to automated tests --- .github/workflows/docs.yml | 34 ++++++++++++++++++++++++++++++++++ doc/source/index.rst | 1 - 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..5998c63 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,34 @@ +name: Docs + +on: + push: + branches: + - main + - 39-read-the-docs + pull_request: + branches: + - main + workflow_dispatch: + +jobs: + sphinx: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + cache: pip + cache-dependency-path: doc/requirements.txt + + - name: Install documentation dependencies + run: | + python -m pip install --upgrade pip + python -m pip install -r doc/requirements.txt + + - name: Build documentation + run: | + python -m sphinx -W -b html doc/source doc/build/html diff --git a/doc/source/index.rst b/doc/source/index.rst index 443c943..a6a845c 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -7,7 +7,6 @@ installation cookbook/index - api contributing license acknowledgements From c33ea1466c116fb8f449b4d886763c69f2106847 Mon Sep 17 00:00:00 2001 From: Michael Wathen Date: Thu, 25 Jun 2026 13:01:28 +0100 Subject: [PATCH 3/5] Updating installed packages for docs --- .github/workflows/docs.yml | 5 +++++ .readthedocs.yaml | 2 ++ pyproject.toml | 5 +++++ 3 files changed, 12 insertions(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 5998c63..281d94a 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -24,6 +24,11 @@ jobs: cache: pip cache-dependency-path: doc/requirements.txt + - name: Install Pandoc + run: | + sudo apt-get update + sudo apt-get install -y pandoc + - name: Install documentation dependencies run: | python -m pip install --upgrade pip diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 41ff210..e5d1e11 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -8,6 +8,8 @@ build: os: ubuntu-24.04 tools: python: "3.12" + apt_packages: + - pandoc # Build documentation in the "doc/" directory with Sphinx sphinx: diff --git a/pyproject.toml b/pyproject.toml index 3200be7..e8e1b6b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,6 +53,11 @@ dev = [ docs = [ "sphinx>=3.0", "sphinx-rtd-theme>=0.5", + "myst-parser", + "sphinx-autodoc2", + "sphinx-copybutton", + "nbsphinx", + "numpydoc", "jupyter", "jupyter_client", "ipykernel", From b46fe0f43b7cee584c2f43f80a19477882f53062 Mon Sep 17 00:00:00 2001 From: Michael Wathen Date: Thu, 25 Jun 2026 13:59:58 +0100 Subject: [PATCH 4/5] Trigger docs workflow From 3ff31a643911d34310933ff4fdfb5c8d86c42639 Mon Sep 17 00:00:00 2001 From: Michael Wathen Date: Fri, 26 Jun 2026 11:39:03 +0100 Subject: [PATCH 5/5] Adding API --- .readthedocs.yaml | 5 -- doc/source/api.rst | 11 ++--- doc/source/api/modules.rst | 7 +++ doc/source/api/pyfvcom2.bathy_smoother.rst | 7 +++ doc/source/api/pyfvcom2.cmems_reader.rst | 7 +++ doc/source/api/pyfvcom2.coordinates.rst | 7 +++ doc/source/api/pyfvcom2.date_utils.rst | 7 +++ doc/source/api/pyfvcom2.exceptions.rst | 7 +++ doc/source/api/pyfvcom2.file_utils.rst | 7 +++ doc/source/api/pyfvcom2.fvcom_reader.rst | 7 +++ doc/source/api/pyfvcom2.fvcom_writer.rst | 7 +++ doc/source/api/pyfvcom2.grid.rst | 7 +++ doc/source/api/pyfvcom2.grid_builder.rst | 7 +++ doc/source/api/pyfvcom2.interpolation.rst | 7 +++ .../pyfvcom2.interpolation_coordinates.rst | 7 +++ doc/source/api/pyfvcom2.lanczos.rst | 7 +++ doc/source/api/pyfvcom2.mesh_reader.rst | 7 +++ doc/source/api/pyfvcom2.namelist.rst | 7 +++ doc/source/api/pyfvcom2.nest.rst | 7 +++ doc/source/api/pyfvcom2.obc.rst | 7 +++ doc/source/api/pyfvcom2.ocean.rst | 7 +++ doc/source/api/pyfvcom2.plotting.plot.rst | 7 +++ doc/source/api/pyfvcom2.plotting.rst | 18 +++++++ doc/source/api/pyfvcom2.restart.rst | 7 +++ doc/source/api/pyfvcom2.rst | 49 +++++++++++++++++++ doc/source/api/pyfvcom2.sigma.rst | 7 +++ doc/source/api/pyfvcom2.tide.rst | 7 +++ doc/source/api/pyfvcom2.tide_reader.rst | 7 +++ .../api/pyfvcom2.weights_calculator.rst | 7 +++ doc/source/conf.py | 22 ++++++++- doc/source/index.rst | 1 + 31 files changed, 267 insertions(+), 14 deletions(-) create mode 100644 doc/source/api/modules.rst create mode 100644 doc/source/api/pyfvcom2.bathy_smoother.rst create mode 100644 doc/source/api/pyfvcom2.cmems_reader.rst create mode 100644 doc/source/api/pyfvcom2.coordinates.rst create mode 100644 doc/source/api/pyfvcom2.date_utils.rst create mode 100644 doc/source/api/pyfvcom2.exceptions.rst create mode 100644 doc/source/api/pyfvcom2.file_utils.rst create mode 100644 doc/source/api/pyfvcom2.fvcom_reader.rst create mode 100644 doc/source/api/pyfvcom2.fvcom_writer.rst create mode 100644 doc/source/api/pyfvcom2.grid.rst create mode 100644 doc/source/api/pyfvcom2.grid_builder.rst create mode 100644 doc/source/api/pyfvcom2.interpolation.rst create mode 100644 doc/source/api/pyfvcom2.interpolation_coordinates.rst create mode 100644 doc/source/api/pyfvcom2.lanczos.rst create mode 100644 doc/source/api/pyfvcom2.mesh_reader.rst create mode 100644 doc/source/api/pyfvcom2.namelist.rst create mode 100644 doc/source/api/pyfvcom2.nest.rst create mode 100644 doc/source/api/pyfvcom2.obc.rst create mode 100644 doc/source/api/pyfvcom2.ocean.rst create mode 100644 doc/source/api/pyfvcom2.plotting.plot.rst create mode 100644 doc/source/api/pyfvcom2.plotting.rst create mode 100644 doc/source/api/pyfvcom2.restart.rst create mode 100644 doc/source/api/pyfvcom2.rst create mode 100644 doc/source/api/pyfvcom2.sigma.rst create mode 100644 doc/source/api/pyfvcom2.tide.rst create mode 100644 doc/source/api/pyfvcom2.tide_reader.rst create mode 100644 doc/source/api/pyfvcom2.weights_calculator.rst diff --git a/.readthedocs.yaml b/.readthedocs.yaml index e5d1e11..01c8bf4 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -24,10 +24,5 @@ formats: # Python requirements for building documentation python: install: - # Install the package itself - - method: pip - path: . - extra_requirements: - - docs # Install additional requirements for building docs - requirements: doc/requirements.txt diff --git a/doc/source/api.rst b/doc/source/api.rst index 3f57bac..ca1b207 100644 --- a/doc/source/api.rst +++ b/doc/source/api.rst @@ -1,12 +1,9 @@ .. _api: -API -=== - -For PyLag's API documentation, please refer to the following sections: +API Reference +============= .. toctree:: - :maxdepth: 1 - :caption: API Reference + :maxdepth: 4 - apidocs/index \ No newline at end of file + api/modules diff --git a/doc/source/api/modules.rst b/doc/source/api/modules.rst new file mode 100644 index 0000000..1acbc91 --- /dev/null +++ b/doc/source/api/modules.rst @@ -0,0 +1,7 @@ +API Reference +============= + +.. toctree:: + :maxdepth: 4 + + pyfvcom2 diff --git a/doc/source/api/pyfvcom2.bathy_smoother.rst b/doc/source/api/pyfvcom2.bathy_smoother.rst new file mode 100644 index 0000000..7fcab31 --- /dev/null +++ b/doc/source/api/pyfvcom2.bathy_smoother.rst @@ -0,0 +1,7 @@ +pyfvcom2.bathy\_smoother module +=============================== + +.. automodule:: pyfvcom2.bathy_smoother + :members: + :show-inheritance: + :undoc-members: diff --git a/doc/source/api/pyfvcom2.cmems_reader.rst b/doc/source/api/pyfvcom2.cmems_reader.rst new file mode 100644 index 0000000..997bcd2 --- /dev/null +++ b/doc/source/api/pyfvcom2.cmems_reader.rst @@ -0,0 +1,7 @@ +pyfvcom2.cmems\_reader module +============================= + +.. automodule:: pyfvcom2.cmems_reader + :members: + :show-inheritance: + :undoc-members: diff --git a/doc/source/api/pyfvcom2.coordinates.rst b/doc/source/api/pyfvcom2.coordinates.rst new file mode 100644 index 0000000..49b3abe --- /dev/null +++ b/doc/source/api/pyfvcom2.coordinates.rst @@ -0,0 +1,7 @@ +pyfvcom2.coordinates module +=========================== + +.. automodule:: pyfvcom2.coordinates + :members: + :show-inheritance: + :undoc-members: diff --git a/doc/source/api/pyfvcom2.date_utils.rst b/doc/source/api/pyfvcom2.date_utils.rst new file mode 100644 index 0000000..23530c9 --- /dev/null +++ b/doc/source/api/pyfvcom2.date_utils.rst @@ -0,0 +1,7 @@ +pyfvcom2.date\_utils module +=========================== + +.. automodule:: pyfvcom2.date_utils + :members: + :show-inheritance: + :undoc-members: diff --git a/doc/source/api/pyfvcom2.exceptions.rst b/doc/source/api/pyfvcom2.exceptions.rst new file mode 100644 index 0000000..6aef9c4 --- /dev/null +++ b/doc/source/api/pyfvcom2.exceptions.rst @@ -0,0 +1,7 @@ +pyfvcom2.exceptions module +========================== + +.. automodule:: pyfvcom2.exceptions + :members: + :show-inheritance: + :undoc-members: diff --git a/doc/source/api/pyfvcom2.file_utils.rst b/doc/source/api/pyfvcom2.file_utils.rst new file mode 100644 index 0000000..597b271 --- /dev/null +++ b/doc/source/api/pyfvcom2.file_utils.rst @@ -0,0 +1,7 @@ +pyfvcom2.file\_utils module +=========================== + +.. automodule:: pyfvcom2.file_utils + :members: + :show-inheritance: + :undoc-members: diff --git a/doc/source/api/pyfvcom2.fvcom_reader.rst b/doc/source/api/pyfvcom2.fvcom_reader.rst new file mode 100644 index 0000000..16046e2 --- /dev/null +++ b/doc/source/api/pyfvcom2.fvcom_reader.rst @@ -0,0 +1,7 @@ +pyfvcom2.fvcom\_reader module +============================= + +.. automodule:: pyfvcom2.fvcom_reader + :members: + :show-inheritance: + :undoc-members: diff --git a/doc/source/api/pyfvcom2.fvcom_writer.rst b/doc/source/api/pyfvcom2.fvcom_writer.rst new file mode 100644 index 0000000..b0ef275 --- /dev/null +++ b/doc/source/api/pyfvcom2.fvcom_writer.rst @@ -0,0 +1,7 @@ +pyfvcom2.fvcom\_writer module +============================= + +.. automodule:: pyfvcom2.fvcom_writer + :members: + :show-inheritance: + :undoc-members: diff --git a/doc/source/api/pyfvcom2.grid.rst b/doc/source/api/pyfvcom2.grid.rst new file mode 100644 index 0000000..107265e --- /dev/null +++ b/doc/source/api/pyfvcom2.grid.rst @@ -0,0 +1,7 @@ +pyfvcom2.grid module +==================== + +.. automodule:: pyfvcom2.grid + :members: + :show-inheritance: + :undoc-members: diff --git a/doc/source/api/pyfvcom2.grid_builder.rst b/doc/source/api/pyfvcom2.grid_builder.rst new file mode 100644 index 0000000..17944af --- /dev/null +++ b/doc/source/api/pyfvcom2.grid_builder.rst @@ -0,0 +1,7 @@ +pyfvcom2.grid\_builder module +============================= + +.. automodule:: pyfvcom2.grid_builder + :members: + :show-inheritance: + :undoc-members: diff --git a/doc/source/api/pyfvcom2.interpolation.rst b/doc/source/api/pyfvcom2.interpolation.rst new file mode 100644 index 0000000..2c054a4 --- /dev/null +++ b/doc/source/api/pyfvcom2.interpolation.rst @@ -0,0 +1,7 @@ +pyfvcom2.interpolation module +============================= + +.. automodule:: pyfvcom2.interpolation + :members: + :show-inheritance: + :undoc-members: diff --git a/doc/source/api/pyfvcom2.interpolation_coordinates.rst b/doc/source/api/pyfvcom2.interpolation_coordinates.rst new file mode 100644 index 0000000..96cd029 --- /dev/null +++ b/doc/source/api/pyfvcom2.interpolation_coordinates.rst @@ -0,0 +1,7 @@ +pyfvcom2.interpolation\_coordinates module +========================================== + +.. automodule:: pyfvcom2.interpolation_coordinates + :members: + :show-inheritance: + :undoc-members: diff --git a/doc/source/api/pyfvcom2.lanczos.rst b/doc/source/api/pyfvcom2.lanczos.rst new file mode 100644 index 0000000..d9a3d1b --- /dev/null +++ b/doc/source/api/pyfvcom2.lanczos.rst @@ -0,0 +1,7 @@ +pyfvcom2.lanczos module +======================= + +.. automodule:: pyfvcom2.lanczos + :members: + :show-inheritance: + :undoc-members: diff --git a/doc/source/api/pyfvcom2.mesh_reader.rst b/doc/source/api/pyfvcom2.mesh_reader.rst new file mode 100644 index 0000000..c0ac1b8 --- /dev/null +++ b/doc/source/api/pyfvcom2.mesh_reader.rst @@ -0,0 +1,7 @@ +pyfvcom2.mesh\_reader module +============================ + +.. automodule:: pyfvcom2.mesh_reader + :members: + :show-inheritance: + :undoc-members: diff --git a/doc/source/api/pyfvcom2.namelist.rst b/doc/source/api/pyfvcom2.namelist.rst new file mode 100644 index 0000000..513bb39 --- /dev/null +++ b/doc/source/api/pyfvcom2.namelist.rst @@ -0,0 +1,7 @@ +pyfvcom2.namelist module +======================== + +.. automodule:: pyfvcom2.namelist + :members: + :show-inheritance: + :undoc-members: diff --git a/doc/source/api/pyfvcom2.nest.rst b/doc/source/api/pyfvcom2.nest.rst new file mode 100644 index 0000000..c446d6f --- /dev/null +++ b/doc/source/api/pyfvcom2.nest.rst @@ -0,0 +1,7 @@ +pyfvcom2.nest module +==================== + +.. automodule:: pyfvcom2.nest + :members: + :show-inheritance: + :undoc-members: diff --git a/doc/source/api/pyfvcom2.obc.rst b/doc/source/api/pyfvcom2.obc.rst new file mode 100644 index 0000000..f308d22 --- /dev/null +++ b/doc/source/api/pyfvcom2.obc.rst @@ -0,0 +1,7 @@ +pyfvcom2.obc module +=================== + +.. automodule:: pyfvcom2.obc + :members: + :show-inheritance: + :undoc-members: diff --git a/doc/source/api/pyfvcom2.ocean.rst b/doc/source/api/pyfvcom2.ocean.rst new file mode 100644 index 0000000..9eec786 --- /dev/null +++ b/doc/source/api/pyfvcom2.ocean.rst @@ -0,0 +1,7 @@ +pyfvcom2.ocean module +===================== + +.. automodule:: pyfvcom2.ocean + :members: + :show-inheritance: + :undoc-members: diff --git a/doc/source/api/pyfvcom2.plotting.plot.rst b/doc/source/api/pyfvcom2.plotting.plot.rst new file mode 100644 index 0000000..026a3ba --- /dev/null +++ b/doc/source/api/pyfvcom2.plotting.plot.rst @@ -0,0 +1,7 @@ +pyfvcom2.plotting.plot module +============================= + +.. automodule:: pyfvcom2.plotting.plot + :members: + :show-inheritance: + :undoc-members: diff --git a/doc/source/api/pyfvcom2.plotting.rst b/doc/source/api/pyfvcom2.plotting.rst new file mode 100644 index 0000000..088cd3a --- /dev/null +++ b/doc/source/api/pyfvcom2.plotting.rst @@ -0,0 +1,18 @@ +pyfvcom2.plotting package +========================= + +Submodules +---------- + +.. toctree:: + :maxdepth: 4 + + pyfvcom2.plotting.plot + +Module contents +--------------- + +.. automodule:: pyfvcom2.plotting + :members: + :show-inheritance: + :undoc-members: diff --git a/doc/source/api/pyfvcom2.restart.rst b/doc/source/api/pyfvcom2.restart.rst new file mode 100644 index 0000000..400bfd8 --- /dev/null +++ b/doc/source/api/pyfvcom2.restart.rst @@ -0,0 +1,7 @@ +pyfvcom2.restart module +======================= + +.. automodule:: pyfvcom2.restart + :members: + :show-inheritance: + :undoc-members: diff --git a/doc/source/api/pyfvcom2.rst b/doc/source/api/pyfvcom2.rst new file mode 100644 index 0000000..4fe2fa2 --- /dev/null +++ b/doc/source/api/pyfvcom2.rst @@ -0,0 +1,49 @@ +pyfvcom2 package +================ + +Subpackages +----------- + +.. toctree:: + :maxdepth: 4 + + pyfvcom2.plotting + +Submodules +---------- + +.. toctree:: + :maxdepth: 4 + + pyfvcom2.bathy_smoother + pyfvcom2.cmems_reader + pyfvcom2.coordinates + pyfvcom2.date_utils + pyfvcom2.exceptions + pyfvcom2.file_utils + pyfvcom2.fvcom_reader + pyfvcom2.fvcom_writer + pyfvcom2.grid + pyfvcom2.grid_builder + pyfvcom2.interpolation + pyfvcom2.interpolation_coordinates + pyfvcom2.lanczos + pyfvcom2.mesh_reader + pyfvcom2.namelist + pyfvcom2.nest + pyfvcom2.obc + pyfvcom2.ocean + pyfvcom2.restart + pyfvcom2.sigma + pyfvcom2.tide + pyfvcom2.tide_reader + pyfvcom2.weights_calculator + +Module contents +--------------- + +.. automodule:: pyfvcom2 + :members: + :show-inheritance: + :undoc-members: + :no-index: diff --git a/doc/source/api/pyfvcom2.sigma.rst b/doc/source/api/pyfvcom2.sigma.rst new file mode 100644 index 0000000..e3ed6dc --- /dev/null +++ b/doc/source/api/pyfvcom2.sigma.rst @@ -0,0 +1,7 @@ +pyfvcom2.sigma module +===================== + +.. automodule:: pyfvcom2.sigma + :members: + :show-inheritance: + :undoc-members: diff --git a/doc/source/api/pyfvcom2.tide.rst b/doc/source/api/pyfvcom2.tide.rst new file mode 100644 index 0000000..ac153aa --- /dev/null +++ b/doc/source/api/pyfvcom2.tide.rst @@ -0,0 +1,7 @@ +pyfvcom2.tide module +==================== + +.. automodule:: pyfvcom2.tide + :members: + :show-inheritance: + :undoc-members: diff --git a/doc/source/api/pyfvcom2.tide_reader.rst b/doc/source/api/pyfvcom2.tide_reader.rst new file mode 100644 index 0000000..05cd90f --- /dev/null +++ b/doc/source/api/pyfvcom2.tide_reader.rst @@ -0,0 +1,7 @@ +pyfvcom2.tide\_reader module +============================ + +.. automodule:: pyfvcom2.tide_reader + :members: + :show-inheritance: + :undoc-members: diff --git a/doc/source/api/pyfvcom2.weights_calculator.rst b/doc/source/api/pyfvcom2.weights_calculator.rst new file mode 100644 index 0000000..c79e8a7 --- /dev/null +++ b/doc/source/api/pyfvcom2.weights_calculator.rst @@ -0,0 +1,7 @@ +pyfvcom2.weights\_calculator module +=================================== + +.. automodule:: pyfvcom2.weights_calculator + :members: + :show-inheritance: + :undoc-members: diff --git a/doc/source/conf.py b/doc/source/conf.py index 4510200..d57d9f5 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -18,9 +18,19 @@ # import os import sys +import types + +sys.path.insert(0, os.path.abspath('../..')) sys.path.insert(0, os.path.abspath('.')) sys.path.insert(0, os.path.abspath('../../pyfvcom2')) +if 'pyfvcom2.version' not in sys.modules: + version_module = types.ModuleType('pyfvcom2.version') + version_module.short_version = 'X.Y.Z' + version_module.version = 'X.Y.Z' + version_module.full_version = 'X.Y.Z' + sys.modules['pyfvcom2.version'] = version_module + # -- General configuration ------------------------------------------------ @@ -33,6 +43,7 @@ # ones. extensions = ['autodoc2', 'myst_parser', + 'sphinx.ext.autodoc', 'sphinx.ext.autosummary', 'sphinx.ext.napoleon', 'sphinx.ext.todo', @@ -63,6 +74,13 @@ # Autodoc napoleon_google_docstring = False napoleon_use_ivar = True +autodoc_mock_imports = [ + 'cartopy', + 'cmocean', + 'pyproj', + 'stripy', + 'utide', +] # Use this kernel instead of the one stored in the notebook metadata: nbsphinx_kernel_name = 'python3' @@ -121,8 +139,8 @@ # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This patterns also effect to html_static_path and html_extra_path -exclude_patterns = ['**.ipynb_checkpoints', 'api.rst', 'apidocs/**'] -suppress_warnings = ['myst.xref_missing'] +exclude_patterns = ['**.ipynb_checkpoints', 'apidocs/**'] +suppress_warnings = ['myst.xref_missing', 'docutils'] # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' diff --git a/doc/source/index.rst b/doc/source/index.rst index a6a845c..443c943 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -7,6 +7,7 @@ installation cookbook/index + api contributing license acknowledgements