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

All examples rendering correctly with vedo 2023.5.0 #281

Merged
merged 13 commits into from
Nov 28, 2023

Conversation

IgorTatarnikov
Copy link
Member

@IgorTatarnikov IgorTatarnikov commented Nov 27, 2023

Before submitting a pull request (PR), please read the contributing guide.

Description

What is this PR

  • Bug fix
  • Addition of a new feature
  • Other

Why is this PR needed?
Several example files were either not running, or not rendering correctly (misaligned with the root mesh)

What does this PR do?
Ensure all example scripts (except streamlines.py due to missing data) run and render correctly.

References

closes #251
closes #261

Checklist:

  • The code has been tested locally
  • Tests have been added to cover all new functionality (unit & integration)
  • The code has been formatted with pre-commit

Copy link

codecov bot commented Nov 27, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (e6df766) 81.15% compared to head (b3fa6eb) 86.39%.

Additional details and impacted files
@@             Coverage Diff              @@
##           mega-fix     #281      +/-   ##
============================================
+ Coverage     81.15%   86.39%   +5.23%     
============================================
  Files            26       26              
  Lines          1194     1205      +11     
============================================
+ Hits            969     1041      +72     
+ Misses          225      164      -61     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@IgorTatarnikov IgorTatarnikov marked this pull request as ready for review November 27, 2023 17:43
Copy link
Member

@alessandrofelder alessandrofelder left a comment

Choose a reason for hiding this comment

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

Awesome! Needs some very minor fixes 🎉

I hacked something together locally to pytest test/test_examples.py --runslow --runlocal pass, the minor fixes needed are:

  • uncommenting neurons and ruler examples in test_examples.py and examples/__init__.py (pushed this commit already)
  • fixing some relative paths to the data

For now (until we decide to use pooch) I suggest moving the example data into a resources folder and using importlib.resources to access it, to avoid duplication of data and problems with relative paths to data files.

For an example use of importlib.resources see https://github.com/brainglobe/brainrender-napari/blob/2249ba8914ba9ccdef43837d2a6401db657b32e2/brainrender_napari/utils/brainglobe_logo.py#L5

@IgorTatarnikov
Copy link
Member Author

All done! All resources are now in brainrender/resources. Any example or test that was using the data no uses importlib.resources to fetch the data.

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.

None yet

2 participants