Skip to content

Commit

Permalink
Merge branch 'main' into eqctier3-d6f6e5ff-b530-4fec-89b3-36410f58809e
Browse files Browse the repository at this point in the history
  • Loading branch information
malmans2 committed Jan 8, 2025
2 parents ddf4fd0 + baf5a75 commit 6fe570b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ repos:
- id: check-toml
- id: check-merge-conflict
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.3
rev: v0.8.4
hooks:
- id: ruff
args: [--fix, --show-fixes]
Expand All @@ -21,7 +21,7 @@ repos:
- id: pretty-format-toml
args: [--autofix]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.13.0
rev: v1.14.0
hooks:
- id: mypy
args: [--strict, --ignore-missing-imports]
Expand Down Expand Up @@ -50,13 +50,13 @@ repos:
types: [jupyter]
additional_dependencies: [nbformat]
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.18
rev: 0.7.21
hooks:
- id: mdformat
additional_dependencies:
- mdformat-gfm
- repo: https://github.com/kynan/nbstripout
rev: 0.8.0
rev: 0.8.1
hooks:
- id: nbstripout
args: [--drop-empty-cells, --keep-count, --keep-output, --extra-keys, metadata.kernelspec]
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# c3s2-eqc-quality-assessment

> \[!WARNING\]
> [!WARNING]
> Please note that this repository is used for development and review, so quality assessments should be considered work in progress until they are merged into the main branch
> \[!NOTE\]\
> [!NOTE]
> If anything is unclear with the templates, or if you encounter any problems, please report them at [GH164](https://github.com/ecmwf-projects/c3s2-eqc-quality-assessment/issues/164).
## Quick start
Expand Down
2 changes: 1 addition & 1 deletion scripts/pre-build.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def get_disclaimer(readme: Path) -> str:
lines = readme.open()
disclaimer = ['<div class="alert alert-block alert-warning">']
for line in lines:
if line.startswith(r"> \[!WARNING\]"):
if line.startswith("> [!WARNING]"):
for line in lines:
if line.startswith(">"):
disclaimer.append(line.removeprefix(">").strip())
Expand Down
4 changes: 4 additions & 0 deletions scripts/validate-headings.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def validate_headers(path: Path) -> None:

title_count = 0
admonition_count = 0
admonition_is_note = False
headings_count = dict.fromkeys(HEADINGS, 0)
for cell in notebook.cells:
if cell["cell_type"] != "markdown":
Expand All @@ -32,6 +33,9 @@ def validate_headers(path: Path) -> None:
title_count += 1
elif line == f"```{{admonition}} {ADMONITION_TITLE}":
admonition_count += 1
elif admonition_count and not admonition_is_note:
admonition_is_note = line.startswith(":class: note")
assert admonition_is_note, f"{path=!s}: The admonition is not a note"

if not path.name.startswith("template"):
assert title_count, f"{path=!s}: The first line is not a title."
Expand Down

0 comments on commit 6fe570b

Please sign in to comment.