-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #66 from climate-resource/42-html-errors-output
Add support dumping caught errors as HTML
- Loading branch information
Showing
23 changed files
with
1,826 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Deprecated | ||
[`validate_database_file_entry`][input4mips_validation.validation.database.validate_database_file_entry], | ||
[`validate_ds_to_write_to_disk`][input4mips_validation.validation.datasets_to_write_to_disk.validate_ds_to_write_to_disk], | ||
[`validate_file`][input4mips_validation.validation.file.validate_file] | ||
and [`validate_tree`][input4mips_validation.validation.tree.validate_tree]. | ||
See the docs for each function and deprecation warnings for recommended alternatives. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Added the `--output-html` flag to `input4mips-validation validate-tree`. | ||
This allows you to output the results of the validation as HTML, | ||
which provides easier exploration of the failures. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
""" | ||
Deprecation support | ||
""" | ||
|
||
from __future__ import annotations | ||
|
||
import warnings | ||
|
||
|
||
def raise_deprecation_warning( | ||
name: str, removed_in: str, use_instead: str, stacklevel: int = 3 | ||
) -> None: | ||
""" | ||
Raise a deprecation warning | ||
Parameters | ||
---------- | ||
name | ||
Name of the callable being deprecated | ||
removed_in | ||
Version in which the callable will be removed | ||
use_instead | ||
Instructions on what to use instead of the deprecated callable | ||
stacklevel | ||
Stack level to show with the warning | ||
""" | ||
message = ( | ||
f"{name} will be removed in {removed_in}. Instead, please use {use_instead}." | ||
) | ||
warnings.warn(message, DeprecationWarning, stacklevel=stacklevel) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.