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: documentation domains & dependencies #245

Merged
merged 16 commits into from
Dec 11, 2024
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ repos:
rev: v0.991
hooks:
- id: mypy
additional_dependencies: [types-requests==2.27.11, types-pyyaml==6.0.5]
additional_dependencies: [types-requests==2.27.11, types-pyyaml==6.0.5, types-toml==0.10.8.20240310]
2 changes: 2 additions & 0 deletions conda_environment_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ dependencies:
- pip:
- pytest-order==1.2.1
- freezegun==1.5.1
- toml==0.10.2
- types-toml==0.10.8.20240310
28 changes: 28 additions & 0 deletions doc/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,25 @@ And from a Windows os (cmd):

Dependencies
**************
The Copernicus Marine toolbox has the following dependencies:

- `Python <https://www.python.org/>`__ (3.9 or later)
- `click <https://click.palletsprojects.com/>`__ (8.0.4 or later)
- `requests <https://docs.python-requests.org/en/latest/>`__ (2.27.1 or later)
- `setuptools <https://setuptools.pypa.io/en/latest/>`__ (68.2.2 or later)
- `xarray <https://xarray.pydata.org/>`__ (2023.4.0 or later)
- `tqdm <https://tqdm.github.io/>`__ (4.65.0 or later)
- `zarr <https://zarr.readthedocs.io/en/stable/>`__ (2.13.3 or later)
- `dask <https://www.dask.org/>`__ (2022 or later)
- `boto3 <https://boto3.amazonaws.com/v1/documentation/api/latest/index.html>`__ (1.26 or later)
- `semver <https://python-semver.readthedocs.io/en/latest/>`__ (0.2 or later)
- `pystac <https://pystac.readthedocs.io/en/stable/>`__ (1.8.3 or later)
- `lxml <https://lxml.de/>`__ (4.9.0 or later)
- `numpy <https://www.numpy.org/>`__ (1.23 or later)
- `pendulum <https://pendulum.eustace.io/>`__ (3.0.0 or later)
- `pydantic <https://docs.pydantic.dev/>`__ (2.9.1 or later)
- `h5netcdf <https://h5netcdf.org>`__ (1.4.0 or later)


The Copernicus Marine toolbox uses the xarray library to handle the data when using the ``subset`` command.
There are some compatibility issues with the latest versions of xarray and numpy:
Expand All @@ -159,3 +178,12 @@ If you want to use it please make sure to install the ``netcdf4`` library:
.. note::

The image of the toolbox should already have the ``netcdf4`` library installed.


Domains required by the Copernicus Marine toolbox
********************************************************
To be able to use the Copernicus Marine services, you need to be able to access those domains:

- ``https://cmems-cas.cls.fr``: for the old authentication process.
- ``https://auth.marine.copernicus.eu``: for the new authentication process.
- ``https://s3.waw3-1.cloudferro.com``: for the data.
15 changes: 13 additions & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ ipython="^8.14.0"
[tool.poetry.scripts]
copernicusmarine = 'copernicusmarine.command_line_interface.copernicus_marine:command_line_interface'

[tool.poetry.group.dev.dependencies]
types-toml = "^0.10.8.20240310"
Comment on lines +33 to +34
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok so the problem is that now you have created a group for this, whereas there is a dev dependencies that exists already ([tool.poetry.dev-dependencies]) it could be coming from the difference of versions from the poetry you are using and the poetry used before to create the file

Anyway it would be nice to homogenize this: all dev deps in [tool.poetry.dev-dependencies] or all dev deps in [tool.poetry.dev-dependencies]


[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
21 changes: 21 additions & 0 deletions tests/__snapshots__/test_dependencies_updates.ambr
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# serializer version: 1
# name: TestDependeciesUpdates.test_update_dependencies
dict({
'boto3': '>=1.26',
'click': '>=8.0.4',
'dask': '>=2022',
'h5netcdf': '^1.4.0',
'lxml': '>=4.9.0',
'numpy': '>=1.23.0',
'pendulum': '^3.0.0',
'pydantic': '^2.9.1',
'pystac': '>=1.8.3',
'python': '>=3.9',
'requests': '>=2.27.1',
'semver': '>=3.0.2',
'setuptools': '>=68.2.2',
'tqdm': '>=4.65.0',
'xarray': '>=2023.4.0',
'zarr': '>=2.13.3',
})
# ---
10 changes: 10 additions & 0 deletions tests/test_dependencies_updates.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from toml import load


class TestDependeciesUpdates:
def test_update_dependencies(self, snapshot):

with open("pyproject.toml") as f:
config = load(f)
# If these change, update the dependencies in the documentation!
assert config["tool"]["poetry"]["dependencies"] == snapshot
Loading