-
Notifications
You must be signed in to change notification settings - Fork 88
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
Corrects example of a CLI in the Read the Doc documentation #1673
Corrects example of a CLI in the Read the Doc documentation #1673
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1673 +/- ##
=======================================
Coverage 98.19% 98.20%
=======================================
Files 110 110
Lines 10151 10173 +22
=======================================
+ Hits 9968 9990 +22
Misses 183 183
Continue to review full report at Codecov.
|
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.
A couple of minor comments
doc/source/about.rst
Outdated
* for each threshold specified (5, 10, 15, 20 m/s) a new x-y grid of data will be created. Each point in the grid will contain a 0 if the input wind speed at that point was below the threshold, or 1 if it was above the threshold. | ||
* output_file.nc will be a new netCDF file containing the resulting data cube with an additional leading dimension that corresponds to the given thresholds (5, 10, 15, 20 m/s). | ||
* the threshold units specifies the units of the provided thresholds (m/s) and these will be converted to match the units of the original cube before calculating the probability space. |
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'm not sure this quite makes sense. What do you think of the suggestion below instead?
* the threshold units specifies the units of the provided thresholds (m/s) and these will be converted to match the units of the original cube before calculating the probability space. | |
* the threshold units specifies the units of the provided thresholds (m/s) and these will be converted to match the units of the original cube before thresholding the input cube. |
* for each threshold specified (5, 10, 15, 20 m/s) a new x-y grid of data will be created. Each point in the grid will contain a 0 if the input wind speed at that point was below the threshold, or 1 if it was above the threshold. | ||
* output_file.nc will be a new netCDF file containing the resulting data cube with an additional leading dimension that corresponds to the given thresholds (5, 10, 15, 20 m/s). | ||
* the threshold units specifies the units of the provided thresholds (m/s) and these will be converted to match the units of the original cube before calculating the probability space. | ||
* output.nc will be a new netCDF file containing the resulting data cube with an additional leading dimension that corresponds to the given thresholds (5, 10, 15, 20 m/s). | ||
|
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 noticed when I built the docs that the --help part of this line renders a bit odd. I think it only needs one \ rather than \. Could you fix that too?
fc8b98f
to
00c4cd8
Compare
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 Marcus, this looks good now :)
doc/source/about.rst
Outdated
@@ -67,14 +67,15 @@ Here we give a simple example of using an IMPROVER CLI to threshold data, moving | |||
|
|||
.. code:: console | |||
|
|||
bin/improver threshold input_file.nc output_file.nc 5 10 15 20 --threshold_units m/s | |||
bin/improver threshold input.nc --threshold-values 5,10,15,20 --threshold-units m/s --output output.nc | |||
|
|||
|
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.
Is it worth being explicit about the fact that we need to use hyphens in the CLI name instead of underscores? You can't tell with the threshold CLI as it's only one word, but if we took apply_lapse_rate.py then as far as I'm aware we would need to write it as:
bin/improver apply-lapse-rate apply_lapse_rate.py --ouput output.nc
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 for mention this. I hadn't considered it. I've updated the doc to include a bullet point covering 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 for the update. Happy to approve
* master: MOBT127 tiny tweak to filter_realizations (metoppv#1682) Mobt 160 ecc masked data (metoppv#1662) Convert test_ManipulateReliabilityTable to pytest (metoppv#1678) Alter spot extract cli (metoppv#1666) Enable site cube input to ConstructReliabilityCalibrationTables (metoppv#1667) Corrects example of a CLI in the Read the Doc documentation (metoppv#1673) MOBT-211: mosg__model_run attribute handling in weather symbols (metoppv#1670) # Conflicts: # improver_tests/wxcode/wxcode/test_WeatherSymbols.py
* master: Remove flawed interpretation of the blend_time coordinate. (#1690) DOC: Removal of unnecessary exclusions in sphinx apidoc build (#1689) MOBT127 tiny tweak to filter_realizations (#1682) Mobt 160 ecc masked data (#1662) Convert test_ManipulateReliabilityTable to pytest (#1678) Alter spot extract cli (#1666) Enable site cube input to ConstructReliabilityCalibrationTables (#1667) Corrects example of a CLI in the Read the Doc documentation (#1673) MOBT-211: mosg__model_run attribute handling in weather symbols (#1670)
…1673) * Update to the Example use of a CLI on ReadtheDocs * Adding name to Contributing file * Updates to CLI Example in Read the Docs * Updates to CLI example * Updates to CLI example Co-authored-by: Marcus Spelman <marcus.spelman@metoffice.gov.uk>
Addresses https://github.com/metoppv/mo-blue-team/issues/237
Description Corrects the Example of a CLI on the Read the docs page to be a working CLI. Also updates the text below to reflect these changes.
Testing:
CLA