Skip to content

Use arbitrary root during init - #474

Merged
adamltyson merged 2 commits into
mainfrom
use-arbitrary-root
Sep 21, 2026
Merged

adamltyson merged 2 commits into
mainfrom
use-arbitrary-root

Conversation

@IgorTatarnikov

Copy link
Copy Markdown
Member

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

  • Bug fix
  • Addition of a new feature
  • Other

Why is this PR needed?
Currently, brainrender hardcodes a structure named "root" to use as the root mesh. This may lead to errors if an atlas exists but doesn't call the root node "root".

What does this PR do?
Generalise the current code by using the id of the root node of the atlas hierarchy to fetch an arbitrarily named root mesh to initialise the scene.

How has this PR been tested?

All tests pass, and examples checked by visual inspection.

Is this a breaking change?

No

Does this PR require an update to the documentation?

No

Checklist:

  • The code has been tested locally
  • The code has been formatted with pre-commit

@codecov

codecov Bot commented Sep 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.55%. Comparing base (6476c43) to head (6dd0441).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #474   +/-   ##
=======================================
  Coverage   88.54%   88.55%           
=======================================
  Files          27       27           
  Lines        1318     1319    +1     
=======================================
+ Hits         1167     1168    +1     
  Misses        151      151           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@adamltyson
adamltyson merged commit 60cf6b7 into main Sep 21, 2026
12 checks passed
@adamltyson
adamltyson deleted the use-arbitrary-root branch September 21, 2026 07:21
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