Skip to content

MNT: Migrate to ipyvtklink #9341

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

Merged
merged 7 commits into from
May 10, 2021
Merged

Conversation

GuillaumeFavelier
Copy link
Contributor

Starting from 0.30.0, pyvista uses ipyvtklink instead of ipyvtk_simple.

In server_environment.yml, ipyvtk_simple is still installed so I expect the CIs to come back green with 71792d6 but after the release, it will fail because show() will return a static image instead of the expected Viewer widget.

It's an item of #8704

@GuillaumeFavelier GuillaumeFavelier self-assigned this Apr 23, 2021
@GuillaumeFavelier
Copy link
Contributor Author

Related to pyvista/pyvista#1257

@GuillaumeFavelier
Copy link
Contributor Author

There might be a way to fail sooner if for example PyVista throws (ValueError?) when the requested backend is not available/does not exist.

@GuillaumeFavelier
Copy link
Contributor Author

Finally, I'll remind that although ipyvtk is fully included in our environment and codebase, it's still experimental. From the README.md:

This is an early prototype of creating a Jupyter interface to VTK. This toolkit is a proof of concept and a more polished tool will be available as ipyvtk in the future.

@GuillaumeFavelier
Copy link
Contributor Author

A simple way to address this is to bump the requirements to pyvista>=0.30.0 altogether.

@GuillaumeFavelier
Copy link
Contributor Author

Probably same treatment for pyvistaqt>=0.4.0

@GuillaumeFavelier
Copy link
Contributor Author

pip-pre is green, it's a good sign :)

@GuillaumeFavelier
Copy link
Contributor Author

GuillaumeFavelier commented Apr 30, 2021

This should be updated after #8741 is merged because plotter.iren.FindPokedRenderer is not valid anymore starting from pyvista 0.30.0.

@larsoner
Copy link
Member

@GuillaumeFavelier can you rebase or merge with upstream/main? Looks like PyVista 0.30 is out so we need this PR:

https://pypi.org/project/pyvista/0.30.0/

@GuillaumeFavelier
Copy link
Contributor Author

Done in c141be4

@GuillaumeFavelier
Copy link
Contributor Author

@GuillaumeFavelier
Copy link
Contributor Author

We also might have to deal with:

DeprecationWarning: Use of the "cond" and "rcond" keywords are deprecated and will be removed in future versions of SciPy. Use "atol" and "rtol" keywords instead

https://github.com/mne-tools/mne-python/runs/2545597094#step:13:4933

@larsoner should I just update test_dipole_fitting_fixed to use rtol in:

C = linalg.pinvh(J, rcond=1e-14)

@larsoner
Copy link
Member

I am fixing these in #9386

@larsoner
Copy link
Member

Good to go from your end @GuillaumeFavelier ? If so I'll merge once CIs come back happy other than pip-pre, and I'll double check that those just fail non-viz tests

@GuillaumeFavelier GuillaumeFavelier changed the title WIP,MNT: Migrate to ipyvtklink MNT: Migrate to ipyvtklink May 10, 2021
@GuillaumeFavelier
Copy link
Contributor Author

It's ready for me. I'll stay on the lookout for future adjustements if necessary.

@larsoner larsoner merged commit 844d53c into mne-tools:main May 10, 2021
@GuillaumeFavelier GuillaumeFavelier deleted the mnt/ipyvtklink branch May 10, 2021 14:14
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.

2 participants