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

chore: add QuickStart section #171

Merged
merged 6 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ dist/

# Sphinx documentation html build
doc/_build/

# Jupyter notebook checkpoints
**/.ipynb_checkpoints/
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ repos:
args: [--pytest-test-first]
exclude: ^tests/resources/
- id: pretty-format-json
exclude: ^doc/usage/quickoverview.ipynb
- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.10.1
hooks:
Expand Down
3 changes: 3 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,6 @@ python:
install:
- method: pip
path: .

#TODO: add environment variables if we want to build the notebook when building the documentation
# https://docs.readthedocs.io/en/stable/environment-variables.html
5 changes: 5 additions & 0 deletions conda_environment_sphinx.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
name: conda-environment-sphinx
dependencies:
- python==3.9.18
- pip
Expand All @@ -7,3 +8,7 @@ dependencies:
- 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
7 changes: 4 additions & 3 deletions doc/command-line-interface.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Command line interface
===================================================

.. _cli-intro:
.. click:: copernicusmarine.command_line_interface.copernicus_marine:base_command_line_interface
:prog: copernicusmarine
:nested: short
Expand All @@ -14,19 +15,19 @@ Command line interface
:nested: short
:commands: describe


.. _cli-subset:
.. click:: copernicusmarine.command_line_interface.group_subset:subset
:prog: subset
:nested: short
:commands: subset


.. _cli-get:
.. click:: copernicusmarine.command_line_interface.group_get:get
:prog: get
:nested: short
:commands: get


.. _cli-login:
.. click:: copernicusmarine.command_line_interface.group_login:login
:prog: login
:nested: short
Expand Down
8 changes: 7 additions & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = "Copernicus Marine Toolbox"
project = "Copernicus Marine toolbox"
copyright = "2024, Mercator Ocean International"
author = "Mercator Ocean International"

Expand All @@ -20,6 +20,7 @@
"sphinx_click",
"numpydoc",
"sphinx_copybutton",
"myst_nb",
]
numpydoc_show_class_members = False

Expand Down Expand Up @@ -67,3 +68,8 @@
"image/png",
"image/jpeg",
]

# -- Options for myst_nb --------------------------------------------------
# https://myst-nb.readthedocs.io/en/latest/configuration.html#config-intro

nb_execution_mode = "off"
4 changes: 2 additions & 2 deletions doc/index.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
.. Copernicus Marine Toolbox documentation master file, created by
.. Copernicus Marine toolbox documentation master file, created by
sphinx-quickstart on Wed Aug 21 14:04:51 2024.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.

Copernicus Marine toolbox documentation
=======================================

The ``copernicusmarine`` Python library offers capabilities through both **Command Line Interface (CLI)** and **Python API**:
The ``copernicusmarine`` Python library offers capabilities through both **command line interface (CLI)** and **Python API**:

- **Metadata Information**: List and retrieve metadata information on all variables, datasets and products.
- **Subset Datasets**: Subset datasets to extract only the parts of interest, in preferred format, such as Analysis-Ready Cloud-Optimized (ARCO) Zarr or NetCDF file format.
Expand Down
4 changes: 3 additions & 1 deletion doc/installation.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
.. _installation-page:

===================================================
Installing Copernicus Marine toolbox
===================================================

There are several ways to install or use the Copernicus Marine Toolbox:
There are several ways to install or use the Copernicus Marine toolbox:

* via pip (see `PyPI repository <https://pypi.org/project/copernicusmarine/>`_)
* via mamba | conda (see `conda-forge channel <https://anaconda.org/conda-forge/copernicusmarine>`_)
Expand Down
3 changes: 3 additions & 0 deletions doc/usage/describe-usage.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
.. _describe-page:

=====================
Command ``describe``
=====================

Expand Down
3 changes: 3 additions & 0 deletions doc/usage/get-usage.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
.. _get-page:

===============
Command ``get``
===============

Expand Down
3 changes: 3 additions & 0 deletions doc/usage/login-usage.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
.. _login-page:

==================
Command ``login``
==================

Expand Down
2 changes: 1 addition & 1 deletion doc/usage/network-configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ to globally disable the usage of SSL in the toolbox:
``trust_env`` for Python libraries
------------------------------------

To do HTTP calls, the Copernicus Marine Toolbox uses the ``requests`` library.
To do HTTP calls, the Copernicus Marine toolbox uses the ``requests`` library.
By default, this library will have ``trust_env`` values set to ``True``.

If you want to deactivate this, you can set ``COPERNICUSMARINE_TRUST_ENV=False`` (default ``True``).
Expand Down
1,861 changes: 1,861 additions & 0 deletions doc/usage/quickoverview.ipynb

Large diffs are not rendered by default.

8 changes: 0 additions & 8 deletions doc/usage/quickstart.rst

This file was deleted.

3 changes: 3 additions & 0 deletions doc/usage/subset-usage.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
.. _subset-page:

===================
Command ``subset``
===================

Expand Down
2 changes: 1 addition & 1 deletion doc/usage/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Usage and technical details

.. toctree::

quickstart
quickoverview
login-usage
describe-usage
subset-usage
Expand Down