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 custom formatters needing registry #2011

Merged
merged 2 commits into from
Jun 13, 2024

Conversation

aulemahal
Copy link
Contributor

Fixes #2009 according to the suggestions in the thread. I also added a note to the doc to describe the arguments passed to the custom formatters. And added a line to the test.

Copy link

codspeed-hq bot commented Jun 11, 2024

CodSpeed Performance Report

Merging #2011 will not alter performance

Comparing Ouranosinc:fix-2009 (4c1c00f) with master (a472c26)

Summary

✅ 437 untouched benchmarks

@hgrecco
Copy link
Owner

hgrecco commented Jun 12, 2024

@aulemahal Have you tested against cf-xarray? Does it fix the issue?

@aulemahal
Copy link
Contributor Author

Yes it does!

from cf_xarray import units

q = units.units.Quantity(1, 'm')

f"{q.units:cf}"

fails with the current master and works with this branch.

@hgrecco
Copy link
Owner

hgrecco commented Jun 12, 2024

Then I think we can merge it and release 0.24.1 What do you think @andrewgsavage ?

@andrewgsavage andrewgsavage merged commit 32ccd20 into hgrecco:master Jun 13, 2024
43 checks passed
@andrewgsavage
Copy link
Collaborator

Yes , once I get the formatting of dimensionless to match previous behaviour

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

What does registry=None mean in custom formatter ?
3 participants