You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 20e02cf
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: book/plugins/how-to-guides/create-register-transformer.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
Transformers are often short Python functions that convert one file format or data type to another file format or data type.
5
5
These functions are never directly called by users or developers, so by convention they don't get informative function names (as the annotations of the input and output provide complete detail on what they do).
6
6
7
-
Here's are two example `transformer` that are [defined and registered in `q2-types`](https://github.com/qiime2/q2-types/blob/e25f9355958755343977e037bbe39110cfb56a63/q2_types/distance_matrix/_transformer.py#L16):
7
+
Here are two example `transformer` that are [defined and registered in `q2-types`](https://github.com/qiime2/q2-types/blob/e25f9355958755343977e037bbe39110cfb56a63/q2_types/distance_matrix/_transformer.py#L16):
# Use the RachisWarning Class: An Always-Visible Warning
4
+
5
+
Warnings issued by the Python `warning` library are suppressed by defualt when using the command line interface (CLI).
6
+
In order to make sure the warnings issued by your plugin are visible in the CLI you must use the `RachisWarning` class.
7
+
This class can be imported from the QIIME2 framework, specifically from `qiime2.core.exceptions`.
8
+
Below is an [excerpt](https://github.com/qiime2/q2-feature-table/blob/b6a312e612338db0f69c97641372e7f0005b43f5/q2_feature_table/_merge.py#L90C12-L93C14) from the `q2-feature-table` plugin that may issue such a warning.
"You are merging taxonomies with different depths.",
28
+
RachisWarning
29
+
)
30
+
```
31
+
32
+
This action issues a `RachisWarning` when the taxonomies have different depths.
33
+
Since the `RachisWarning` class is an empty subclass of `UserWarning` from the Python `warnings`[library](https://docs.python.org/3/library/warnings.html), the only difference in behavior is command line visibility.
0 commit comments