Skip to content

MAINT: Drop support for PySurfer + mayavi? #9753

Closed

Description

@larsoner

Now that:

  1. Brain / PyVista / PyVistaQt has begun to mature;
  2. PyVista backend has good notebook support;
  3. mayavi has gone even more unmaintained than usual (I have had a PR open for 3 months that fixes some bugs on latest vtk that hasn't been reviewed yet); and
  4. PySurfer isn't too actively developed anymore

I propose that it's time that we drop support for it, as it lowers our maintenance burden: deprecate for 0.24, and in 0.25 remove the mayavi backend. We can leave the set_3d_backend infrastructure in place for future compatibility in case we want to migrate to a different 3D backend in the (probably distant) future.

I figured I'd ping @GuillaumeFavelier and @agramfort first since you've primarily been guiding the PyVista efforts. If you're on board, I'll ping the rest of the MNE steering committee since I think this is a potentially large enough change to warrant bothering everyone.

Activity

  1. agramfort commented on Sep 16, 2021

    @agramfort
    SponsorMember
  2. larsoner commented on Sep 16, 2021

    @larsoner
    MemberAuthor

    Oh right I forgot that the coreg GUI needed it.

    I think there is actually another GUI -- mne kit2fiff. I have never used it, and I don't know how widely used it is...

  3. added this to the 0.24 milestone on Sep 16, 2021
  4. agramfort commented on Sep 16, 2021

    @agramfort
    SponsorMember

    no idea if mne kit2fiff is actually still used?

    maybe @teonbrooks or @christianbrodbeck knows?

  5. christianbrodbeck commented on Sep 17, 2021

    @christianbrodbeck
    Member

    I am not aware of a replacement for the kit2fiff GUI, but since it only concerns a small subset of users maybe it could be kept as an special dependency, i.e. install mayavi if you want to use it?

  6. teonbrooks commented on Sep 17, 2021

    @teonbrooks
    Member

    for kit2fiff the conversion can be done programmatically without the GUI and we now have other tools such as dig_montage, its corresponding viz, and coreg to do inspection. It was a useful module to ensure that the markers were placed in the correct locations and that the corresponding files (headshape points, head coil points) were properly processed. I think making note of when it is last supported and point to the tutorial on using dig_montage would be what's needed.

  7. agramfort commented on Sep 17, 2021

    @agramfort
    SponsorMember
  8. hoechenberger commented on Sep 22, 2021

    @hoechenberger
    Member

    +1000 on dropping Mayavi

  9. teonbrooks commented on Sep 22, 2021

    @teonbrooks
    Member

    I like this idea. Do you some basic script that would allow to replicate the GUI feature?

    i can try to tackle this on Friday

  10. teonbrooks commented on Oct 8, 2021

    @teonbrooks
    Member

    sorry, just had a time to come back to this. do we have access to the test data in an example script since this would require loading sqd/con files

  11. larsoner commented on Oct 8, 2021

    @larsoner
    MemberAuthor

    mne/GUI/tests should have tests for the functionality we want to replace, presumably those use sqd/con

  12. teonbrooks commented on Oct 8, 2021

    @teonbrooks
    Member

    i should clarify, for the example, instead of using the sample data, could i direct it to the mne/io/kit/tests/data if I want to show how to load kit data and construct a dig_montage for the kit2fiff equivalence

  13. larsoner commented on Oct 8, 2021

    @larsoner
    MemberAuthor

    Ahh, that doesn't come with pip installs, so you could buy it's better if we can find something else. You can use things in mne-testing-data if there's something in there that would work

  14. 6 remaining items

  15. christianbrodbeck commented on Oct 11, 2021

    @christianbrodbeck
    Member

    I can ask around in the labs I know if it will make a difference for this decision? Would you consider not deprecating it?

  16. agramfort commented on Oct 12, 2021

    @agramfort
    SponsorMember
  17. christianbrodbeck commented on Oct 12, 2021

    @christianbrodbeck
    Member

    I got responses from Ellen Lau, Liina Pylkkänen and Jonathan Simon who all say their lab still uses it as part of their standard pipeline.

  18. agramfort commented on Oct 12, 2021

    @agramfort
    SponsorMember
  19. hoechenberger commented on Oct 12, 2021

    @hoechenberger
    Member

    I like the idea of outsourcing this code. Let me know if I can be of any help in that process.

  20. prabhuramachandran commented on Oct 16, 2021

    @prabhuramachandran

    +1000 on dropping Mayavi

    That is interesting. Is the biggest problem with Mayavi the fact that there is a largely absent maintainer? Are there other technical issues? I know there are many technical warts and a significant technical debt but fixing those takes time. Do you know anyone who would want to step in and help? What would help make things better? Thanks.

  21. larsoner commented on Oct 16, 2021

    @larsoner
    MemberAuthor

    Is the biggest problem with Mayavi the fact that there is a largely absent maintainer? Are there other technical issues? ... What would help make things better?

    I think that's the crux of the problem.

    VTK as a big package breaks things from time to time, as happens in any large package (not trying to bad mouth them here). traits and traitsui make changes that break things from time to time, too. And because Mayavi wraps all VTK classes, it is good at exposing any new breaking issues with VTK -- which can be good for VTK and completeness testing (e.g., with finding a bug that they fixed), but bad for downstream packages in that it can for example hang a Mayavi install, or manifest as segfaults, etc. At least this has been my observation working with mayavi.

    So IMHO what mayavi needs is more regular/dedicated maintenance and CI testing against released and ideally prerelease/dev versions of VTK for example across all OSes (e.g., at least weekly). I suggested something like this to the VTK people a year ago but nobody really jumped on the idea. Really I think it should be coupled with them doing automated deployment of prerelease/dev wheels, which maybe they could do without too much work since they switched to automated wheel building.

    So for us a lighter weight wrapper of VTK (e.g., pyvista) or making VTK calls directly, as we are doing more and more often, has broken stuff in our code less often than mayavi. We only have to fix the things that VTK breaks that we actually use, rather than fixing anything VTK has broken in a given release alongside anything traits/traitsui has broken compatibility-wise.

    Do you know anyone who would want to step in and help?

    Not that I know of :( I personally try to make PRs when I have time, but I don't have the bandwidth to take on a core maintainer role at least.

  22. prabhuramachandran commented on Oct 17, 2021

    @prabhuramachandran

    @larsoner -- thanks for the response. I agree with your analysis. And yes, this is a real problem. A major problem for me is that this has been the status for 20 years, bulk of the work has fallen on me and it has become harder and harder to find time or motivation. That said, I still think that it is a useful project. Another issue for me personally is that I have an almost "Debian stable" mentality and never update my Python environments for fear of breaking stuff so tend to live in my own cocoon -- that is the only way I can get my work done at all. What I am going to do going forward is to put in a little time each week on Mayavi maintenance and the first goal is to work with some folks at Enthought to ensure that the CI is working and notifies us of issues. I will take care of the core issues that I seem to be the only one comfortable with and others will help with setting up CI and other things that they are more comfortable managing. Hopefully together this should be better. Anyway, am hoping to do a better job. Thank you @larsoner for all your help these last few years and your patience.

  23. larsoner commented on Oct 22, 2021

    @larsoner
    MemberAuthor

    arfff so we should not just "kill" this code. Shall we create a new repo called mne-kit-gui or whatever you think is best?

    @christianbrodbeck after talking to folks in the dev meeting one sustainable option would be to move the code (verbatim) to a new mne-tools/mne-kit-gui repo (and release a PyPi package mne_kit_gui), and when you do mne kit2fiff in 0.24 you get a deprecation warning that you should install the mne_kit_gui package, and in the next release mne kit2fiff will require the package to be installed. Does this sound reasonable for you and other users of the package? It will simplify maintenance at our end I think.

  24. christianbrodbeck commented on Oct 22, 2021

    @christianbrodbeck
    Member
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions