diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 9b7c5e8330..c37ece8c23 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -10,3 +10,7 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: debug-statements
+ - repo: https://github.com/crate-ci/typos
+ rev: v1.23.1
+ hooks:
+ - id: typos
diff --git a/.typos.toml b/.typos.toml
new file mode 100644
index 0000000000..28965810fa
--- /dev/null
+++ b/.typos.toml
@@ -0,0 +1,9 @@
+[default.extend-words]
+ba = "ba"
+strat = "strat"
+whe = "whe"
+mis = "mis"
+hassel = "hassel"
+Hassel = "Hassel"
+noy = "noy"
+pn = "pn"
diff --git a/README.md b/README.md
index 4448e528d2..1a720e66bc 100644
--- a/README.md
+++ b/README.md
@@ -14,14 +14,14 @@ your updates will be visible at `https://protocol.isimip.org`.
As a rule, the sector-specific text should be kept to a minimum and cover
as much structure as possible by machine-readable code under [definitions](definitions/).
-The React JavaScript app is build in a seperate step which are described under [app/README.md]([app/README.md]).
+The React JavaScript app is build in a separate step which are described under [app/README.md]([app/README.md]).
Setup
-----
Building the protocol needs git and a recent Python version (> 3.6). The installation of Python (and its developing packages), however differs from operating system to operating system. Instructions can be found [here](https://github.com/ISI-MIP/isimip-qc/blob/main/README.md#prerequisites).
-If you work with different Python applications, we recommend to create a virtual enviroment for the protocol.
+If you work with different Python applications, we recommend to create a virtual environment for the protocol.
```bash
# setup venv on Linux/macOS/Windows WSL
diff --git a/app/README.md b/app/README.md
index cb5c5de008..2102481b71 100644
--- a/app/README.md
+++ b/app/README.md
@@ -28,4 +28,4 @@ In order to rebuild the app or work on the code, the following setup needs to be
5. Run `python3 build/assets.py --link` or `make dev` in the main protocol directory to link the assets instead of copying them.
-6. Before commiting any changes, run `npm run build:prod` or just `make` to create a production version of the app, which then will be part of the repository.
+6. Before committing any changes, run `npm run build:prod` or just `make` to create a production version of the app, which then will be part of the repository.
diff --git a/app/src/app.js b/app/src/app.js
index 2162d5d407..2f9e5d0f18 100644
--- a/app/src/app.js
+++ b/app/src/app.js
@@ -139,7 +139,7 @@ setTimeout(() => {
})
setTimeout(() => {
- // scroll to anchor or position once everthing is settled
+ // scroll to anchor or position once everything is settled
if (anchor) {
anchor.scrollIntoView()
}
diff --git a/app/src/components/badges/Sectors.js b/app/src/components/badges/Sectors.js
index a8a8fbd2ec..ead94a4f27 100644
--- a/app/src/components/badges/Sectors.js
+++ b/app/src/components/badges/Sectors.js
@@ -7,7 +7,7 @@ const Sectors = ({ config, sectors }) => {
if (sectors === undefined) {
return all sectors
} else if (sectors === []) {
- // by setting `sectors: []` the display of sectors can be ommited
+ // by setting `sectors: []` the display of sectors can be omitted
return null
} else if (sectors === null) {
// for the title just display the configured sectors
@@ -17,7 +17,7 @@ const Sectors = ({ config, sectors }) => {
return all sectors
}
} else {
- // some sectors are configured -> hightlight selected sectors
+ // some sectors are configured -> highlight selected sectors
if (config.sectors !== undefined && config.sectors.length > 0) {
// at least one sector is selected
return sectors.map((sector, index) => {
diff --git a/build/protocol.py b/build/protocol.py
index 0a749133ac..244d4bd646 100644
--- a/build/protocol.py
+++ b/build/protocol.py
@@ -63,8 +63,8 @@ def main():
protocol_path = Path('protocol') / '00.base.md'
template_string = protocol_path.read_text()
- enviroment = Environment(loader=FileSystemLoader(['bibliography', 'protocol', 'templates']))
- template = enviroment.from_string(template_string)
+ environment = Environment(loader=FileSystemLoader(['bibliography', 'protocol', 'templates']))
+ template = environment.from_string(template_string)
md = template.render(commit_url=commit_url, commit_hash=commit_hash, commit_date=commit_date)
html = markdown(md, extensions=[
@@ -84,10 +84,10 @@ def main():
template_path = Path('templates') / 'layout.html'
output_path = Path('output') / 'index.html'
output_path.parent.mkdir(parents=True, exist_ok=True)
- enviroment = Environment(loader=FileSystemLoader(['templates']))
+ environment = Environment(loader=FileSystemLoader(['templates']))
with open(template_path, encoding='utf-8') as f:
- template = enviroment.from_string(f.read())
+ template = environment.from_string(f.read())
with open(output_path, 'w', encoding='utf-8') as f:
f.write(template.render(html=html, definitions=json.dumps(definitions, indent=2), patterns=json.dumps(patterns, indent=2)))
diff --git a/definitions/climate_variable/lightning.yaml b/definitions/climate_variable/lightning.yaml
index 7465db44ba..349b354213 100644
--- a/definitions/climate_variable/lightning.yaml
+++ b/definitions/climate_variable/lightning.yaml
@@ -23,7 +23,7 @@
path: ISIMIP3b/InputData/climate/lightning/lightning_ukesm1-0-ll__global_monthly_2010_2100.nc
comment: >-
Source: [Kaplan, Jed O., et al. 2023](https://doi.org/10.5281/zenodo.7511843).
- This is the input data for the `varlightning` sensitivity experiments. Seperate
+ This is the input data for the `varlightning` sensitivity experiments. Separate
datasets are available for ssp126, ssp370, and ssp585. Please note, as this dataset
is produced using UKESM output, modelers should only use this data together with
UKESM climate forcing.
diff --git a/definitions/geo_dataset.yaml b/definitions/geo_dataset.yaml
index fd2e3e5ee1..e00a0b94ed 100644
--- a/definitions/geo_dataset.yaml
+++ b/definitions/geo_dataset.yaml
@@ -508,7 +508,7 @@
- specifier: lake_elevation
specifier_file: elevation
- title: Lake Heigth
+ title: Lake Height
group: lakes
resolution: 0.5° grid
path:
diff --git a/definitions/product.yaml b/definitions/product.yaml
index 583ea55253..f8e5a3f161 100644
--- a/definitions/product.yaml
+++ b/definitions/product.yaml
@@ -8,7 +8,7 @@
title: Secondary Input Data
description: >-
Data that have been derived from or are related to the input data, but not described
- in the simulation protocol (e.g. with a differnt spatial or temporal resolution).
+ in the simulation protocol (e.g. with a different spatial or temporal resolution).
- specifier: OutputData
title: Output Data
diff --git a/definitions/variable/peat.yaml b/definitions/variable/peat.yaml
index b2e2a2e596..83679e5d95 100644
--- a/definitions/variable/peat.yaml
+++ b/definitions/variable/peat.yaml
@@ -89,7 +89,7 @@
- null
-
units: m
- frequency: daily if possible, else montly
+ frequency: daily if possible, else monthly
resolution: 0.5° grid
comment: >-
Water table level relative to the ground surface. Note that a negative value should
@@ -192,7 +192,7 @@
- null
-
units: '1'
- frequency: daily if possible, else montly
+ frequency: daily if possible, else monthly
resolution: 0.5° grid
comment: >-
Grid fraction that is flooded, i.e. where the water table is above ground surface.
diff --git a/protocol/02.experiments.md b/protocol/02.experiments.md
index 505e366303..10dacd0b48 100644
--- a/protocol/02.experiments.md
+++ b/protocol/02.experiments.md
@@ -2,7 +2,7 @@
In Table 2.1, we describe the different experiments for ISIMIP3. Each default experiment is defined by its **climate related forcing (CRF)** and the assumptions regarding **direct human forcing (DHF)**. The associated specifications all have a label such as `obsclim` or `histsoc` that are provided in Table 2.1 and further specified in Tables 2.2 and 2.3. These specifiers are used in the file names of the corresponding input files and should also be used for the names of the output files (see report model results [report model results](#5-reporting-model-results)). Sensitivity experiments are described as deviation from a default experiment and represented by labels that are used as a third specifier of the experiments. Their specific meanings are defined in Table 2.4.
-Please note that the experiments are different for ISIMIP3a and ISIMIP3b and some are sector specific. You can use the menu on the top-right of the page to select the sumulation round and sectors you are interested in.
+Please note that the experiments are different for ISIMIP3a and ISIMIP3b and some are sector specific. You can use the menu on the top-right of the page to select the simulation round and sectors you are interested in.
::: table identifier=experiments caption="Table 2.1: Experiment set-up. Each experiment is specified by the climate related forcing (top row) and the direct human forcing (bottom row). Sensitivity labels indicate deviations from the default settings. Experiments are colored by group: group I (grey), group II (red) and group III (blue). The subtitles in the first row indicate how the experiment is defined in filenames."
diff --git a/protocol/04.output.md b/protocol/04.output.md
index d0c940804b..85003e615f 100644
--- a/protocol/04.output.md
+++ b/protocol/04.output.md
@@ -83,7 +83,7 @@ Many variables are defined per area (unit m-2). Typically, and unless otherwise
#### Information about soil organic carbon pools of different turnover times
- Some variables can be provided seperately by soil organic carbon pools of different turnover times, if your model simulates those. This is done using the `-` extension. Please indicate them as `-fast`, `-slow`, and `-passive` and describe your definition of the turnover times in your model description. The extension is used in addition to the extension expressing the Plant Functional Type (PFT) and needs to put before it.
+ Some variables can be provided separately by soil organic carbon pools of different turnover times, if your model simulates those. This is done using the `-` extension. Please indicate them as `-fast`, `-slow`, and `-passive` and describe your definition of the turnover times in your model description. The extension is used in addition to the extension expressing the Plant Functional Type (PFT) and needs to put before it.
::: show sector=peat
diff --git a/requirements.txt b/requirements.txt
index a05c7ff359..5aae2e0275 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -5,3 +5,4 @@ jsonschema
markdown-customblocks
pre-commit
PyYAML
+typos