[ ] This PR addresses an already opened issue (for bug fixes / features)
This PR fixes #xyz
[ ] (If applicable) Documentation has been added / updated (for bug fixes / features).
[ ] (If applicable) Tests have been added.
[x] This PR does not seem to break the templates.
[x] HISTORY.rst has been updated (with summary of main changes).
[x] Link to issue (:issue:number) and pull request (:pull:number) has been added.
What kind of change does this PR introduce?
In #215, I used pd.Series.str.match to find models in the global tas dataset. However, match will return a match even if only the beginning of the string matches the pattern.
For example: looking for "EC-Earth3" would match for "EC-Earth3-CC". This resulted in some models getting multiple matches even though an exact match existed.
This PR switches to fullmatch which ensures the full string matches, which I'm pretty sure is the expected behaviour when regex is not used. If needed, the previous behaviour can be obtained by adding "." to the query (like "EC-Earth3.").
Does this PR introduce a breaking change?
Yes and no. I think the new behaviour is the proper one.
Pull Request Checklist:
number
) and pull request (:pull:number
) has been added.What kind of change does this PR introduce?
In #215, I used
pd.Series.str.match
to find models in the global tas dataset. However,match
will return a match even if only the beginning of the string matches the pattern.For example: looking for "EC-Earth3" would match for "EC-Earth3-CC". This resulted in some models getting multiple matches even though an exact match existed.
This PR switches to
fullmatch
which ensures the full string matches, which I'm pretty sure is the expected behaviour when regex is not used. If needed, the previous behaviour can be obtained by adding "." to the query (like "EC-Earth3.").Does this PR introduce a breaking change?
Yes and no. I think the new behaviour is the proper one.