brainglobe / brainrender

a python based software for visualization of neuroanatomical and morphological data.
https://brainglobe.info/documentation/brainrender/index.html
BSD 3-Clause "New" or "Revised" License
538 stars 75 forks source link

Allow examples/neurons.py to run successfully when neuromorpho is down #366

Closed IgorTatarnikov closed 3 months ago

IgorTatarnikov commented 3 months ago

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

Please fill out as much of this template as you can, but if you have any problems or questions, just leave a comment and we will help out :)

Description

What is this PR

Why is this PR needed? The test running each example script occasionally fails when neuromorpho.org is down.

What does this PR do? Place the code relating to connecting to neuromorpho.org in a try-catch block that allows the example to still run if a ConnnectionError is encountered.

References

How has this PR been tested?

Tested locally, examples/neurons.py can be run and renders the neuron stored locally.

Is this a breaking change?

No

Does this PR require an update to the documentation?

No

If any features have changed, or have been added. Please explain how the documentation has been updated (and link to the associated PR). See here for details.

Checklist:

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 87.39%. Comparing base (48f655f) to head (3e2ebbf). Report is 18 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #366 +/- ## ========================================== + Coverage 86.96% 87.39% +0.42% ========================================== Files 27 27 Lines 1220 1214 -6 ========================================== Hits 1061 1061 + Misses 159 153 -6 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.