Skip to content

Commit

Permalink
Expose check_latest in the atlas constructor (#396)
Browse files Browse the repository at this point in the history
* Expose check_latest in atlas constructor

* Remove examples test

* Discard changes to tests/test_examples.py
  • Loading branch information
IgorTatarnikov authored Dec 9, 2024
1 parent 167c9f2 commit e944b0b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions brainrender/atlas.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@


class Atlas(BrainGlobeAtlas):
def __init__(self, atlas_name=None):
def __init__(self, atlas_name=None, check_latest=True):
"""
Brainrender's Atlas class subclasses BrainGlobeAtlas
to add methods to get regions meshes as Actors
and to get a plane at a given point and normal.
:param atlas_name: str, atlas name from brainglobe's atlas API atlases
:param check_latest: bool, if True checks that the atlas is the latest version
"""
atlas_name = atlas_name or settings.DEFAULT_ATLAS
self.atlas_name = atlas_name
Expand All @@ -26,7 +27,7 @@ def __init__(self, atlas_name=None):
super().__init__(atlas_name=atlas_name, print_authors=False)
except TypeError:
# The latest version of BGatlas has no print_authors argument
super().__init__(atlas_name=atlas_name)
super().__init__(atlas_name=atlas_name, check_latest=check_latest)

@property
def zoom(self):
Expand Down

0 comments on commit e944b0b

Please sign in to comment.