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

Updated for pymeshlab 2022.2 #7

Merged
merged 2 commits into from
Jul 31, 2024
Merged

Updated for pymeshlab 2022.2 #7

merged 2 commits into from
Jul 31, 2024

Conversation

Macl-I
Copy link

@Macl-I Macl-I commented Jul 29, 2024

Updated to account for function renaming of pymeshlab version 2022.2.
I am non expert on meshing functions, so please double check if the right ones have been implemented.

If you would like a verification from my own data do not hesitate to contact me.

updated to account for new pymesh version

(if you would like verification that this works let me know)
@zacsimile
Copy link
Owner

Thanks for this update! I'd like to maintain backward compatibility with older versions of pymeshlab. Could you please wrap these changes in try/except blocks that check for an AttributeError on the old calls and uses these new calls in the case we receive an error?

Incorporated try except to ensure compatibility  with meshlab 0.1.9
@Macl-I
Copy link
Author

Macl-I commented Jul 31, 2024

Hey I incorporated the requested changes.

However, I don't think they will be so relevant, since old versions of pymeshlab are not downloadable anymore via pypi, which is the reason why I had to adjust the code to get it to run in the first place.

Let me know if any further adjustments are necessary!

@zacsimile
Copy link
Owner

Thanks! It looks to me like the old versions of pymeshlab are still available, but maybe I misunderstand. I thought these breaking changes happened in pymeshlab 2022.2. I had a look at PyPI and I can see the old versions back to 0.1.7 at https://pypi.org/project/pymeshlab/2021.10/#history. napari works with python 3.9+, and 0.1.7 works with python 3.9. Do these breaking changes predate 0.1.7? If so, the excepts are not necessary.

@Macl-I
Copy link
Author

Macl-I commented Jul 31, 2024

You're welcome 😀!

Honestly I did very little checking before updating the code (which was thankfully quite easy).

I did a fresh install at python 3.9 and it didn't work out of the box and installing an old version of pymeshlab via pip install pymeshlab==0.1.9 failed too, so I just stuck with the solution found above.

Due to the uncertainty I suggest we just stick with the try except solution just to be save.

@zacsimile
Copy link
Owner

OK. I just double-checked and it does work for me.

(test2) C:\Users\zach>pip install pymeshlab==0.1.9
Collecting pymeshlab==0.1.9
  Downloading pymeshlab-0.1.9-cp39-cp39-win_amd64.whl.metadata (3.6 kB)
Collecting numpy (from pymeshlab==0.1.9)
  Downloading numpy-2.0.1-cp39-cp39-win_amd64.whl.metadata (60 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 60.9/60.9 kB ? eta 0:00:00
Downloading pymeshlab-0.1.9-cp39-cp39-win_amd64.whl (28.6 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 28.6/28.6 MB 2.2 MB/s eta 0:00:00
Downloading numpy-2.0.1-cp39-cp39-win_amd64.whl (16.6 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 16.6/16.6 MB 65.5 MB/s eta 0:00:00
Installing collected packages: numpy, pymeshlab
Successfully installed numpy-2.0.1 pymeshlab-0.1.9

So, yes, let's stick with the except to be safe. One last request, could we change it to except AttributeError? I prefer to avoid bare excepts.

One this is merged I'll update the tests build scripts for newer versions of python as well.

@zacsimile zacsimile merged commit bdc6aee into zacsimile:main Jul 31, 2024
1 of 10 checks passed
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