Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug that returned incorrect results when an invalid identifer is provided to cf.Field.cell_methods #300

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

davidhassell
Copy link
Contributor

Fixes #299

@davidhassell davidhassell added the bug Something isn't working label May 30, 2024
@davidhassell davidhassell added this to the Next release milestone May 30, 2024
Copy link
Member

@sadielbartholomew sadielbartholomew left a comment

Choose a reason for hiding this comment

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

One typo in the changelog and formatting issue, but otherwise perfect with sufficient new testing. +1 for the new examples for the docs. Please merge once the minor comments are addressed.

(FYI as part of testing, in case of logic re-use and because bugs can, I did a quick check that other multiple construct getting methods don't display the same bug, e.g. f.coordinate_references and f.domain_axes('bad'), but all looks good.)


* Fix bug that returned incorrect results when an invalid identifer is
provided to `cf.Field.cell_methods`
(https://github.com/NCAS-CMS/cfdm/issues/2699)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
(https://github.com/NCAS-CMS/cfdm/issues/2699)
(https://github.com/NCAS-CMS/cfdm/issues/299)

(That would be a worrying amount of issues to have registered!)

>>> print(f.cell_methods())
Constructs:
{'cellmethod0': <CellMethod: domainaxis1: domainaxis2: mean where land (interval: 0.1 degrees)>,
'cellmethod1': <CellMethod: domainaxis3: maximum>}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
'cellmethod1': <CellMethod: domainaxis3: maximum>}
'cellmethod1': <CellMethod: domainaxis3: maximum>}

(for the accurate, and more readable, alignment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cf.Field.cell_methods returns incorrect results when an invalid identifer is provided
2 participants