Skip to content

Commit b1bba07

Browse files
committed
Improved docs
1 parent 229aaaf commit b1bba07

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

docs/rule-ref.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ Contained in: `all`-:material-lightning-bolt: `recommended`-:material-lightning
116116

117117
### :material-lightbulb: `ml-dataset-meta`
118118

119-
Multi-level datasets should provide '.zlevels' meta information file and if so, it should be consistent.
119+
Multi-level datasets should provide a '.zlevels' meta-info file, and if so, it should be consistent. Without the meta-info file the multi-level dataset cannot be reliably extended by new time slices as the aggregation method used for each variable must be specified.
120120
[:material-information-variant:](https://xcube.readthedocs.io/en/latest/mldatasets.html#the-xcube-levels-format)
121121

122122
Contained in: `all`-:material-lightning-bolt: `recommended`-:material-lightning-bolt:

xrlint/plugins/core/rules/time_coordinate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def data_array(self, ctx: RuleContext, node: DataArrayNode):
140140

141141
if not tz_part:
142142
ctx.report(
143-
f"Missing timezone '+H:MM' or '-H:MM' in 'units' attribute: {units!r}.",
143+
f"Missing timezone in 'units' attribute: {units!r}.",
144144
suggestions=[
145145
_units_format_suggestion(),
146146
f"Append timezone specification, e.g., use"

xrlint/plugins/xcube/rules/ml_dataset_meta.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@
1111
version="1.0.0",
1212
type="suggestion",
1313
description=(
14-
f"Multi-level datasets should provide {ML_META_FILENAME!r}"
15-
f" meta information file and if so, it should be consistent."
14+
f"Multi-level datasets should provide a {ML_META_FILENAME!r}"
15+
f" meta-info file, and if so, it should be consistent."
16+
f" Without the meta-info file the multi-level dataset cannot be"
17+
f" reliably extended by new time slices as the aggregation method"
18+
f" used for each variable must be specified."
1619
),
1720
docs_url=(
1821
"https://xcube.readthedocs.io/en/latest/mldatasets.html#the-xcube-levels-format"
@@ -34,8 +37,13 @@ def dataset(self, ctx: RuleContext, node: DatasetNode):
3437
meta = level_info.meta
3538
if meta is None:
3639
ctx.report(
37-
f"Missing {ML_META_FILENAME!r} meta-info file,"
38-
f" therefore dataset cannot be extended."
40+
f"Missing {ML_META_FILENAME!r} meta-info file.",
41+
suggestions=[
42+
f"Add {ML_META_FILENAME!r} meta-info file."
43+
f" Without the meta-info the dataset cannot be reliably extended"
44+
f" as the aggregation method used for each variable must be"
45+
f" specified."
46+
],
3947
)
4048
return
4149

0 commit comments

Comments
 (0)