Skip to content

Commit

Permalink
bg-atlasapi -> brainglobe-atlasapi
Browse files Browse the repository at this point in the history
  • Loading branch information
willGraham01 committed Feb 23, 2024
1 parent b9181a5 commit 971890e
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion brainglobe_utils/brainmapper/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import numpy as np
import pandas as pd
from bg_atlasapi import BrainGlobeAtlas
from brainglobe_atlasapi import BrainGlobeAtlas

from brainglobe_utils.general.system import ensure_directory_exists
from brainglobe_utils.pandas.misc import safe_pandas_concat, sanitise_df
Expand Down
2 changes: 1 addition & 1 deletion brainglobe_utils/brainreg/transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import numpy as np
import pandas as pd
import tifffile
from bg_atlasapi import BrainGlobeAtlas
from brainglobe_atlasapi import BrainGlobeAtlas

from brainglobe_utils.image_io import get_size_image_from_file_paths

Expand Down
4 changes: 2 additions & 2 deletions brainglobe_utils/citation/repositories.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,8 @@ def unique_repositories_from_tools(

# Static instances for each of our repositories
# that we provide citation information for.
bg_atlasapi = Repository(
"bg-atlasapi",
brainglobe_atlasapi = Repository(
"brainglobe-atlasapi",
[
"BrainGlobe AtlasAPI",
"AtlasAPI",
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ classifiers = [
"Programming Language :: Python :: 3.11",
]
dependencies = [
"bg-atlasapi",
"brainglobe-atlasapi >= 2.0.1",
"brainglobe-space",
"configobj",
"natsort",
Expand Down
8 changes: 4 additions & 4 deletions tests/tests/test_citation/test_cite.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,24 @@ def test_citation_combinations(

both_together = cite(
"brainglobe-meta",
"bg-atlasapi",
"brainglobe-atlasapi",
format=format,
newline_separations=newline_separations,
)
bg_meta = cite("brainglobe-meta", format=format)
bg_atlasapi = cite("bg-atlasapi", format=format)
brainglobe_atlasapi = cite("brainglobe-atlasapi", format=format)

# Fetching both citations together should mean the text from the
# individual citations is included
assert bg_meta in both_together and bg_atlasapi in both_together, (
assert bg_meta in both_together and brainglobe_atlasapi in both_together, (
"Fetching multiple tools at once"
"does not generate all requested citations."
)
# Removing these individual blocks of text from the combined citation
# should leave only newline and whitespace characters
leftover_text = (
both_together.replace(bg_meta, "")
.replace(bg_atlasapi, "")
.replace(brainglobe_atlasapi, "")
.replace(" ", "")
.replace("\n", "")
)
Expand Down
10 changes: 6 additions & 4 deletions tests/tests/test_citation/test_repositories.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,22 @@ def test_repository_basics() -> None:
- The less-than comparison (by repo name)
"""
BrainGlobe = Repository("BrainGlobe", [])
bg_atlasapi = Repository("bg-atlasapi", [])
brainglobe_atlasapi = Repository("brainglobe-atlasapi", [])

# URL construction
assert BrainGlobe.url == "https://github.com/brainglobe/BrainGlobe"

# Equality comparison
assert (
BrainGlobe != bg_atlasapi
BrainGlobe != brainglobe_atlasapi
), "Different repositories are deemed equal!"
assert (
BrainGlobe == BrainGlobe
), "Identical repositories are deemed unequal!"

# Less-than and ordering (alphabetical by Python)
assert (
BrainGlobe < bg_atlasapi
BrainGlobe < brainglobe_atlasapi
), "Repository comparison does not assert alphabetical order by name"


Expand Down Expand Up @@ -77,7 +77,9 @@ def test_unique_repos() -> None:
assert (
len(
unique_repositories_from_tools(
"bg-atlasapi", "bg_atlasapi", report_duplicates=True
"brainglobe-atlasapi",
"brainglobe_atlasapi",
report_duplicates=True,
)
)
== 1
Expand Down

0 comments on commit 971890e

Please sign in to comment.