Conversation
|
Looks good. Yep type checking stuff is a good pattern I often forget about too |
|
Cool I'll clean this up |
97342c0 to
1b1f1c5
Compare
changelog
a9c37b5 to
7adcb7d
Compare
Codecov ReportBase: 95.83% // Head: 95.82% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #209 +/- ##
==========================================
- Coverage 95.83% 95.82% -0.02%
==========================================
Files 23 23
Lines 2090 2084 -6
Branches 371 370 -1
==========================================
- Hits 2003 1997 -6
Misses 69 69
Partials 18 18
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
|
@znicholls No major changes on clean up so I'll merge this and do a minor release unless I hear a scream |
|
Waiting for hgrecco/pint-pandas#145 to be resolved before a release |
|
|
||
| @patch("scmdata.plotting.has_matplotlib", False) | ||
| def test_no_matplotlib(scm_run): | ||
| def hide_import(import_name): |
Can you tell what pint has changed and why everything has now exploded? |
From a look at the changelog there was a refactor into "Facets" (hgrecco/pint#1466). I haven't dived into this. It broke something in primap related to its unit registry so we might have to check openscm_units (hgrecco/pint#1631) |
|
MIght be better to pin to <0.2 for the next release and then loosen once we do some testing |
|
Also works
…On Wed, Oct 26, 2022 at 12:02 PM Jared Lewis ***@***.***> wrote:
MIght be better to pin to <0.2 for the next release and then loosen once
we do some testing
—
Reply to this email directly, view it on GitHub
<#209 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFUH5G2A6TKNWEGY2ZZJVYLWFB7I7ANCNFSM6AAAAAARMWMUWY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
This is a hotfix until pint_pandas releases a new version
8f1936f to
e6f9ff8
Compare
Pull request
Please confirm that this pull request has done the following:
CHANGELOG.rstadded@znicholls Do you have any strong feelings against lazy importing the plotting libraries? They add >1s of import time which is very obvious when running small python scripts without any plotting. This in combination with #208 reduces
scmdata's import time to ~300ms down from >2s.This pattern is used in other libraries to avoid always importing matplotlib.pyplot (https://github.com/pydata/xarray/blob/7379923de756a2bcc59044d548f8ab7a68b91d4e/xarray/plot/dataarray_plot.py#L979).
FYI: There is an interesting pattern to allow importing units for type checking only by optionally importing if
typing.TYPE_CHECKINGisTruehttps://github.com/pydata/xarray/blob/7379923de756a2bcc59044d548f8ab7a68b91d4e/xarray/plot/dataarray_plot.py#L979