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

Iris bridge to GeoVista #5517

Closed
pp-mo opened this issue Sep 26, 2023 · 5 comments
Closed

Iris bridge to GeoVista #5517

pp-mo opened this issue Sep 26, 2023 · 5 comments
Assignees

Comments

@pp-mo
Copy link
Member

pp-mo commented Sep 26, 2023

User interest in geovista seems to be blossoming right now.
We have various resources showing how to link to it from Iris, e.g. the Mesh plotting section + example.
Plus the region extraction example And in future we might extend this.

Likewise we have produced various demo notebooks containing similar code content.

But there's a lot of duplicated code + boilerplate making the link between cubes and PyVista polydata.
So there is a really useful opportunity to provide an "iris geovista bridge" module.

However it's not clear where this would live, and where it should get tested.
It should not add to the the core dependencies, or the C.I. testing costs.
It could be a partner package, like iris-grib or iris-esmf-regrid.
The idea of a plugin architecture might also have legs.

@trexfeathers
Copy link
Contributor

The idea of a plugin architecture might also have legs.

I personally think proliferation of plugin packages is ill fitted to our situation.

The two arguments in favour (that I'm aware of):

  • Aids innovation in large projects because the plugins can be managed by non-core developers.
    Not really applicable here.
  • Makes it easier to introduce dependencies not required by the core package
    This isn't actually true. Xarray (and others I'm sure) have demonstrated that you can have a very cut-down recipe, with errors/warnings if a user tries to invoke an optional dependency without it being installed.

Arguments against:

  • Doubling up on repo management - dependabot, lock-files, dev permissions etcetera
  • A user has to understand the structure so they can raise the issue in the right place

@trexfeathers
Copy link
Contributor

See #4798

@stephenworsley stephenworsley moved this to 🆕 New - potential tasks in 🐙Iris v3.8.0 Sep 28, 2023
@stephenworsley stephenworsley moved this from 🆕 New - potential tasks to Blocked for next sprint in 🐙Iris v3.8.0 Oct 5, 2023
@stephenworsley stephenworsley moved this from Blocked for next sprint to Candidate for next sprint in 🐙Iris v3.8.0 Oct 19, 2023
@trexfeathers
Copy link
Contributor

trexfeathers commented Oct 19, 2023

Discussed during refinement for Iris 3.8.

Features

The MVP bridge would constitute two operations as previously noted by @pp-mo:

  • Conversion from Cube to PolyData
  • Indexing a Cube using PolyData indices. Could we stick the whole operation in a function so the user didn't need to learn GeoVista/PyVista?
  • We do NOT expect a need for conversion from PolyData to Cube

Possible dependency problems

To avoid getting bogged down in concerns about dependencies, we recommend giving it a try and seeing what happens:

  • Introduce the bridge features in iris.experimental - can back out if we run into trouble
  • Include GeoVista as an optional Iris dependency
  • Acknowledge that this means making the testing / development environment larger
  • Raise a helpful warning if a user tries to invoke something requiring GeoVista but it is not installed
  • Schedule a team review in a few months' time to see if the inclusion of GeoVista's dependency stack within Iris' lockfile has caused any more headaches than we used to have.
    E.g. trouble resolving, other packages blocked from advancing

Options if we get dependency problems

  • Back out the feature
  • Create a plugin package specifically for the bridge
    Experiences with iris-grib, cf-units, nc-time-axis, mo_pack show that plugin packages are vulnerable to losing resource, so this action would need to come with a plan for altered team culture.
  • Copy the skip_gdal() testing convenience to disable GeoVista-dependent tests and allow GeoVista to not be in dependencies.
    Developers very rarely run the GDAL-dependent tests, so this action would need to come with a plan for altered team culture.
  • Extend the optional-core distinction to the tests and to developer environments
    • Don't include optional dependencies in the standard testing / developer environment
    • Create dedicated CI runs for optional dependencies, which contain fewer tests / run on fewer Python versions. Should keep CI at acceptable speeds.
    • Pattern could also be extended to GDAL-dependent tests

@trexfeathers trexfeathers moved this from Candidate for next sprint to 📋 Backlog in 🐙Iris v3.8.0 Nov 2, 2023
@trexfeathers trexfeathers moved this from 📋 Backlog to 🔖Assigned in 🐙Iris v3.8.0 Nov 10, 2023
@trexfeathers trexfeathers added this to the v3.8 milestone Nov 14, 2023
@trexfeathers
Copy link
Contributor

trexfeathers commented Nov 15, 2023

... this action would need to come with a plan for altered team culture.

Just a quick note that a planned change in culture was used to justify having fewer mechanical fail safes in the RBMK nuclear reactor design. The culture change never happened, but the reactors went ahead anyway, and Chernobyl happened as a result.

@HGWright HGWright moved this from 🔖Assigned to 🏗 In progress in 🐙Iris v3.8.0 Nov 17, 2023
@scitools-ci scitools-ci bot removed this from 🚴 Peloton Dec 15, 2023
@bjlittle bjlittle changed the title Geovista bridge Iris bridge to GeoVista Feb 6, 2024
@stephenworsley stephenworsley moved this from 🏗 In progress to paused in 🐙Iris v3.8.0 Mar 12, 2024
@ESadek-MO
Copy link
Contributor

@SciTools/peloton #5740 closed this!

@github-project-automation github-project-automation bot moved this from paused to 🏁 Done in 🐙Iris v3.8.0 Apr 3, 2024
@scitools-ci scitools-ci bot removed this from 🚴 Peloton May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: 🏁 Done
Development

No branches or pull requests

4 participants