Skip to content

Commit eca6e82

Browse files
committed
Merge branch 'main' into eqctier3-f5222810-e831-4064-8e2b-52a59811c0c6
2 parents 303f5d2 + dccb9f8 commit eca6e82

File tree

5 files changed

+29
-18
lines changed

5 files changed

+29
-18
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ repos:
66
- id: check-toml
77
- id: check-merge-conflict
88
- repo: https://github.com/astral-sh/ruff-pre-commit
9-
rev: v0.6.9
9+
rev: v0.7.3
1010
hooks:
1111
- id: ruff
1212
args: [--fix, --show-fixes]
@@ -21,7 +21,7 @@ repos:
2121
- id: pretty-format-toml
2222
args: [--autofix]
2323
- repo: https://github.com/pre-commit/mirrors-mypy
24-
rev: v1.11.2
24+
rev: v1.13.0
2525
hooks:
2626
- id: mypy
2727
args: [--strict, --ignore-missing-imports]
@@ -50,13 +50,13 @@ repos:
5050
types: [jupyter]
5151
additional_dependencies: [nbformat]
5252
- repo: https://github.com/executablebooks/mdformat
53-
rev: 0.7.17
53+
rev: 0.7.18
5454
hooks:
5555
- id: mdformat
5656
additional_dependencies:
5757
- mdformat-gfm
5858
- repo: https://github.com/kynan/nbstripout
59-
rev: 0.7.1
59+
rev: 0.8.0
6060
hooks:
6161
- id: nbstripout
6262
args: [--drop-empty-cells, --keep-count, --keep-output, --extra-keys, metadata.kernelspec]

Satellite_ECVs/Atmospheric_Composition/satellite_satellite-ozone-v1_climate-monitoring_q01.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"source": [
5151
"## 📢 Quality assessment statements\n",
5252
"\n",
53-
"```{admonition} These are the key outcomes of this quality assessment\n",
53+
"```{admonition} These are the key outcomes of this assessment\n",
5454
":class: note\n",
5555
"* The MERGED-UV v2000 provides a long-term, consistent record of total column ozone concentration and is therefore valuable for providing insight into the evolution of the ozone layer, although data prior to 2004 should be carefully evaluated.\n",
5656
"* The MERGED-UV v2000 does not include measurements during the polar night at latitudes higher than 57.5° in both hemispheres and therefore cannot be used to describe the ozone climatology and trends over these regions.\n",
@@ -458,7 +458,7 @@
458458
"name": "python",
459459
"nbconvert_exporter": "python",
460460
"pygments_lexer": "ipython3",
461-
"version": "3.11.9"
461+
"version": "3.11.10"
462462
}
463463
},
464464
"nbformat": 4,

scripts/validate-headings.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,29 @@
1212
"## ℹ️ If you want to know more",
1313
)
1414

15+
ADMONITION_TITLE = "These are the key outcomes of this assessment"
16+
1517

1618
def validate_headers(path: Path) -> None:
1719
notebook = nbformat.read(path, nbformat.NO_CONVERT)
1820

1921
title_count = 0
22+
admonition_count = 0
2023
headings_count = dict.fromkeys(HEADINGS, 0)
2124
for cell in notebook.cells:
2225
if cell["cell_type"] != "markdown":
2326
continue
2427

2528
for line in cell.get("source", "").splitlines():
2629
line = line.strip()
30+
2731
if line.startswith("# "):
2832
title_count += 1
29-
continue
33+
elif line == f"```{{admonition}} {ADMONITION_TITLE}":
34+
admonition_count += 1
35+
36+
if not path.name.startswith("template"):
37+
assert title_count, f"{path=!s}: The first line is not a title."
3038

3139
for heading in headings_count:
3240
if line.startswith(heading):
@@ -36,6 +44,7 @@ def validate_headers(path: Path) -> None:
3644
assert not line.startswith("## "), f"{path=!s}: Invalid H2 {line=}"
3745

3846
assert title_count == 1, f"{path=!s}: Invalid {title_count=}"
47+
assert admonition_count == 1, f"{path=!s}: Invalid {admonition_count=}"
3948
for heading, header_count in headings_count.items():
4049
assert header_count == 1, f"{path=!s}: Invalid {header_count=} of {heading=}"
4150

templates/template.ipynb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"id": "4",
4848
"metadata": {},
4949
"source": [
50-
"## ❓ Quality assessment question(s)\n",
50+
"## ❓ Quality assessment question\n",
5151
"* **In most cases there should be one question listed here in bold**\n",
5252
"* **(In some cases a second related/follow-up question may be included)**"
5353
]
@@ -74,9 +74,9 @@
7474
"\n",
7575
"```{admonition} These are the key outcomes of this assessment\n",
7676
":class: note\n",
77-
"* Statement 1\n",
78-
"* Statement 2\n",
79-
"* Statement 3\n",
77+
"* Finding 1\n",
78+
"* Finding 2\n",
79+
"* Finding 3\n",
8080
"* etc\n",
8181
"```"
8282
]
@@ -521,7 +521,7 @@
521521
"name": "python",
522522
"nbconvert_exporter": "python",
523523
"pygments_lexer": "ipython3",
524-
"version": "3.11.8"
524+
"version": "3.11.10"
525525
},
526526
"papermill": {
527527
"default_parameters": {},

templates/template_instructions.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ There is a new approach to linking the methodology list to the subsections in an
2424

2525
## Assessment title (no icons)
2626

27-
We do not aim to be completely prescriptive about the title, it should be readable and descriptive, but also include some key tags to increase searchability, e.g. *Seasonal forecasts bias assessment for impact models*.
27+
We do not aim to be completely prescriptive about the title, it should be readable and descriptive, but also include some keywords to increase searchability, e.g. *Seasonal forecasts bias assessment for impact models*.
2828

29-
- **Data stream**: Satellite (observations), Insitu (observations), Reanalysis, Seasonal (Forecasts), Climate (projections)
29+
- **Data stream/ECV/variable**: Satellite (observations), Insitu (observations), Reanalysis, Seasonal (Forecasts), Climate (projections)
3030
- **Quality area**: bias, forecast skill, completeness, intercomparison of X and Y, comparison to X, trend assessment, extremes, spatial/temporal resolution, reliability, accuracy, etc.
3131
- **Application area**: impact models, risk assessment, climate monitoring, scientific study of X, X sector, 'region', 'specific C3S application', flood forecasting, etc.
3232

@@ -56,15 +56,17 @@ A section of text with no heading which appears after the user question and befo
5656

5757
## 📢 Quality assessment statement
5858

59-
Key results and guidance including an answer to the user question - to be visually highlighted and with the section title ‘Quality assessment statement’.
59+
Key results and guidance including an answer to the user question.
6060

6161
```{note}
6262
The blue notification box that contains the quality assessment statement bullet points will not appear in GitHub, but will be rendered when the Jupyter Book page is created.
6363
```
6464

6565
## Figure (no heading or icon)
6666

67-
A key figure should be included if possible, acting as a 'graphical abstract' for the assessment. This could be a figure generated later in the code, or from an external source (if licensing allows reproduction) - in this case the source should be cited in the caption. Images should be dragged and dropped into the markdown cell, which created an 'attachment code', and the external file is no longer needed. If the image file already includes a figure number and the caption then simple syntax can be used (`![](attachment:... ID from drag and drop)`). Otherwise, figure formatting can be used (see the template), where the attachment code from the drag and drop needs to be wrapped in the figure syntax. This approach should also be followed if images not generated by code are included later in the assessment.
67+
A key figure should be included if possible, acting as a 'graphical abstract' for the assessment. This could be a figure generated later in the code, or from an external source (if licensing allows reproduction) - in this case the source should be cited in the caption. Images should be dragged and dropped into the markdown cell, which creates an 'attachment code', and the external file is not needed.
68+
69+
If the image file already includes a figure number and the caption then simple syntax can be used (`![](attachment:... ID from drag and drop)`). Otherwise, figure formatting can be used (see the template), where the attachment code from the drag and drop needs to be wrapped in the figure syntax. This approach should also be followed if images not generated by code are included later in the assessment.
6870

6971
```{note}
7072
The figure formatting will not render in Github, but will work when the Jupyter Book page is built. Also note that the figure numbering is automatic, and applied across the whole Book (each Notebook does not start at 1 - this may be changed in the future).
@@ -87,6 +89,6 @@ A series of subsections with the same titles as in the listen in the methodology
8789

8890
## ℹ️ If you want to know more
8991

90-
Including a key resources subsection, which can link to suggested further reading, code packages used, and the relevant CDS catalogue entries.
92+
Including a key resources subsection, which can link to suggested further reading, code packages used, and the relevant CDS catalogue entries. Try to link to relevant applications of the data, such as the C3S Climate Atlas, for projections, or the relevant parts of the European State of the Climate report for some ECVs.
9193

92-
Including a references subsection, which is a numbered list of the references used throughout the text. However, the references in the text will link to the external source, rather than the references list at the bottom of the assessment.
94+
Including a references subsection, which is a numbered list of the references used throughout the text. However, the references in the text should link to the external source, rather than the references list at the bottom of the assessment.

0 commit comments

Comments
 (0)