Replies: 1 comment
|
Even if we decide not to handle these configuration options inside |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Setting
iris.FUTURE.date_microseconds = True, as described in https://scitools-iris.readthedocs.io/en/stable/whatsnew/3.11.html#v3-11-1-19-dec-2024, would use this change before it became compulsory as well as suppress the logging related to this upcoming change.However,
metoppv/improveris primarily a repository of post‑processing applications. The import of iris is typically deferred until a specific application module is loaded. Users assemble workflows from these applications in a broader context and may also develop and use project‑specific applications outside ofmetoppv/improver. As a result, it is difficult to predict where and when iris will be imported, and therefore when this global future toggle would actually take effect. Users would need to know to import improver before any of their own code imports iris, or otherwise set the future toggle themselves. This is precisely why these FUTURE flags are intended to be controlled by users rather than set within libraries.For this reason, setting the global
iris.FUTURE.date_microsecondsflag within improver (at least as a global flag) itself isn't necessarily the only/best option. At best,metoppv/improvercould use a context‑manager approach to enable the future behaviour within individual applications. Even then, the more fundamental change could be to ensure that improver can accommodate differences in timestamp precision during testing, both with and without microsecond support iniris-cf_units.Possible handling:
iris.FUTURE.date_microsecondsonmetoppv/improvertests, identifying which tests fail. Ideally, improver should be robust to precision changes of this kind—perhaps it already is.All reactions