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

Issue 174 #175

Merged
merged 10 commits into from
Dec 15, 2024
Merged

Issue 174 #175

merged 10 commits into from
Dec 15, 2024

Conversation

floesche
Copy link
Contributor

@floesche floesche commented Dec 9, 2024

potential fix for issue with blender 4.3:

  • changing bpy.ops.import_mesh.stl() to bpy.ops.wm.stl_import() created context error which was fixed by:
  • bpy.ops.object.select_allbpy.context.scene.objects

Deprecation warning for context was added in blender-3.2. The wm.stl_import should work at least since blender-4.0.

Copy link
Collaborator

@schlegelp schlegelp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi & thanks for the PR! Looks great to me. A bunch of tests fail but that seems to have more to do with some change to numpy which I need to investigate. I left one comment regarding the new docstring example you added. If you can address that, I'm happy to go ahead and merge.

--------
>>> import navis
>>> n = navis.example_neurons(1, kind="mesh")
>>> n_sm = simplify_mesh_blender(n,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's a good idea to provide some example here. Currently, this will cause an error during doctests because Blender is not installed on the Github worker.

You can either edit test-package.yml to install Blender before running pytest, or add the # doctest: +SKIP directive to exclude this line from the tests (see other such examples throughout the codebase). In theory, the former should be pretty straight forward: wget the linux distribution, unzip somewhere and add to PATH. In practice, Github Actions can be a pain in the neck to debug.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, that's a great idea.

I had issue with the current installation with some mesa related libraries and removed graphviz-dev and mesa-vulkan-drivers from my test-package.yml. I also added the latest blender-LTS via moguri/setup-blender@v1 action.

I did not see the tests finish, but in at least one of the runs I saw the test from b3d pass. Let me know if this could work for you?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated the solution to keeping the ubuntu libraries as they were before and installing the blender directly via wget, not relying on an external and potentially unnecessary complex action. The simplify_mesh_blender seems to pass more reliably now, the comparison between basic types and numpy types still fails, so the overall tests currently still fail.

Let me know if I should change anything else?

@floesche floesche mentioned this pull request Dec 11, 2024
@schlegelp
Copy link
Collaborator

Looks good to me! Thanks for setting up tests!

@schlegelp schlegelp merged commit aba1df1 into navis-org:master Dec 15, 2024
6 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