nipy / PySurfer

Cortical neuroimaging visualization in Python
https://pysurfer.github.io/
BSD 3-Clause "New" or "Revised" License
239 stars 98 forks source link

Compatibility updates #320

Closed christianbrodbeck closed 11 months ago

christianbrodbeck commented 1 year ago

This is needed to get PySurfer to import in an environment with Python 3.10 and nibabel 5.1.

christianbrodbeck commented 1 year ago

Pinging this – as Python 3.10 becomes more common more users will run into this

larsoner commented 1 year ago

MNE-Python no longer uses PySurfer and I don't have the bandwidth to maintain this package. Maybe I could add you as a maintainer @christianbrodbeck ?

christianbrodbeck commented 1 year ago

Sure!

larsoner commented 1 year ago

Done!

Timothy-Anders0n commented 1 year ago

Any chance these commits will be merged soon?

Edit to say that file viz.py needs a correction: line 1460: dtype=np.int-> dtype=int

as per

AttributeError: module 'numpy' has no attribute 'int'. np.int was a deprecated alias for the builtin int. To avoid this error in existing code, use int by itself. Doing this will not modify any behavior and is safe. When replacing np.int, you may wish to use e.g. np.int64 or np.int32 to specify the precision. If you wish to review your current use, check the release note link for additional information. The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

same issue with utils.py which has 5 occurrences of np.int.

christianbrodbeck commented 1 year ago

@Timothy-Anders0n I added that, too, thanks for pointing it out

@larsoner okay to merge this without another review? And how would we go about making a minor release?

larsoner commented 1 year ago

Yes you can maintain in whatever way you see fit. Personally I would try to fix CIs then rely on green but that could be a lot of work.

I probably have PyPI credentials to add you so you could upload a sdist and wheel. Let me know your PyPI username if it's different from GitHub

larsoner commented 1 year ago

I think I found you on PyPI, invitation sent