Skip to content

Commit 222e33f

Browse files
committed
docs update (new icon)
1 parent 954c7ed commit 222e33f

File tree

3 files changed

+18
-9
lines changed

3 files changed

+18
-9
lines changed

docs/rule-ref.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,49 +40,49 @@ Contained in: `all`-:material-lightning-bolt: `recommended`-:material-alert:
4040
### :material-bug: `any-spatial-data-var`
4141

4242
A datacube should have spatial data variables.
43-
[More information.](https://xcube.readthedocs.io/en/latest/cubespec.html#data-model-and-format)
43+
[:material-information-variant:](https://xcube.readthedocs.io/en/latest/cubespec.html#data-model-and-format)
4444

4545
Contained in: `all`-:material-lightning-bolt: `recommended`-:material-lightning-bolt:
4646

4747
### :material-bug: `cube-dims-order`
4848

4949
Order of dimensions in spatio-temporal datacube variables should be [time, ..., y, x].
50-
[More information.](https://xcube.readthedocs.io/en/latest/cubespec.html#data-model-and-format)
50+
[:material-information-variant:](https://xcube.readthedocs.io/en/latest/cubespec.html#data-model-and-format)
5151

5252
Contained in: `all`-:material-lightning-bolt: `recommended`-:material-lightning-bolt:
5353

5454
### :material-lightbulb: `data-var-colors`
5555

5656
Spatial data variables should encode xcube color mappings in their metadata.
57-
[More information.](https://xcube.readthedocs.io/en/latest/cubespec.html#encoding-of-colors)
57+
[:material-information-variant:](https://xcube.readthedocs.io/en/latest/cubespec.html#encoding-of-colors)
5858

5959
Contained in: `all`-:material-lightning-bolt: `recommended`-:material-alert:
6060

6161
### :material-lightbulb: `grid-mapping-naming`
6262

6363
Grid mapping variables should be called 'spatial_ref' or 'crs' for compatibility with rioxarray and other packages.
64-
[More information.](https://xcube.readthedocs.io/en/latest/cubespec.html#spatial-reference)
64+
[:material-information-variant:](https://xcube.readthedocs.io/en/latest/cubespec.html#spatial-reference)
6565

6666
Contained in: `all`-:material-lightning-bolt: `recommended`-:material-alert:
6767

6868
### :material-bug: `increasing-time`
6969

7070
Time coordinate labels should be monotonically increasing.
71-
[More information.](https://xcube.readthedocs.io/en/latest/cubespec.html#temporal-reference)
71+
[:material-information-variant:](https://xcube.readthedocs.io/en/latest/cubespec.html#temporal-reference)
7272

7373
Contained in: `all`-:material-lightning-bolt: `recommended`-:material-lightning-bolt:
7474

7575
### :material-bug: `lat-lon-naming`
7676

7777
Latitude and longitude coordinates and dimensions should be called 'lat' and 'lon'.
78-
[More information.](https://xcube.readthedocs.io/en/latest/cubespec.html#spatial-reference)
78+
[:material-information-variant:](https://xcube.readthedocs.io/en/latest/cubespec.html#spatial-reference)
7979

8080
Contained in: `all`-:material-lightning-bolt: `recommended`-:material-lightning-bolt:
8181

8282
### :material-bug: `single-grid-mapping`
8383

8484
A single grid mapping shall be used for all spatial data variables of a datacube.
85-
[More information.](https://xcube.readthedocs.io/en/latest/cubespec.html#spatial-reference)
85+
[:material-information-variant:](https://xcube.readthedocs.io/en/latest/cubespec.html#spatial-reference)
8686

8787
Contained in: `all`-:material-lightning-bolt: `recommended`-:material-lightning-bolt:
8888

docs/todo.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@
44

55
- populate `core` plugin by more rules, see CF site and `cf-check` tool
66
- populate `xcube` plugin by more rules
7-
- add `docs`
7+
- enhance docs
8+
- complete configuration page
9+
- provide guide page
810
- use mkdocstrings ref syntax in docstrings
911
- provide configuration examples (use as tests?)
12+
- add `docs_url` to all existing rules
1013

1114
## Desired
1215

mkruleref.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
from xrlint.plugin import Plugin
22

3+
# for icons, see
4+
# https://squidfunk.github.io/mkdocs-material/reference/icons-emojis/
5+
36
severity_icons = {
47
2: "material-lightning-bolt",
58
1: "material-alert",
@@ -12,6 +15,9 @@
1215
"layout": "material-text",
1316
}
1417

18+
# read_more_icon = "material-book-open-outline"
19+
read_more_icon = "material-information-variant"
20+
1521

1622
def write_rule_ref_page():
1723
import xrlint.plugins.core
@@ -41,7 +47,7 @@ def write_plugin_rules(stream, plugin: Plugin):
4147
)
4248
stream.write(rule_meta.description or "_No description._")
4349
if rule_meta.docs_url:
44-
stream.write(f"\n[More information.]({rule_meta.docs_url})")
50+
stream.write("\n" + f"[:{read_more_icon}:]({rule_meta.docs_url})")
4551
stream.write("\n\n")
4652
# List the predefined configurations that contain the rule
4753
stream.write("Contained in: ")

0 commit comments

Comments
 (0)