Skip to content

refactor: simplify MatchingFieldsFilter by removing matching decorator#289

Merged
aaron-hopkinson merged 3 commits into
mainfrom
refactor/matching
Apr 29, 2026
Merged

refactor: simplify MatchingFieldsFilter by removing matching decorator#289
aaron-hopkinson merged 3 commits into
mainfrom
refactor/matching

Conversation

@aaron-hopkinson
Copy link
Copy Markdown
Contributor

@aaron-hopkinson aaron-hopkinson commented Apr 24, 2026

Description

Simplifies the MatchingFieldsFilter by removing the matching decorator and instead using a simple dataclass as a class variable. Should replicate existing behaviour, except errors/warnings are now issued at initialisation time rather than filter use time.

As a contributor to the Anemoi framework, please ensure that your changes include unit tests, updates to any affected dependencies and documentation, and have been tested in a parallel setting (i.e., with multiple GPUs). As a reviewer, you are also responsible for verifying these aspects and requesting changes if they are not adequately addressed. For guidelines about those please refer to https://anemoi.readthedocs.io/en/latest/

By opening this pull request, I affirm that all authors agree to the Contributor License Agreement.


📚 Documentation preview 📚: https://anemoi-transform--289.org.readthedocs.build/en/289/

Comment thread src/anemoi/transform/filters/fields/matching.py
Comment thread src/anemoi/transform/filters/fields/matching.py
Comment thread src/anemoi/transform/filters/fields/matching.py
Comment thread src/anemoi/transform/filters/fields/matching.py
Comment thread src/anemoi/transform/filters/fields/matching.py
Comment thread src/anemoi/transform/filters/fields/matching.py
Comment thread src/anemoi/transform/filters/fields/matching.py
Copy link
Copy Markdown
Contributor

@anaprietonem anaprietonem left a comment

Choose a reason for hiding this comment

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

Nice work Aaron, I like this new implementation. Left some comments & questions. Guess we'd also need to update the docs with this PR?

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Apr 28, 2026
@anaprietonem anaprietonem self-requested a review April 29, 2026 07:27
Copy link
Copy Markdown
Contributor

@anaprietonem anaprietonem left a comment

Choose a reason for hiding this comment

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

Thanks Aaron for addressing my comments, LGTM!

@github-project-automation github-project-automation Bot moved this from To be triaged to For merging in Anemoi-dev Apr 29, 2026
@aaron-hopkinson aaron-hopkinson merged commit b5f0656 into main Apr 29, 2026
72 checks passed
@github-project-automation github-project-automation Bot moved this from For merging to Done in Anemoi-dev Apr 29, 2026
@aaron-hopkinson aaron-hopkinson deleted the refactor/matching branch April 29, 2026 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ATS Approval not needed documentation Improvements or additions to documentation tests

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants