Skip to content

Commit

Permalink
adjust documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
btschwertfeger committed Apr 9, 2024
1 parent ac9f835 commit 8918314
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,11 @@ python3 -m pip install python-cmethods
The python-cmethods package provides a command-line interface for applying
various bias correction methods out of the box.

Keep in mind that due to the various kinds of data and possibilities to
pre-process those, the CLI only provides a basic application of the implemented
techniques. For special parameters, adjustments, and data preparation, please
use programming interface.

Listing the parameters and their requirements is available by passing the
`--help` option:

Expand Down
1 change: 1 addition & 0 deletions cmethods/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ def cli(**kwargs) -> None:
kwargs[key] = xr.open_dataset(kwargs[key])
if not isinstance(kwargs[key], xr.Dataset):
raise TypeError("The data sets must be type xarray.Dataset")

Check warning on line 175 in cmethods/__init__.py

View check run for this annotation

Codecov / codecov/patch

cmethods/__init__.py#L175

Added line #L175 was not covered by tests

if kwargs["variable"] not in kwargs[key]:
raise KeyError(
f"Variable '{kwargs['variable']}' is missing in the {message}",
Expand Down
9 changes: 8 additions & 1 deletion doc/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ Command-Line Interface Usage
The python-cmethods package provides a command-line interface for applying
various bias correction methods out of the box.

Keep in mind that due to the various kinds of data and possibilities to
pre-process those, the CLI only provides a basic application of the implemented
techniques. For special parameters, adjustments, and data preparation, please
use programming interface.

Listing the parameters and their requirements is available by passing the
``--help`` option:

Expand All @@ -28,6 +33,7 @@ Applying the cmethods tool on the provided example data using the linear scaling
approach is shown below:

.. code-block:: bash
:caption: Apply Linear Scaling via command-line
cmethods \
--obs examples/input_data/observations.nc \
Expand All @@ -44,10 +50,12 @@ approach is shown below:
2024/04/08 18:11:12 INFO | Applying linear_scaling ...
2024/04/08 18:11:15 INFO | Saving result to linear_scaling.nc ...
For applying a distribution-based bias correction technique, the following
example may help:

.. code-block:: bash
:caption: Apply Quantile Delta Mapping via command-line
cmethods \
--obs examples/input_data/observations.nc \
Expand All @@ -64,7 +72,6 @@ example may help:
2024/04/08 18:16:35 INFO | Applying quantile_delta_mapping ...
2024/04/08 18:16:35 INFO | Saving result to quantile_delta_mapping.nc ...
API Usage and Examples
----------------------

Expand Down

0 comments on commit 8918314

Please sign in to comment.