Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump to brainglobe space #191

Merged
merged 4 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ pprint(VISp)

### Note on coordinates in `bg-atlasapi`
Working with both image coordinates and cartesian coordinates in the same space can be confusing! In `bg-atlasapi`, the origin is always assumed to be in the upper left corner of the image (sectioning along the first dimension), the "ij" convention. This means that when plotting meshes and points using cartesian systems, you might encounter confusing behaviors coming from the fact that in cartesian plots one axis is inverted with respect to ij coordinates (vertical axis increases going up, image row indexes increase going down). To make things as consistent as possible, in `bg-atlasapi` the 0 of the meshes coordinates is assumed to coincide with the 0 index of the images stack, and meshes coordinates increase following the direction stack indexes increase.
To deal with transformations between your data space and `bg-atlasapi`, you might find helpful the [bg-space](https://github.com/brainglobe/bg-space) package.
To deal with transformations between your data space and `bg-atlasapi`, you might find the [brainglobe-space](https://github.com/brainglobe/brainglobe-space) package helpful.

# Contributing to bg-atlasapi
**Contributors to bg-atlaspi are absolutely encouraged**, whether you want to fix bugs, add/request new features or simply ask questions.
Expand Down
2 changes: 1 addition & 1 deletion bg_atlasapi/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import numpy as np
import pandas as pd
from bg_space import AnatomicalSpace
from brainglobe_space import AnatomicalSpace

from bg_atlasapi.descriptors import (
ANNOTATION_FILENAME,
Expand Down
2 changes: 1 addition & 1 deletion bg_atlasapi/descriptors.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,5 @@
HEMISPHERES_DTYPE = np.uint8

# Standard orientation origin: Anterior, Superior, Right
# (using BG-Space definition)
# (using brainglobe-space definition)
ATLAS_ORIENTATION = "asr"
41 changes: 14 additions & 27 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
name = "bg-atlasapi"
description = "A lightweight python module to interact with atlases for systems neuroscience"
readme = "README.md"
license = {file = "LICENSE"}
license = { file = "LICENSE" }
authors = [
{name = "Luigi Petrucco, Federico Claudi, Adam Tyson", email = "[email protected]"},
{ name = "Luigi Petrucco, Federico Claudi, Adam Tyson", email = "[email protected]" },
]
classifiers = [
"Development Status :: 3 - Alpha",
Expand All @@ -18,7 +18,7 @@ classifiers = [
]
requires-python = ">=3.9"
dependencies = [
"bg-space >= 0.5.0",
"brainglobe-space >= 1.0.0",
"click",
"meshio",
"numpy",
Expand All @@ -37,19 +37,10 @@ dynamic = ["version"]
"Documentation" = "https://brainglobe.info/documentation/bg-atlasapi/index.html"

[project.optional-dependencies]
dev = [
"check-manifest",
"pre-commit",
"pytest",
"pytest-cov",
]
dev = ["check-manifest", "pre-commit", "pytest", "pytest-cov"]

[build-system]
requires = [
"setuptools>=45",
"wheel",
"setuptools_scm[toml]>=6.2",
]
requires = ["setuptools>=45", "wheel", "setuptools_scm[toml]>=6.2"]
build-backend = "setuptools.build_meta"

[project.scripts]
Expand All @@ -64,12 +55,8 @@ exclude = ["tests*"]

[tool.pytest.ini_options]
addopts = "--cov=bg_atlasapi"
filterwarnings = [
"error",
]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
]
filterwarnings = ["error"]
markers = ["slow: marks tests as slow (deselect with '-m \"not slow\"')"]

[tool.black]
target-version = ['py39', 'py310', 'py311']
Expand All @@ -80,16 +67,16 @@ line-length = 79

[tool.check-manifest]
ignore = [
"*.yaml",
"tox.ini",
"tests/*",
"tests/test_unit/*",
"tests/test_integration/*",
"*.yaml",
"tox.ini",
"tests/*",
"tests/test_unit/*",
"tests/test_integration/*",
]

[tool.ruff]
line-length = 79
exclude = ["__init__.py","build",".eggs"]
exclude = ["__init__.py", "build", ".eggs"]
select = ["I", "E", "F"]
fix = true

Expand All @@ -108,5 +95,5 @@ python =
[testenv]
extras =
dev
commands = pytest -v --color=yes --cov=bg_atlasapi --cov-report=xml
commands = pytest -v --color=yes --cov=bg_atlasapi --cov-report=xml -W ignore::DeprecationWarning
willGraham01 marked this conversation as resolved.
Show resolved Hide resolved
"""
Loading