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 dask2 proxies #190

Merged
merged 5 commits into from
Feb 24, 2020
Merged

Fix dask2 proxies #190

merged 5 commits into from
Feb 24, 2020

Conversation

pp-mo
Copy link
Member

@pp-mo pp-mo commented Feb 19, 2020

Change that parallels SciTools/iris#3659

NOTE:
This contains a temporary copy of the key Iris routine that enables this fix.
This can be removed when Iris 2.4 is out.
Not clear if we should merge this as-is, or wait for that ?

@@ -25,6 +25,73 @@
import iris.coord_systems as coord_systems
from iris.exceptions import TranslationError, NotYetImplementedError

try:
from iris.util import _array_slice_ifempty
Copy link
Member

Choose a reason for hiding this comment

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

I'm pretty uncomfortable about this using a private function from iris.

I don't have a better suggestion, but I do think we seriously need to consider how we will manage this sort of thing, as we will encounter this problem more and more as we try to break iris up

Copy link
Member Author

@pp-mo pp-mo Feb 20, 2020

Choose a reason for hiding this comment

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

🤔 I really see what you mean. I think this is a big problem for the future.
Some thoughts ...

  • We may want to share common functionality with multiple dependent projects , but retain some ability to change interface and/or behaviour without it forcing a major version increment.

  • For example, I can imagine we might want common code for things like : a file-loader plugin class; a common DataProxy concept; DataManager objects;, 'lazy' data functions. (all of which currently exist as private apis within Iris)

  • The key problem is : At times we will want to change such things, in ways which would force updates in the dependent projects. But, we don't want this to have the same implications as breaking changes in user-api, and it certainly isn't appropriate to apply SemVer rules in the same way.

  • The key driver of this is that projects like iris-grib (e.g. file format interfaces) want to share common functions, but these may be lower-level and not user-relevant. It is a flexibility/stability tradeoff. There is no benefit in making all shared function rigidly defined + controlled in the same way as user API : it needs to be more flexible than that.

  • we could put such functions in their own independent projects (not just in Iris), but I don't think that actually adds anything useful.

I think it's also worth noting that, in the specific case of this function, not only is it too low-level, without user-level relevance, to publish it as a controlled API, but also it is highly specific to what Dask is doing, and that might even change, which makes it a bit "ad hoc".

@coveralls
Copy link

coveralls commented Feb 20, 2020

Coverage Status

Coverage decreased (-0.2%) to 90.0% when pulling e23229f on pp-mo:fix_proxies_dask2 into cd5d581 on SciTools:master.

Copy link
Member

@lbdreyer lbdreyer left a comment

Choose a reason for hiding this comment

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

I think this is pretty much ready to go.

I don't have any other comments than what we discussed about:

  • removing the try/except, and only have the import of _array_slice_ifempty from iris
  • update the environment.yml with the iris >= 2.4 dependency

But these depend on the Iris release

@pp-mo
Copy link
Member Author

pp-mo commented Feb 20, 2020

Thanks @lbdreyer

removing the try/except ... iris >= 2.4 ... depend on the Iris release

I think it's close. Let's wait ...

@pp-mo
Copy link
Member Author

pp-mo commented Feb 21, 2020

removing the try/except ... iris >= 2.4 ... depend on the Iris release

Latest does that.
Since we now require iris>=2.4, for this to run tests, we now need a conda-forge recipe update ...

@pp-mo
Copy link
Member Author

pp-mo commented Feb 21, 2020

a conda-forge recipe update

Done + ready !
Are we go, @lbdreyer ?

@pp-mo pp-mo force-pushed the fix_proxies_dask2 branch from 408d4da to e23229f Compare February 24, 2020 11:58
@pp-mo
Copy link
Member Author

pp-mo commented Feb 24, 2020

Had to rebase.
Ok now, 👉 @lbdreyer ?

@lbdreyer lbdreyer merged commit ab9bc7d into SciTools:master Feb 24, 2020
@pp-mo pp-mo deleted the fix_proxies_dask2 branch June 16, 2020 13:04
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.

3 participants