Skip to content

Fix parameter name and return type in eleven fix_metadata docstrings - #3189

Open
karpovantonme wants to merge 1 commit into
ESMValGroup:mainfrom
karpovantonme:docs/fix-metadata-docstrings
Open

Fix parameter name and return type in eleven fix_metadata docstrings#3189
karpovantonme wants to merge 1 commit into
ESMValGroup:mainfrom
karpovantonme:docs/fix-metadata-docstrings

Conversation

@karpovantonme

@karpovantonme karpovantonme commented Aug 5, 2026

Copy link
Copy Markdown

Description

Eleven overrides of Fix.fix_metadata document their argument as cube, but the method takes cubes. Nine of those same docstrings promise an iris.cube.Cube back while the code returns a CubeList.

The rest of the package already gets this right. The base class in esmvalcore/cmor/_fixes/fix.py writes cubes, and so does every other override that documents the argument at all. In gfdl_esm2g.py and noresm1_me.py both spellings live in the same file, so the correct version is sitting a few lines above the wrong one.

Worth saying what this does not do. These modules are not listed in doc/api, so nothing changes on readthedocs. What changes is the source people read: doc/develop/fixing_data.rst asks contributors to write their own dataset fixes, and the natural way to start one is to copy the nearest existing fix.

Docstrings only, no code path touched. In the same files fix_data(self, cube) documents cube: iris.cube.Cube and that one is correct, so I left it alone.

One thing to flag: the guidelines ask for a few files per pull request and this is seven. It is the same one-line change in each and there is no code in it, but I can split it per dataset if that reads better for review.

Link to documentation: https://docs.esmvaltool.org/projects/ESMValCore/en/latest/develop/fixing_data.html


Checklist

@CLAassistant

CLAassistant commented Aug 5, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Eleven overrides of Fix.fix_metadata document their argument as 'cube'
while the method takes 'cubes', and nine of them promise to return an
iris.cube.Cube while they return a CubeList.

The rest of the package already does this correctly: the base class in
esmvalcore/cmor/_fixes/fix.py and the other overrides use 'cubes' and
iris.cube.CubeList. In gfdl_esm2g.py and noresm1_me.py the correct and
the incorrect form sit in the same file.
@karpovantonme
karpovantonme force-pushed the docs/fix-metadata-docstrings branch from 97d9095 to 8b73c49 Compare August 5, 2026 12:41

@valeriupredoi valeriupredoi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this PR is generated by an AI agent/bot (that has links to Telegram, no less), at the moment we do not accept such contributions. Until further decisions, I am putting a hold on this PR.

@karpovantonme

Copy link
Copy Markdown
Author

Understood, your call

Two small corrections for the record. I checked your contributing guide before opening this, and there is no policy on AI assistance in it. The CLA is signed and all checks are green. And I have no Telegram anywhere on my profile or in this PR, so that part may have come from somewhere else.

The change itself is eleven docstrings naming a parameter the method does not take, with the base class right there doing it correctly. If the project would rather wait for the policy to land, I will close it myself and stay out of the repository.

Either way, thanks for the time 🙏🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants