Commit 33c0f8e
authored
fix: Reraise exceptions in CLI-mode if run in debugger (#225)
## Description
Many exceptions raised by `anemoi-datasets` are of type `ValueError`.
Thus they are caught by `cli_main` and converted to a more user-friendly
error. While this might increase the user experience, it prevents the
use of Python debuggers.
## What problem does this change solve?
Enable the use of debuggers to debug cli runs.
E.g. `ipdb3 $(which anemoi-datasets) create ...`
## What issue or task does this change relate to?
## Additional notes ##
***As a contributor to the Anemoi framework, please ensure that your
changes include unit tests, updates to any affected dependencies and
documentation, and have been tested in a parallel setting (i.e., with
multiple GPUs). As a reviewer, you are also responsible for verifying
these aspects and requesting changes if they are not adequately
addressed. For guidelines about those please refer to
https://anemoi.readthedocs.io/en/latest/***
By opening this pull request, I affirm that all authors agree to the
[Contributor License
Agreement.](https://github.com/ecmwf/codex/blob/main/Legal/contributor_license_agreement.md)1 parent 30b2d74 commit 33c0f8e
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
268 | | - | |
269 | 268 | | |
270 | 269 | | |
271 | 270 | | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
272 | 275 | | |
273 | 276 | | |
274 | 277 | | |
| |||
0 commit comments