From 489a55e911a1d71d353bad6ae6ee5bd51ed827f9 Mon Sep 17 00:00:00 2001 From: willGraham01 <1willgraham@gmail.com> Date: Fri, 23 Feb 2024 14:19:25 +0000 Subject: [PATCH] bg-atlasapi -> brainglobe-atlasapi --- brainrender_napari/brainrender_widget.py | 4 ++-- brainrender_napari/data_models/atlas_table_model.py | 2 +- brainrender_napari/data_models/structure_tree_model.py | 2 +- brainrender_napari/napari_atlas_representation.py | 2 +- brainrender_napari/utils/formatting.py | 2 +- brainrender_napari/utils/load_user_data.py | 2 +- brainrender_napari/widgets/atlas_manager_dialog.py | 2 +- brainrender_napari/widgets/atlas_manager_view.py | 4 ++-- brainrender_napari/widgets/atlas_viewer_view.py | 2 +- brainrender_napari/widgets/structure_view.py | 4 ++-- pyproject.toml | 2 +- tests/conftest.py | 2 +- tests/test_unit/test_atlas_manager_view.py | 2 +- tests/test_unit/test_metadata_reading.py | 2 +- tests/test_unit/test_napari_atlas_representation.py | 2 +- 15 files changed, 18 insertions(+), 18 deletions(-) diff --git a/brainrender_napari/brainrender_widget.py b/brainrender_napari/brainrender_widget.py index ecdc37e..df2c57f 100644 --- a/brainrender_napari/brainrender_widget.py +++ b/brainrender_napari/brainrender_widget.py @@ -8,8 +8,8 @@ Users can add the atlas images/structures as layers to the viewer. """ -from bg_atlasapi import BrainGlobeAtlas -from bg_atlasapi.list_atlases import get_downloaded_atlases +from brainglobe_atlasapi import BrainGlobeAtlas +from brainglobe_atlasapi.list_atlases import get_downloaded_atlases from napari.viewer import Viewer from qtpy.QtWidgets import ( QCheckBox, diff --git a/brainrender_napari/data_models/atlas_table_model.py b/brainrender_napari/data_models/atlas_table_model.py index ef94e05..a60ae9d 100644 --- a/brainrender_napari/data_models/atlas_table_model.py +++ b/brainrender_napari/data_models/atlas_table_model.py @@ -1,4 +1,4 @@ -from bg_atlasapi.list_atlases import ( +from brainglobe_atlasapi.list_atlases import ( get_all_atlases_lastversions, get_atlases_lastversions, get_local_atlas_version, diff --git a/brainrender_napari/data_models/structure_tree_model.py b/brainrender_napari/data_models/structure_tree_model.py index 12d951b..ebb0caa 100644 --- a/brainrender_napari/data_models/structure_tree_model.py +++ b/brainrender_napari/data_models/structure_tree_model.py @@ -1,6 +1,6 @@ from typing import Dict, List -from bg_atlasapi.structure_tree_util import get_structures_tree +from brainglobe_atlasapi.structure_tree_util import get_structures_tree from qtpy.QtCore import QAbstractItemModel, QModelIndex, Qt from qtpy.QtGui import QStandardItem diff --git a/brainrender_napari/napari_atlas_representation.py b/brainrender_napari/napari_atlas_representation.py index 462c2ad..6ef6474 100644 --- a/brainrender_napari/napari_atlas_representation.py +++ b/brainrender_napari/napari_atlas_representation.py @@ -1,7 +1,7 @@ from dataclasses import dataclass import numpy as np -from bg_atlasapi import BrainGlobeAtlas +from brainglobe_atlasapi import BrainGlobeAtlas from meshio import Mesh from napari.settings import get_settings from napari.viewer import Viewer diff --git a/brainrender_napari/utils/formatting.py b/brainrender_napari/utils/formatting.py index 9b2862e..eac5911 100644 --- a/brainrender_napari/utils/formatting.py +++ b/brainrender_napari/utils/formatting.py @@ -1,4 +1,4 @@ -from bg_atlasapi.list_atlases import get_all_atlases_lastversions +from brainglobe_atlasapi.list_atlases import get_all_atlases_lastversions def format_atlas_name(name: str) -> str: diff --git a/brainrender_napari/utils/load_user_data.py b/brainrender_napari/utils/load_user_data.py index cc2d056..444be32 100644 --- a/brainrender_napari/utils/load_user_data.py +++ b/brainrender_napari/utils/load_user_data.py @@ -1,7 +1,7 @@ import json from pathlib import Path -from bg_atlasapi.list_atlases import get_local_atlas_version +from brainglobe_atlasapi.list_atlases import get_local_atlas_version def read_atlas_metadata_from_file(atlas_name: str): diff --git a/brainrender_napari/widgets/atlas_manager_dialog.py b/brainrender_napari/widgets/atlas_manager_dialog.py index 08782f3..64f6e7a 100644 --- a/brainrender_napari/widgets/atlas_manager_dialog.py +++ b/brainrender_napari/widgets/atlas_manager_dialog.py @@ -1,4 +1,4 @@ -from bg_atlasapi.list_atlases import get_all_atlases_lastversions +from brainglobe_atlasapi.list_atlases import get_all_atlases_lastversions from qtpy.QtWidgets import ( QDialog, QHBoxLayout, diff --git a/brainrender_napari/widgets/atlas_manager_view.py b/brainrender_napari/widgets/atlas_manager_view.py index 7a2868d..2084f8f 100644 --- a/brainrender_napari/widgets/atlas_manager_view.py +++ b/brainrender_napari/widgets/atlas_manager_view.py @@ -11,12 +11,12 @@ from typing import Callable -from bg_atlasapi.list_atlases import ( +from brainglobe_atlasapi.list_atlases import ( get_all_atlases_lastversions, get_atlases_lastversions, get_downloaded_atlases, ) -from bg_atlasapi.update_atlases import install_atlas, update_atlas +from brainglobe_atlasapi.update_atlases import install_atlas, update_atlas from napari.qt import thread_worker from qtpy.QtCore import Signal from qtpy.QtWidgets import QTableView, QWidget diff --git a/brainrender_napari/widgets/atlas_viewer_view.py b/brainrender_napari/widgets/atlas_viewer_view.py index 1efdbb0..9d768bd 100644 --- a/brainrender_napari/widgets/atlas_viewer_view.py +++ b/brainrender_napari/widgets/atlas_viewer_view.py @@ -9,7 +9,7 @@ from typing import Tuple -from bg_atlasapi.list_atlases import ( +from brainglobe_atlasapi.list_atlases import ( get_downloaded_atlases, ) from qtpy.QtCore import Qt, Signal diff --git a/brainrender_napari/widgets/structure_view.py b/brainrender_napari/widgets/structure_view.py index 757d89b..e7a763a 100644 --- a/brainrender_napari/widgets/structure_view.py +++ b/brainrender_napari/widgets/structure_view.py @@ -4,8 +4,8 @@ from typing import Dict, List -from bg_atlasapi.list_atlases import get_downloaded_atlases -from bg_atlasapi.structure_tree_util import get_structures_tree +from brainglobe_atlasapi.list_atlases import get_downloaded_atlases +from brainglobe_atlasapi.structure_tree_util import get_structures_tree from qtpy.QtCore import QAbstractItemModel, QModelIndex, Qt, Signal from qtpy.QtGui import QStandardItem from qtpy.QtWidgets import QTreeView, QWidget diff --git a/pyproject.toml b/pyproject.toml index a6141bc..b472fa2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,7 +24,7 @@ classifiers = [ dependencies = [ "napari>=0.4.18", - "bg-atlasapi", + "brainglobe-atlasapi>=2.0.1", "numpy", "qtpy", ] diff --git a/tests/conftest.py b/tests/conftest.py index 31de9c3..e8114e1 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -3,7 +3,7 @@ from pathlib import Path import pytest -from bg_atlasapi import BrainGlobeAtlas, config, list_atlases +from brainglobe_atlasapi import BrainGlobeAtlas, config, list_atlases from qtpy.QtCore import Qt diff --git a/tests/test_unit/test_atlas_manager_view.py b/tests/test_unit/test_atlas_manager_view.py index 557f16d..ec54450 100644 --- a/tests/test_unit/test_atlas_manager_view.py +++ b/tests/test_unit/test_atlas_manager_view.py @@ -83,7 +83,7 @@ def test_download_confirmed_callback(atlas_manager_view, qtbot): Test setup consists of remembering the expected files and folders of a preexisting atlas and then removing them. This allows checking that the function triggers the creation of the same local copy - of the atlas as the `bg_atlasapi` itself. + of the atlas as the `brainglobe_atlasapi` itself. """ atlas_directory = Path.home() / ".brainglobe/example_mouse_100um_v1.2" expected_filenames = atlas_directory.iterdir() diff --git a/tests/test_unit/test_metadata_reading.py b/tests/test_unit/test_metadata_reading.py index 1f6b6a9..8a90613 100644 --- a/tests/test_unit/test_metadata_reading.py +++ b/tests/test_unit/test_metadata_reading.py @@ -1,4 +1,4 @@ -from bg_atlasapi import BrainGlobeAtlas +from brainglobe_atlasapi import BrainGlobeAtlas from brainrender_napari.utils.load_user_data import ( read_atlas_metadata_from_file, diff --git a/tests/test_unit/test_napari_atlas_representation.py b/tests/test_unit/test_napari_atlas_representation.py index 61870d2..d46534a 100644 --- a/tests/test_unit/test_napari_atlas_representation.py +++ b/tests/test_unit/test_napari_atlas_representation.py @@ -1,5 +1,5 @@ import pytest -from bg_atlasapi import BrainGlobeAtlas +from brainglobe_atlasapi import BrainGlobeAtlas from napari.layers import Image, Labels from numpy import all, allclose from qtpy.QtCore import QEvent, QPoint, Qt