diff --git a/.flake8 b/.flake8 index b2811baa..747e86b0 100644 --- a/.flake8 +++ b/.flake8 @@ -19,3 +19,4 @@ ignore = per-file-ignores = # __init__ files dataset_product_mapping.py: E501 + conf.py: E501 diff --git a/conda_environment_sphinx.yaml b/conda_environment_sphinx.yaml index d04036d5..f4d3437e 100644 --- a/conda_environment_sphinx.yaml +++ b/conda_environment_sphinx.yaml @@ -3,13 +3,14 @@ dependencies: - python==3.9.18 - pip - pip: - - sphinx==7.4.7 - - sphinx-click==6.0.0 - - numpydoc==1.8.0 - - sphinx-copybutton==0.5.2 - - furo==2024.8.6 - - myst_parser==3.0.1 - - notebook==7.1.2 - - ipywidgets==8.1.5 - - matplotlib==3.9.2 - - myst-nb==1.1.2 + - sphinx==7.4.7 + - sphinx-click==6.0.0 + - numpydoc==1.8.0 + - sphinx-copybutton==0.5.2 + - furo==2024.8.6 + - myst_parser==3.0.1 + - notebook==7.1.2 + - ipywidgets==8.1.5 + - matplotlib==3.9.2 + - myst-nb==1.1.2 + - toml==0.10.2 diff --git a/doc/conf.py b/doc/conf.py index 1a2bd514..d41fee4d 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -1,5 +1,8 @@ +import toml from sphinx.builders.html import StandaloneHTMLBuilder +data = toml.load("../pyproject.toml") + # Configuration file for the Sphinx documentation builder. # # For the full list of built-in configuration values, see the documentation: @@ -11,6 +14,7 @@ project = "Copernicus Marine Toolbox" copyright = "2024, Mercator Ocean International" author = "Mercator Ocean International" +version = data["project"]["version"] # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration @@ -73,3 +77,13 @@ # https://myst-nb.readthedocs.io/en/latest/configuration.html#config-intro nb_execution_mode = "off" + +rst_epilog = """ +.. |download_macos_arm64| replace:: `copernicusmarine_macos-arm64 `__ +.. |download_macos_x86| replace:: `copernicusmarine_macos-x86_64 `__ +.. |download_linux_235| replace:: `copernicusmarine_linux `__ +.. |download_linux_231| replace:: `copernicusmarine_linux_2.31 `__ +.. |download_windows| replace:: `copernicusmarine `__ +""".format( + version +) diff --git a/doc/installation.rst b/doc/installation.rst index c4c35c89..902e7306 100644 --- a/doc/installation.rst +++ b/doc/installation.rst @@ -92,11 +92,11 @@ In the `release page `_ -- MacOS x86_64: `copernicusmarine_macos-x86_64 `_ -- Linux (with glibc 2.35): `copernicusmarine_linux `_ -- Linux (with glibc 2.31): `copernicusmarine_linux_2.31 `_ -- Windows: `copernicusmarine `_ +- MacOS arm64: |download_macos_arm64| +- MacOS x86_64: |download_macos_x86| +- Linux (with glibc 2.35): |download_linux_235| +- Linux (with glibc 2.31): |download_linux_231| +- Windows: |download_windows| Once downloaded for the specific platform, you can use the Toolbox by running the binary as follows: