-
Notifications
You must be signed in to change notification settings - Fork 7
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
fix: correct typos and improve doc #156
fix: correct typos and improve doc #156
Conversation
.. code-block:: bash | ||
|
||
copernicusmarine subset | ||
--dataset-id cmems_mod_glo_phy-thetao_anfc_0.083deg_PT6H-i | ||
--variable thetao | ||
--start-datetime 2022-01-01T00:00:00 | ||
--end-datetime 2022-12-31T23:59:59 | ||
--minimum-longitude -6.17 | ||
--maximum-longitude -5.08 | ||
--minimum-latitude 35.75 | ||
--maximum-latitude 36.30 | ||
--minimum-depth 0.0 | ||
--maximum-depth 5.0 | ||
copernicusmarine subset --dataset-id cmems_mod_ibi_phy_my_0.083deg-3D_P1D-m --variable thetao --variable so --start-datetime 2021-01-01 --end-datetime 2021-01-03 --minimum-longitude 0.0 --maximum-longitude 0.1 --minimum-latitude 28.0 --maximum-latitude 28.1 --minimum-depth 1 --maximum-depth 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
weren't they saying also that they didn't like that ..code-block:: bash
was appearing? is this solved on how to call the sphinx util?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right I should check this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
=================================================== | ||
|
||
.. click:: copernicusmarine.command_line_interface.copernicus_marine:base_command_line_interface | ||
:prog: copernicusmarine | ||
:nested: full |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So by manually adding them instead of letting sphinx-click
do the nested documentation, it allows to skip some titles that were like cli-describe
(it was a not from David)
* via docker `dockerhub`_ | ||
* via pip (see `PyPI repository <https://pypi.org/project/copernicusmarine/>`_) | ||
* via mamba | conda (see `conda-forge channel <https://anaconda.org/conda-forge/copernicusmarine>`_) | ||
* via docker (see `dockerhub repository <https://hub.docker.com/r/copernicusmarine/copernicusmarine>`_) | ||
|
||
Alternatively, you can use a binary. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not for this PR (so, note to myself and you), but should we point somewhere here too? at the end of the section or something like that?
.. note:: | ||
|
||
Note that the use of ``xarray<2024.7.0`` with ``numpy>=2.0.0`` leads to inconsistent results. See this issue: `xarray issue <https://github.com/pydata/xarray/issues/9179>`_. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how much can we change this? for example: xarray solves it in a new release: we don't release until one month in... will the documentation stay the same until we rerelease? or there is a way to update the documentation without releasing? is it good, then, to have this sort of comments here? (for me it is but maybe not the best way that we don't have a way to update the documentation)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But if they solve it in a new release then this statement is still true, isn't it?
So in which configuration would this become false?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mmh if they solve it and then 2024.7.1 works (would be easier for users maybe?) or is it not that big of a priority?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If they solve it then 2024.7.1 works then it's good :D We still have to warn the users that if they use version 2024.7.0 it might bring some bugs with numpy>2.0.0 right?
copernicusmarine describe --include-datasets > all_datasets_copernicusmarine.json | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here there is no response because it will all be sent to a json, but then we are not showing any sort of response... understandable from a logic point of view but maybe from a user side some answer would be more helpful? regarding what they said about obtaining responses always.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But I already show an example before and after so I thought this was enough :D And about that:
what they said about obtaining responses always.
It concerns the docstrings, not all the commands of the documentation
doc/usage/describe-usage.rst
Outdated
|
||
**Example:** | ||
|
||
If you want the `cmems_obs-ins_glo_phy-temp-sal_my_cora_irr` dataset only, you can use the following command: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe: "If you want, for example, the comes...
this way it takes importance of the name of the dataset(?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it takes importance of the name? what does it mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that it is more easy to understand that the dataset id is random. It was a suggestion, definitely not super sure about it
copernicusmarine get --dataset-id cmems_mod_ibi_phy_my_0.083deg-3D_P1Y-m --filter "*01yav_200[0-2]*" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the answer of this command too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a little line to describe, I thought this was enough because in the end the response logs are not super relevant
|
||
.. code-block:: bash | ||
|
||
copernicusmarine get --dataset-id cmems_mod_ibi_phy_my_0.083deg-3D_P1Y-m --filter "*01yav_200[0-2]*" | ||
|
||
Option ``--regex`` allows specifying a regular expression for more advanced file selection. | ||
|
||
**Example:** | ||
**Example** To download only files that contains "2000", "2001", or "2002" using a regular expression: | ||
|
||
.. code-block:: bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe the answer for this one too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cf answer from comment before
@@ -12,11 +12,11 @@ The ``login`` command creates a configuration file called ``.copernicusmarine-cr | |||
password : | |||
INFO - Configuration files stored in /Users/foo/.copernicusmarine | |||
|
|||
If the ``.copernicusmarine-credentials`` file already exists, the system will ask for confirmation before overwriting it (using the ``--overwrite`` or ``--overwrite-configuration-file`` options). | |||
If the ``.copernicusmarine-credentials`` file already exists, the system will ask for confirmation before overwriting it. You can also use option ``–-overwrite`` or ``--overwrite-configuration-file`` to skip confirmation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this makes my life weirder: we have a flag which is --skip-if-user-logged-in
because the default behaviour is to precisely overwrite the credentials file... I'm not understanding this option then (or is this a new one which will change in favour of the other? In that case, I would be against this and maybe some check to see if it exists -but not overwrite it!-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still don't understand the --skip-if-user-logged-in
but concerning the --overwrite
here is how I understand the process:
You are a user, you do: copernicusmarine login
, you log in as "USER1" and a file is created: ~/.../.credentials
.
Then for some reason (for example you were on a common server) someone comes and wants to log in as "USER2".
They do copernicusmarine login
and this will be prompt:
copernicusmarine password:
File /../.credentials already exists, overwrite it ? [y/N]:
All good :D
Now USER1 and USER2 want to automatise this because they want to launch their scripts but they don't know who is connected. Hence they will use the --overwrite
argument to avoid needed to prompt anything and let the code run!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, then maybe it is worth to give it two thoughts...
From what I understand, and following your example: if user1 goes again in the machine, no one has touched it, and wants to login but not do it necessarily if it already has it's credentials, the flag --skip-if-user-logged-in
precisely would skip the login for user 1.
What seems weird, though, is that this same example would be similar if user2 had logged in in the middle... so user1 would be using the wrong credentials (maybe not a big deal?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe to be thought but outside of the scope of this PR!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes we will study this when doing the PR on this subject
"output": "cmems_mod_ibi_phy_my_0.083deg-3D_P1D-m_thetao_19.00W-5.00E_26.00N-56.00N_0.51-5698.06m_1993-01-01-2021-12-28.nc", | ||
"size": 210828.20248091602, | ||
"data_needed": 210887.9328244275, | ||
"coodinates_extent": { | ||
"longitude": { | ||
"minimum": -19.0, | ||
"maximum": 4.999999046325684 | ||
}, | ||
"latitude": { | ||
"minimum": 26.0, | ||
"maximum": 56.0 | ||
}, | ||
"time": { | ||
"minimum": "1993-01-01T00:00:00Z", | ||
"maximum": "2021-12-28T00:00:00Z" | ||
}, | ||
"depth": { | ||
"minimum": 0.5057600140571594, | ||
"maximum": 5698.060546875 | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the default would be now to not show this, no? will you update it when you update change the option?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly :D
About ``--bounding-box-method`` option | ||
"""""""""""""""""""""""""""""""""""""""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will need to delete this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(it's in the document I shared you I think)
ddd2820
to
5d60c1c
Compare
correct a lot of typos and improve the doc
correct a lot of typos and improve the doc
Based on some comments after reading https://toolbox-docs.marine.copernicus.eu/en/v2.0.0a2/