From 786520ca5c623c44452c0629cd798aa2fc884333 Mon Sep 17 00:00:00 2001
From: ludwiglierhammer <73587842+ludwiglierhammer@users.noreply.github.com>
Date: Mon, 24 Aug 2026 03:00:33 +0000
Subject: [PATCH 1/3] chore: accept new Cruft update
---
.cruft.json | 4 +-
.github/requirements_ci.txt | 2 +-
.github/workflows/label.yml.rej | 10 ++
.pre-commit-config.yaml | 2 +-
.pre-commit-config.yaml.rej | 40 ++++++
CONTRIBUTING.rst | 4 +-
CONTRIBUTING.rst.rej | 214 ++++++++++++++++++++++++++++++++
Makefile | 2 +-
README.rst.rej | 18 +++
pyproject.toml.rej | 85 +++++++++++++
tox.toml.rej | 9 ++
11 files changed, 383 insertions(+), 7 deletions(-)
create mode 100644 .github/workflows/label.yml.rej
create mode 100644 .pre-commit-config.yaml.rej
create mode 100644 CONTRIBUTING.rst.rej
create mode 100644 README.rst.rej
create mode 100644 pyproject.toml.rej
create mode 100644 tox.toml.rej
diff --git a/.cruft.json b/.cruft.json
index 1e67c133..7cdc9853 100755
--- a/.cruft.json
+++ b/.cruft.json
@@ -1,6 +1,6 @@
{
"template": "https://github.com/Ouranosinc/cookiecutter-pypackage.git",
- "commit": "ca71222b12478c5123bb4f1d973ccbec53b965eb",
+ "commit": "fb9ad7da9da9c2ac09187f9518a17e98727beeb5",
"checkout": null,
"context": {
"cookiecutter": {
@@ -35,7 +35,7 @@
".github/workflows/workflow-warning.yml"
],
"_template": "https://github.com/Ouranosinc/cookiecutter-pypackage.git",
- "_commit": "ca71222b12478c5123bb4f1d973ccbec53b965eb"
+ "_commit": "fb9ad7da9da9c2ac09187f9518a17e98727beeb5"
}
},
"directory": null
diff --git a/.github/requirements_ci.txt b/.github/requirements_ci.txt
index 13c3e7d3..2f3cadd5 100644
--- a/.github/requirements_ci.txt
+++ b/.github/requirements_ci.txt
@@ -1,5 +1,5 @@
#
-# This file is autogenerated by pip-compile with Python 3.10
+# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile --generate-hashes --output-file=.github/requirements_ci.txt .github/requirements_ci.in
diff --git a/.github/workflows/label.yml.rej b/.github/workflows/label.yml.rej
new file mode 100644
index 00000000..9e11273b
--- /dev/null
+++ b/.github/workflows/label.yml.rej
@@ -0,0 +1,10 @@
+diff a/.github/workflows/label.yml b/.github/workflows/label.yml (rejected hunks)
+@@ -3,7 +3,7 @@
+ #
+ # To use this workflow, you will need to set up a .github/labeler.yml
+ # file with configuration. For more information, see:
+-# https://github.com/actions/labeler/blob/master/README.md
++# https://github.com/actions/labeler/blob/main/README.md
+
+ name: Labeler
+ on:
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index e9ea3c7a..13131825 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -47,7 +47,7 @@ repos:
- id: rst-inline-touching-normal
- id: text-unicode-replacement-char
- repo: https://github.com/astral-sh/ruff-pre-commit
- rev: v0.15.9
+ rev: v0.16.3
hooks:
- id: ruff-check
args: [ '--fix', '--show-fixes' ]
diff --git a/.pre-commit-config.yaml.rej b/.pre-commit-config.yaml.rej
new file mode 100644
index 00000000..64410f84
--- /dev/null
+++ b/.pre-commit-config.yaml.rej
@@ -0,0 +1,40 @@
+diff a/.pre-commit-config.yaml b/.pre-commit-config.yaml (rejected hunks)
+@@ -62,32 +62,32 @@ repos:
+ hooks:
+ - id: vulture
+ - repo: https://github.com/pre-commit/mirrors-mypy
+- rev: v1.18.2
++ rev: v2.3.0
+ hooks:
+ - id: mypy
+ - repo: https://github.com/codespell-project/codespell
+- rev: v2.4.2
++ rev: v2.4.3
+ hooks:
+ - id: codespell
+ additional_dependencies: [ 'tomli' ]
+ args: [ '--toml=pyproject.toml' ]
+ - repo: https://github.com/numpy/numpydoc
+- rev: v1.10.0
++ rev: v1.11.0rc0
+ hooks:
+ - id: numpydoc-validation
+ exclude: ^docs/|^tests/
+ - repo: https://github.com/python-jsonschema/check-jsonschema
+- rev: 0.37.1
++ rev: 0.38.0
+ hooks:
+ - id: check-github-workflows
+ - id: check-readthedocs
+ - repo: https://github.com/woodruffw/zizmor-pre-commit
+- rev: v1.24.1
++ rev: v1.29.0
+ hooks:
+ - id: zizmor
+ args: [ '--config=.zizmor.yml' ]
+ - repo: https://github.com/gitleaks/gitleaks
+- rev: v8.30.0
++ rev: v8.30.1
+ hooks:
+ - id: gitleaks
+ - repo: meta
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
index 2e283309..7926e8c0 100644
--- a/CONTRIBUTING.rst
+++ b/CONTRIBUTING.rst
@@ -193,9 +193,9 @@ Before you submit a pull request, check that it meets these guidelines:
#. If you haven't already, ensure that you have read and agreed to the `Developer Certificate of Origin (DCO) `_, and that you have signed off on your commits using:
-.. code-block:: bash
+ .. code-block:: console
- git commit -s/--signoff
+ $ git commit -s/--signoff
This will add a `Signed-off-by:` line to your commit message, which indicates that you agree to the DCO.
diff --git a/CONTRIBUTING.rst.rej b/CONTRIBUTING.rst.rej
new file mode 100644
index 00000000..c8d08d3a
--- /dev/null
+++ b/CONTRIBUTING.rst.rej
@@ -0,0 +1,214 @@
+diff a/CONTRIBUTING.rst b/CONTRIBUTING.rst (rejected hunks)
+@@ -57,114 +57,114 @@ Ready to contribute? Here's how to set up ``Common Data Model reader and mapper`
+
+ #. First, clone the ``Common Data Model reader and mapper`` repo locally.
+
+- * If you are not a ``Common Data Model reader and mapper`` collaborator, first fork the ``Common Data Model reader and mapper`` repo on GitHub, then clone your fork locally.
++ * If you are not a ``Common Data Model reader and mapper`` collaborator, first fork the ``Common Data Model reader and mapper`` repo on GitHub, then clone your fork locally.
+
+- .. code-block:: console
++ .. code-block:: console
+
+- git clone git@github.com:your_name_here/Common-Data-Model-reader-and-mapper.git
++ $ git clone git@github.com:your_name_here/Common-Data-Model-reader-and-mapper.git
+
+- * If you are a ``Common Data Model reader and mapper`` collaborator, clone the ``Common Data Model reader and mapper`` repo directly.
++ * If you are a ``Common Data Model reader and mapper`` collaborator, clone the ``Common Data Model reader and mapper`` repo directly.
+
+- .. code-block:: console
++ .. code-block:: console
+
+- git clone git@github.com:glamod/Common-Data-Model-reader-and-mapper.git
++ $ git clone git@github.com:glamod/Common-Data-Model-reader-and-mapper.git
+
+ #. Install your local copy into a development environment. Using ``virtualenv`` (``virtualenvwrapper``), you can create a new development environment with:
+
+- .. code-block:: console
++ .. code-block:: console
+
+- python -m pip install virtualenvwrapper
+- mkvirtualenv cdm_reader_mapper
+- cd cdm_reader_mapper/
+- make dev
++ $ python -m pip install virtualenvwrapper
++ $ mkvirtualenv cdm_reader_mapper
++ $ cd cdm_reader_mapper/
++ $ make dev
+
+- If you are on Windows, replace the ``make dev`` command with the following:
++ If you are on Windows, replace the ``make dev`` command with the following:
+
+- .. code-block:: console
++ .. code-block:: console
+
+- python -m pip install --group dev
+- python -m pip install --editable .
+- prek install
++ $ python -m pip install --group dev
++ $ python -m pip install --editable .
++ $ prek install
+
+- This installs ``cdm_reader_mapper`` in an "editable" state, meaning that changes to the code are immediately seen by the environment. To ensure a consistent coding style, `make dev` also installs the ``pre-commit`` hooks to your local clone.
++ This installs ``cdm_reader_mapper`` in an "editable" state, meaning that changes to the code are immediately seen by the environment. To ensure a consistent coding style, `make dev` also installs the ``pre-commit`` hooks to your local clone.
+
+- On commit, ``prek`` will will run ``pre-commit`` checks that ensure code quality checks are passing, perform automatic fixes if possible, and warn of violations that require intervention. If your commit fails the checks initially, simply fix the errors, re-add the files, and re-commit.
++ On commit, ``prek`` will run ``pre-commit`` checks that ensure code quality checks are passing, perform automatic fixes if possible, and warn of violations that require intervention. If your commit fails the checks initially, simply fix the errors, re-add the files, and re-commit.
+
+- You can also run the hooks manually with:
++ You can also run the hooks manually with:
+
+- .. code-block:: console
++ .. code-block:: console
+
+- prek run -a
++ $ prek run -a
+
+- If you want to skip the ``pre-commit`` hooks temporarily, you can pass the `--no-verify` flag to `git commit`.
++ If you want to skip the ``pre-commit`` hooks temporarily, you can pass the `--no-verify` flag to `git commit`.
+
+ #. Create a branch for local development:
+
+- .. code-block:: console
++ .. code-block:: console
+
+- git checkout -b name-of-your-bugfix-or-feature
++ $ git checkout -b name-of-your-bugfix-or-feature
+
+- Now you can make your changes locally.
++ Now you can make your changes locally.
+
+ #. When you're done making changes, we **strongly** suggest running the tests in your environment or with the help of ``tox``:
+
+- .. code-block:: console
++ .. code-block:: console
+
+- make lint
+- python -m pytest
+- # Or, to run multiple build tests
+- python -m tox
++ $ make lint
++ $ python -m pytest
++ # Or, to run multiple build tests
++ $ python -m tox
+
+ #. Commit your changes and push your branch to GitHub:
+
+- .. code-block:: console
++ .. code-block:: console
+
+- git add .
+- git commit -s -m "Your detailed description of your changes."
+- git push origin name-of-your-bugfix-or-feature
++ $ git add .
++ $ git commit -s -m "Your detailed description of your changes."
++ $ git push origin name-of-your-bugfix-or-feature
+
+- If ``pre-commit`` hooks fail, try fixing the issues, re-staging the files to be committed, and re-committing your changes (or, if need be, you can skip them with `--no-verify` flag).
++ If ``pre-commit`` hooks fail, try fixing the issues, re-staging the files to be committed, and re-committing your changes (or, if need be, you can skip them with `--no-verify` flag).
+
+ #. Submit a `Pull Request `_ through the GitHub website.
+
+ #. When pushing your changes to your branch on GitHub, the documentation will automatically be tested to reflect the changes in your Pull Request. This build process can take several minutes at times. If you are actively making changes that affect the documentation and wish to save time, you can compile and test your changes beforehand locally with:
+
+- .. code-block:: console
++ .. code-block:: console
+
+- # To generate the html and open it in your browser
+- make docs
+- # To only generate the html
+- make autodoc
+- make -C docs html
+- # To simply test that the docs pass build checks
+- python -m tox -e docs
++ # To generate the html and open it in your browser
++ $ make docs
++ # To only generate the html
++ $ make autodoc
++ $ make -C docs html
++ # To simply test that the docs pass build checks
++ $ python -m tox -e docs
+
+ #. If changes to your branch are made on GitHub, you can update your local branch with:
+
+- .. code-block:: console
++ .. code-block:: console
+
+- git checkout name-of-your-bugfix-or-feature
+- git fetch
+- git pull origin name-of-your-bugfix-or-feature
++ $ git checkout name-of-your-bugfix-or-feature
++ $ git fetch
++ $ git pull origin name-of-your-bugfix-or-feature
+
+- If you have merge conflicts, you might need to replace `git pull` with `git merge` and resolve the conflicts manually.
+- Resolving conflicts from the command line can be tricky. If you are not comfortable with this, you can ignore the last command and instead use a GUI like PyCharm or Visual Studio Code to merge the remote changes and resolve the conflicts.
++ If you have merge conflicts, you might need to replace `git pull` with `git merge` and resolve the conflicts manually.
++ Resolving conflicts from the command line can be tricky. If you are not comfortable with this, you can ignore the last command and instead use a GUI like PyCharm or Visual Studio Code to merge the remote changes and resolve the conflicts.
+
+ #. Before merging, your Pull Request will need to be based on the `main` branch of the ``Common Data Model reader and mapper`` repository. If your branch is not up-to-date with the `main` branch, you can perform similar steps as above to update your branch:
+
+- .. code-block:: console
++ .. code-block:: console
+
+- git checkout name-of-your-bugfix-or-feature
+- git fetch
+- git pull origin main
++ $ git checkout name-of-your-bugfix-or-feature
++ $ git fetch
++ $ git pull origin main
+
+- See the previous step for more information on resolving conflicts.
++ See the previous step for more information on resolving conflicts.
+
+ #. Once your Pull Request has been accepted and merged to the `main` branch, several automated workflows will be triggered:
+
+- - The ``bump-version.yml`` workflow will automatically bump the patch version when pull requests are pushed to the `main` branch on GitHub. **It is not recommended to manually bump the version in your branch when merging (non-release) pull requests (this will cause the version to be bumped twice).**
+- - `ReadTheDocs` will automatically build the documentation and publish it to the `latest` branch of `cdm_reader_mapper` documentation website.
+- - If your branch is not a fork (i.e. you are a maintainer), your branch will be automatically deleted.
++ - The ``bump-version.yml`` workflow will automatically bump the patch version when pull requests are pushed to the `main` branch on GitHub. **It is not recommended to manually bump the version in your branch when merging (non-release) pull requests (this will cause the version to be bumped twice).**
++ - `ReadTheDocs` will automatically build the documentation and publish it to the `latest` branch of `cdm_reader_mapper` documentation website.
++ - If your branch is not a fork (i.e. you are a maintainer), your branch will be automatically deleted.
+
+ You will have contributed to ``cdm_reader_mapper``!
+
+@@ -265,13 +265,13 @@ To run a subset of tests:
+
+ .. code-block:: console
+
+- python -m pytest tests/test_cdm_reader_mapper.py
++ $ python -m pytest tests/test_cdm_reader_mapper.py
+
+ You can also directly call a specific test class or test function using:
+
+ .. code-block:: console
+
+- python -m pytest tests/test_cdm_reader_mapper.py::TestClassName::test_function_name
++ $ python -m pytest tests/test_cdm_reader_mapper.py::TestClassName::test_function_name
+
+ For more information on running tests, see the `pytest documentation `_.
+
+@@ -279,11 +279,11 @@ To run specific code style checks:
+
+ .. code-block:: console
+
+- python -m ruff check src/cdm_reader_mapper tests
+- python -m flake8 src/cdm_reader_mapper tests
+- validate-docstrings src/cdm_reader_mapper/**.py
++ $ python -m ruff check src/cdm_reader_mapper tests
++ $ python -m flake8 src/cdm_reader_mapper tests
++ $ python -m numpydoc lint src/cdm_reader_mapper/**.py
+
+-To get ``ruff``, ``flake8`` (with the ``flake8-rst-docstrings`` plugin), and ``numpydoc`` (for ``validate-docstrings``), simply install them with ``pip`` into your environment.
++To get ``ruff``, ``flake8`` (with the ``flake8-rst-docstrings`` plugin), and ``numpydoc``, simply install them with ``pip`` into your environment.
+
+ Translations
+ ------------
+@@ -292,7 +292,7 @@ If you would like to contribute to the French translation of the documentation,
+
+ .. code-block:: console
+
+- make initialize-translations
++ $ make initialize-translations
+
+ This will create or update the French translation files in the `docs/locales/fr/LC_MESSAGES` directory. You can then edit the `.po` files in this directory to provide translations for the documentation.
+
diff --git a/Makefile b/Makefile
index c1e5563c..fc60f6d0 100644
--- a/Makefile
+++ b/Makefile
@@ -70,7 +70,7 @@ lint: install-lint ## check style
python -m numpydoc lint src/cdm_reader_mapper/**.py
python -m vulture src/cdm_reader_mapper tests
codespell src/cdm_reader_mapper tests docs
- python -m deptry src
+ python -m deptry src/cdm_reader_mapper
python -m yamllint --config-file=.yamllint.yaml src/cdm_reader_mapper
test: install-test ## run tests quickly with the default Python
diff --git a/README.rst.rej b/README.rst.rej
new file mode 100644
index 00000000..a4e600b0
--- /dev/null
+++ b/README.rst.rej
@@ -0,0 +1,18 @@
+diff a/README.rst b/README.rst (rejected hunks)
+@@ -9,7 +9,7 @@ Common Data Model reader and mapper
+ +----------------------------+-----------------------------------------------------+
+ | Open Source | |license| |ossf-score| |
+ +----------------------------+-----------------------------------------------------+
+-| Coding Standards | |ruff| |prek| |pre-commit-ci| |
++| Coding Standards | |ruff| |prek| |pre-commit-ci| |zizmor| |
+ +----------------------------+-----------------------------------------------------+
+ | Development Status | |status| |build| |coveralls| |
+ +----------------------------+-----------------------------------------------------+
+@@ -80,3 +80,7 @@ This package was created with Cookiecutter_ and the `Ouranosinc/cookiecutter-pyp
+ .. |versions| image:: https://img.shields.io/pypi/pyversions/Common-Data-Model-reader-and-mapper.svg
+ :target: https://pypi.python.org/pypi/Common-Data-Model-reader-and-mapper
+ :alt: Supported Python Versions
++
++.. |zizmor| image:: https://img.shields.io/badge/%F0%9F%8C%88-zizmor-white?labelColor=white
++ :target: https://zizmor.sh/
++ :alt: zizmor
diff --git a/pyproject.toml.rej b/pyproject.toml.rej
new file mode 100644
index 00000000..24d8e4f2
--- /dev/null
+++ b/pyproject.toml.rej
@@ -0,0 +1,85 @@
+diff a/pyproject.toml b/pyproject.toml (rejected hunks)
+@@ -11,7 +11,7 @@ maintainers = [
+ {name = "Ludwig Lierhammer", email = "ludwig.lierhammer@dwd.de"}
+ ]
+ readme = {file = "README.rst", content-type = "text/x-rst"}
+-requires-python = ">=3.10.0"
++requires-python = ">=3.11.0"
+ keywords = ["Common Data Model reader and mapper"]
+ license = "Apache-2.0"
+ license-files = ["LICENSE"]
+@@ -22,7 +22,6 @@ classifiers = [
+ "Operating System :: OS Independent",
+ "Programming Language :: Python :: 3",
+ "Programming Language :: Python :: 3 :: Only",
+- "Programming Language :: Python :: 3.10",
+ "Programming Language :: Python :: 3.11",
+ "Programming Language :: Python :: 3.12",
+ "Programming Language :: Python :: 3.13",
+@@ -33,14 +32,13 @@ classifiers = [
+ dynamic = ["description", "version"]
+ dependencies = [
+ "click >=8.3.1"
+-
+ ]
+
+ [project.optional-dependencies]
+ extras = []
+
+ [project.scripts]
+-cdm_reader_mapper = "cdm_reader_mapper.cli:app"
++cdm_reader_mapper = "cdm_reader_mapper.cli:main"
+
+ [project.urls]
+ # "Homepage" = "https://Common-Data-Model-reader-and-mapper.readthedocs.io/"
+@@ -52,15 +50,15 @@ cdm_reader_mapper = "cdm_reader_mapper.cli:app"
+ [dependency-groups]
+ lint = [
+ # Linting tools
+- "codespell >=2.4.2",
++ "codespell >=2.4.3",
+ "deptry >=0.25.1",
+ "flake8 >=7.3.0",
+ "flake8-rst-docstrings >=0.4.0",
+- "mypy >=1.20.0",
++ "mypy >=2.3.0",
+ "numpydoc >=1.10.0",
+ "pylint >=4.0.4",
+- "ruff >=0.15.9",
+- "vulture >=2.14",
++ "ruff >=0.16.3",
++ "vulture >=2.16",
+ "yamllint >=1.38.0"
+ ]
+ test = [
+@@ -88,9 +86,11 @@ tox = [
+ ]
+ dev = [
+ # Development and testing tools
+- "bump-my-version >=1.3.0",
++ "bump-my-version >=1.5.1",
++ "flit >=3.12.0,<4.0",
++ "flit_core >=3.12.0,<4.0",
+ "pip >=26.0.1",
+- "prek >=0.3.0",
++ "prek >=0.4.0",
+ "watchdog >=6.0.0",
+ {include-group = "docs"},
+ {include-group = "lint"},
+@@ -170,6 +170,7 @@ values = [
+
+ [tool.codespell]
+ ignore-words-list = "astroid,socio-economic,thirdparty"
++skip = "docs/_build"
+
+ [tool.coverage.paths]
+ source = ["src/cdm_reader_mapper/", "*/site-packages/cdm_reader_mapper/"]
+@@ -223,7 +224,7 @@ exclude = [
+
+ [tool.mypy]
+ files = "."
+-python_version = "3.10"
++python_version = "3.11"
+ show_error_codes = true
+ strict = true
+ warn_no_return = true
diff --git a/tox.toml.rej b/tox.toml.rej
new file mode 100644
index 00000000..d086f89b
--- /dev/null
+++ b/tox.toml.rej
@@ -0,0 +1,9 @@
+diff a/tox.toml b/tox.toml (rejected hunks)
+@@ -46,7 +46,6 @@ commands_post = [
+ ]
+
+ [gh.python]
+-"3.10" = ["py3.10"]
+ "3.11" = ["py3.11"]
+ "3.12" = ["py3.12"]
+ "3.13" = ["py3.13"]
From 2bb8bf93b8cb42b8a869e3856134e858a627a9c3 Mon Sep 17 00:00:00 2001
From: "pre-commit-ci[bot]"
<66853113+pre-commit-ci[bot]@users.noreply.github.com>
Date: Mon, 24 Aug 2026 03:01:09 +0000
Subject: [PATCH 2/3] [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---
.github/workflows/label.yml.rej | 2 +-
CONTRIBUTING.rst.rej | 122 ++++++++++++++++----------------
pyproject.toml.rej | 14 ++--
tox.toml.rej | 2 +-
4 files changed, 70 insertions(+), 70 deletions(-)
diff --git a/.github/workflows/label.yml.rej b/.github/workflows/label.yml.rej
index 9e11273b..d2216f6b 100644
--- a/.github/workflows/label.yml.rej
+++ b/.github/workflows/label.yml.rej
@@ -5,6 +5,6 @@ diff a/.github/workflows/label.yml b/.github/workflows/label.yml (rejected hunks
# file with configuration. For more information, see:
-# https://github.com/actions/labeler/blob/master/README.md
+# https://github.com/actions/labeler/blob/main/README.md
-
+
name: Labeler
on:
diff --git a/CONTRIBUTING.rst.rej b/CONTRIBUTING.rst.rej
index c8d08d3a..094521f0 100644
--- a/CONTRIBUTING.rst.rej
+++ b/CONTRIBUTING.rst.rej
@@ -1,31 +1,31 @@
diff a/CONTRIBUTING.rst b/CONTRIBUTING.rst (rejected hunks)
@@ -57,114 +57,114 @@ Ready to contribute? Here's how to set up ``Common Data Model reader and mapper`
-
+
#. First, clone the ``Common Data Model reader and mapper`` repo locally.
-
+
- * If you are not a ``Common Data Model reader and mapper`` collaborator, first fork the ``Common Data Model reader and mapper`` repo on GitHub, then clone your fork locally.
+ * If you are not a ``Common Data Model reader and mapper`` collaborator, first fork the ``Common Data Model reader and mapper`` repo on GitHub, then clone your fork locally.
-
+
- .. code-block:: console
+ .. code-block:: console
-
+
- git clone git@github.com:your_name_here/Common-Data-Model-reader-and-mapper.git
+ $ git clone git@github.com:your_name_here/Common-Data-Model-reader-and-mapper.git
-
+
- * If you are a ``Common Data Model reader and mapper`` collaborator, clone the ``Common Data Model reader and mapper`` repo directly.
+ * If you are a ``Common Data Model reader and mapper`` collaborator, clone the ``Common Data Model reader and mapper`` repo directly.
-
+
- .. code-block:: console
+ .. code-block:: console
-
+
- git clone git@github.com:glamod/Common-Data-Model-reader-and-mapper.git
+ $ git clone git@github.com:glamod/Common-Data-Model-reader-and-mapper.git
-
+
#. Install your local copy into a development environment. Using ``virtualenv`` (``virtualenvwrapper``), you can create a new development environment with:
-
+
- .. code-block:: console
+ .. code-block:: console
-
+
- python -m pip install virtualenvwrapper
- mkvirtualenv cdm_reader_mapper
- cd cdm_reader_mapper/
@@ -34,54 +34,54 @@ diff a/CONTRIBUTING.rst b/CONTRIBUTING.rst (rejected hunks)
+ $ mkvirtualenv cdm_reader_mapper
+ $ cd cdm_reader_mapper/
+ $ make dev
-
+
- If you are on Windows, replace the ``make dev`` command with the following:
+ If you are on Windows, replace the ``make dev`` command with the following:
-
+
- .. code-block:: console
+ .. code-block:: console
-
+
- python -m pip install --group dev
- python -m pip install --editable .
- prek install
+ $ python -m pip install --group dev
+ $ python -m pip install --editable .
+ $ prek install
-
+
- This installs ``cdm_reader_mapper`` in an "editable" state, meaning that changes to the code are immediately seen by the environment. To ensure a consistent coding style, `make dev` also installs the ``pre-commit`` hooks to your local clone.
+ This installs ``cdm_reader_mapper`` in an "editable" state, meaning that changes to the code are immediately seen by the environment. To ensure a consistent coding style, `make dev` also installs the ``pre-commit`` hooks to your local clone.
-
+
- On commit, ``prek`` will will run ``pre-commit`` checks that ensure code quality checks are passing, perform automatic fixes if possible, and warn of violations that require intervention. If your commit fails the checks initially, simply fix the errors, re-add the files, and re-commit.
+ On commit, ``prek`` will run ``pre-commit`` checks that ensure code quality checks are passing, perform automatic fixes if possible, and warn of violations that require intervention. If your commit fails the checks initially, simply fix the errors, re-add the files, and re-commit.
-
+
- You can also run the hooks manually with:
+ You can also run the hooks manually with:
-
+
- .. code-block:: console
+ .. code-block:: console
-
+
- prek run -a
+ $ prek run -a
-
+
- If you want to skip the ``pre-commit`` hooks temporarily, you can pass the `--no-verify` flag to `git commit`.
+ If you want to skip the ``pre-commit`` hooks temporarily, you can pass the `--no-verify` flag to `git commit`.
-
+
#. Create a branch for local development:
-
+
- .. code-block:: console
+ .. code-block:: console
-
+
- git checkout -b name-of-your-bugfix-or-feature
+ $ git checkout -b name-of-your-bugfix-or-feature
-
+
- Now you can make your changes locally.
+ Now you can make your changes locally.
-
+
#. When you're done making changes, we **strongly** suggest running the tests in your environment or with the help of ``tox``:
-
+
- .. code-block:: console
+ .. code-block:: console
-
+
- make lint
- python -m pytest
- # Or, to run multiple build tests
@@ -90,29 +90,29 @@ diff a/CONTRIBUTING.rst b/CONTRIBUTING.rst (rejected hunks)
+ $ python -m pytest
+ # Or, to run multiple build tests
+ $ python -m tox
-
+
#. Commit your changes and push your branch to GitHub:
-
+
- .. code-block:: console
+ .. code-block:: console
-
+
- git add .
- git commit -s -m "Your detailed description of your changes."
- git push origin name-of-your-bugfix-or-feature
+ $ git add .
+ $ git commit -s -m "Your detailed description of your changes."
+ $ git push origin name-of-your-bugfix-or-feature
-
+
- If ``pre-commit`` hooks fail, try fixing the issues, re-staging the files to be committed, and re-committing your changes (or, if need be, you can skip them with `--no-verify` flag).
+ If ``pre-commit`` hooks fail, try fixing the issues, re-staging the files to be committed, and re-committing your changes (or, if need be, you can skip them with `--no-verify` flag).
-
+
#. Submit a `Pull Request `_ through the GitHub website.
-
+
#. When pushing your changes to your branch on GitHub, the documentation will automatically be tested to reflect the changes in your Pull Request. This build process can take several minutes at times. If you are actively making changes that affect the documentation and wish to save time, you can compile and test your changes beforehand locally with:
-
+
- .. code-block:: console
+ .. code-block:: console
-
+
- # To generate the html and open it in your browser
- make docs
- # To only generate the html
@@ -127,88 +127,88 @@ diff a/CONTRIBUTING.rst b/CONTRIBUTING.rst (rejected hunks)
+ $ make -C docs html
+ # To simply test that the docs pass build checks
+ $ python -m tox -e docs
-
+
#. If changes to your branch are made on GitHub, you can update your local branch with:
-
+
- .. code-block:: console
+ .. code-block:: console
-
+
- git checkout name-of-your-bugfix-or-feature
- git fetch
- git pull origin name-of-your-bugfix-or-feature
+ $ git checkout name-of-your-bugfix-or-feature
+ $ git fetch
+ $ git pull origin name-of-your-bugfix-or-feature
-
+
- If you have merge conflicts, you might need to replace `git pull` with `git merge` and resolve the conflicts manually.
- Resolving conflicts from the command line can be tricky. If you are not comfortable with this, you can ignore the last command and instead use a GUI like PyCharm or Visual Studio Code to merge the remote changes and resolve the conflicts.
+ If you have merge conflicts, you might need to replace `git pull` with `git merge` and resolve the conflicts manually.
+ Resolving conflicts from the command line can be tricky. If you are not comfortable with this, you can ignore the last command and instead use a GUI like PyCharm or Visual Studio Code to merge the remote changes and resolve the conflicts.
-
+
#. Before merging, your Pull Request will need to be based on the `main` branch of the ``Common Data Model reader and mapper`` repository. If your branch is not up-to-date with the `main` branch, you can perform similar steps as above to update your branch:
-
+
- .. code-block:: console
+ .. code-block:: console
-
+
- git checkout name-of-your-bugfix-or-feature
- git fetch
- git pull origin main
+ $ git checkout name-of-your-bugfix-or-feature
+ $ git fetch
+ $ git pull origin main
-
+
- See the previous step for more information on resolving conflicts.
+ See the previous step for more information on resolving conflicts.
-
+
#. Once your Pull Request has been accepted and merged to the `main` branch, several automated workflows will be triggered:
-
+
- - The ``bump-version.yml`` workflow will automatically bump the patch version when pull requests are pushed to the `main` branch on GitHub. **It is not recommended to manually bump the version in your branch when merging (non-release) pull requests (this will cause the version to be bumped twice).**
- - `ReadTheDocs` will automatically build the documentation and publish it to the `latest` branch of `cdm_reader_mapper` documentation website.
- - If your branch is not a fork (i.e. you are a maintainer), your branch will be automatically deleted.
+ - The ``bump-version.yml`` workflow will automatically bump the patch version when pull requests are pushed to the `main` branch on GitHub. **It is not recommended to manually bump the version in your branch when merging (non-release) pull requests (this will cause the version to be bumped twice).**
+ - `ReadTheDocs` will automatically build the documentation and publish it to the `latest` branch of `cdm_reader_mapper` documentation website.
+ - If your branch is not a fork (i.e. you are a maintainer), your branch will be automatically deleted.
-
+
You will have contributed to ``cdm_reader_mapper``!
-
+
@@ -265,13 +265,13 @@ To run a subset of tests:
-
+
.. code-block:: console
-
+
- python -m pytest tests/test_cdm_reader_mapper.py
+ $ python -m pytest tests/test_cdm_reader_mapper.py
-
+
You can also directly call a specific test class or test function using:
-
+
.. code-block:: console
-
+
- python -m pytest tests/test_cdm_reader_mapper.py::TestClassName::test_function_name
+ $ python -m pytest tests/test_cdm_reader_mapper.py::TestClassName::test_function_name
-
+
For more information on running tests, see the `pytest documentation `_.
-
+
@@ -279,11 +279,11 @@ To run specific code style checks:
-
+
.. code-block:: console
-
+
- python -m ruff check src/cdm_reader_mapper tests
- python -m flake8 src/cdm_reader_mapper tests
- validate-docstrings src/cdm_reader_mapper/**.py
+ $ python -m ruff check src/cdm_reader_mapper tests
+ $ python -m flake8 src/cdm_reader_mapper tests
+ $ python -m numpydoc lint src/cdm_reader_mapper/**.py
-
+
-To get ``ruff``, ``flake8`` (with the ``flake8-rst-docstrings`` plugin), and ``numpydoc`` (for ``validate-docstrings``), simply install them with ``pip`` into your environment.
+To get ``ruff``, ``flake8`` (with the ``flake8-rst-docstrings`` plugin), and ``numpydoc``, simply install them with ``pip`` into your environment.
-
+
Translations
------------
@@ -292,7 +292,7 @@ If you would like to contribute to the French translation of the documentation,
-
+
.. code-block:: console
-
+
- make initialize-translations
+ $ make initialize-translations
-
+
This will create or update the French translation files in the `docs/locales/fr/LC_MESSAGES` directory. You can then edit the `.po` files in this directory to provide translations for the documentation.
-
+
diff --git a/pyproject.toml.rej b/pyproject.toml.rej
index 24d8e4f2..e8f16289 100644
--- a/pyproject.toml.rej
+++ b/pyproject.toml.rej
@@ -20,16 +20,16 @@ diff a/pyproject.toml b/pyproject.toml (rejected hunks)
dynamic = ["description", "version"]
dependencies = [
"click >=8.3.1"
--
+-
]
-
+
[project.optional-dependencies]
extras = []
-
+
[project.scripts]
-cdm_reader_mapper = "cdm_reader_mapper.cli:app"
+cdm_reader_mapper = "cdm_reader_mapper.cli:main"
-
+
[project.urls]
# "Homepage" = "https://Common-Data-Model-reader-and-mapper.readthedocs.io/"
@@ -52,15 +50,15 @@ cdm_reader_mapper = "cdm_reader_mapper.cli:app"
@@ -67,15 +67,15 @@ diff a/pyproject.toml b/pyproject.toml (rejected hunks)
{include-group = "docs"},
{include-group = "lint"},
@@ -170,6 +170,7 @@ values = [
-
+
[tool.codespell]
ignore-words-list = "astroid,socio-economic,thirdparty"
+skip = "docs/_build"
-
+
[tool.coverage.paths]
source = ["src/cdm_reader_mapper/", "*/site-packages/cdm_reader_mapper/"]
@@ -223,7 +224,7 @@ exclude = [
-
+
[tool.mypy]
files = "."
-python_version = "3.10"
diff --git a/tox.toml.rej b/tox.toml.rej
index d086f89b..a9761730 100644
--- a/tox.toml.rej
+++ b/tox.toml.rej
@@ -1,7 +1,7 @@
diff a/tox.toml b/tox.toml (rejected hunks)
@@ -46,7 +46,6 @@ commands_post = [
]
-
+
[gh.python]
-"3.10" = ["py3.10"]
"3.11" = ["py3.11"]
From 623910349f37ea4ad57ef512003bd9be57285681 Mon Sep 17 00:00:00 2001
From: "pre-commit-ci[bot]"
<66853113+pre-commit-ci[bot]@users.noreply.github.com>
Date: Mon, 24 Aug 2026 13:19:05 +0000
Subject: [PATCH 3/3] [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---
CONTRIBUTING.rst.rej | 1 -
1 file changed, 1 deletion(-)
diff --git a/CONTRIBUTING.rst.rej b/CONTRIBUTING.rst.rej
index 094521f0..a6a25033 100644
--- a/CONTRIBUTING.rst.rej
+++ b/CONTRIBUTING.rst.rej
@@ -211,4 +211,3 @@ diff a/CONTRIBUTING.rst b/CONTRIBUTING.rst (rejected hunks)
+ $ make initialize-translations
This will create or update the French translation files in the `docs/locales/fr/LC_MESSAGES` directory. You can then edit the `.po` files in this directory to provide translations for the documentation.
-