Skip to content

docs: add CDSETool to ecosystem#419

Open
pjonsson wants to merge 1 commit intodavidfrantz:developfrom
pjonsson:doc-cdsetool
Open

docs: add CDSETool to ecosystem#419
pjonsson wants to merge 1 commit intodavidfrantz:developfrom
pjonsson:doc-cdsetool

Conversation

@pjonsson
Copy link
Copy Markdown
Contributor

No description provided.

@davidfrantz
Copy link
Copy Markdown
Owner

Thanks Peter. I tried to test it , but ran into multiple issues at once.

Installation was an issue and didn't work out of the box due to some conflicts in numpy headers.

In a clean docker environment, I managed to install it (though typing_extensions was still missing).

But still then, I did not manage to use it. The documentation does not mention which API is used. In this PR, you talk about OData. When I run sample commands, e.g.

$ cdsetool query search-terms SENTINEL-2 AssertionError: Unable to find collection with name SENTINEL-2. Please see https://documentation.dataspace.copernicus.eu/APIs/OpenSearch.html#collections for a list of available collections
I only get errors. Also, the URL is returning 404 when I copy it into a browser. The URL uses the OpenSearch API, which was recently retired from CDSE...

I am also missing a documentation of availble options in the CLI. It is not entirely clear whether the provided examples are exhaustive or if there are hidden options.

@pjonsson
Copy link
Copy Markdown
Contributor Author

Yes, the switch to the OData API was merged earlier this week, so the main branch of the repository should work. That branch also contains a fix that removes the use of typing_extensions.

I only have limited access so I'm not sure if I have the required permissions, but if the original creators are too busy with other things this week I will try to make a new release next week.

The CLI options that exist should have some kind of description (that could probably be improved), here's what it looks like for me on latest main:

$ uv run cdsetool --help
      Built cdsetool @ file:///home/ubuntu/ssdl-core/CDSETool
Uninstalled 2 packages in 1ms
Installed 2 packages in 17ms

 Usage: cdsetool [OPTIONS] COMMAND [ARGS]...

╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --install-completion          Install completion for the current shell.      │
│ --show-completion             Show completion for the current shell, to copy │
│                               it or customize the installation.              │
│ --help                        Show this message and exit.                    │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────────╮
│ download   Download all features matching the search terms                   │
│ query                                                                        │
╰──────────────────────────────────────────────────────────────────────────────╯

$ uv run cdsetool query --help

 Usage: cdsetool query [OPTIONS] COMMAND [ARGS]...

╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --help          Show this message and exit.                                  │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────────╮
│ search-terms   List the available search terms for a collection              │
│ search         Search for features matching the search terms                 │
╰──────────────────────────────────────────────────────────────────────────────╯

$ uv run cdsetool download --help

 Usage: cdsetool download [OPTIONS] COLLECTION PATH

 Download all features matching the search terms

╭─ Arguments ──────────────────────────────────────────────────────────────────╮
│ *    collection      TEXT  [required]                                        │
│ *    path            TEXT  [required]                                        │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --concurrency                                  INTEGER  Number of concurrent │
│                                                         connections          │
│                                                         [default: 1]         │
│ --overwrite-existing    --no-overwrite-exi…             Overwrite already    │
│                                                         downloaded files     │
│                                                         [default:            │
│                                                         no-overwrite-existi… │
│ --search-term                                  TEXT     Search by term=value │
│                                                         pairs. Pass multiple │
│                                                         times for multiple   │
│                                                         search terms         │
│ --filter-pattern                               TEXT     Download specific    │
│                                                         files within product │
│                                                         bundles using OData  │
│                                                         API's node filtering │
│                                                         functionality        │
│ --help                                                  Show this message    │
│                                                         and exit.            │
╰──────────────────────────────────────────────────────────────────────────────╯

@davidfrantz
Copy link
Copy Markdown
Owner

OK Thanks, installing directly from Github worked now.

What is the correct way to pass a geometry? I can't get it to work. An issue with the CLI tool is that it is stalled indefinitely when you pass incorrect options, so it is a bit hard to figure out.

cdsetool query search SENTINEL-2 --search-term geometry="POLYGON((6 50, 8 50, 8 49, 6 49))" --search-
term contentDateStartGe=2026-03-18 --search-term contentDateEndLe=2026-03-25 --search-term cloudCoverLe=25

@pjonsson
Copy link
Copy Markdown
Contributor Author

We only use CDSETool as a library so I don't know about the CLI offhand, let me check and get back to you next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants