Skip to content

Commit

Permalink
Doc: add docstring to (sub-) packages and modules
Browse files Browse the repository at this point in the history
  • Loading branch information
AhmetNSimsek committed Oct 25, 2023
1 parent 6547d26 commit 1f091e7
Show file tree
Hide file tree
Showing 29 changed files with 55 additions and 16 deletions.
21 changes: 11 additions & 10 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@
API Documentation
=================

The class and package diagrams can be found at the `developer documentation<developer>`.

:mod:`Siibra<siibra>`
====================

Main Packages
=============
Main Packages and Modules
=========================
.. autopackagesummary:: siibra
:toctree: _autosummary

Expand All @@ -24,23 +26,22 @@ Volumes
.. autopackagesummary:: siibra.volumes
:toctree: _autosummary

Features
========
.. autopackagesummary:: siibra.features
:toctree: _autosummary

Locations
=========
.. autopackagesummary:: siibra.locations
:toctree: _autosummary

Miscellaneous Helpers
=====================
Features
========
.. autopackagesummary:: siibra.features
:toctree: _autosummary

Live queries
------------
.. autopackagesummary:: siibra.livequeries
:toctree: _autosummary

Retrieval
---------
=========
.. autopackagesummary:: siibra.retrieval
:toctree: _autosummary
2 changes: 1 addition & 1 deletion siibra/features/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Multimodal data features types and query mechanisms."""

from . import (
connectivity,
Expand Down
2 changes: 2 additions & 0 deletions siibra/features/anchor.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Handles the relation between study targets and AtlasConcepts."""

from ..commons import logger, Species

Expand All @@ -29,6 +30,7 @@

AnatomicalAssignment = RelationAssignment[Union[Region, Location]]


class AnatomicalAnchor:
"""
Anatomical anchor to an atlas region,
Expand Down
1 change: 1 addition & 0 deletions siibra/features/connectivity/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Multimodal data features concerning connectivity data."""

from .functional_connectivity import FunctionalConnectivity
from .streamline_counts import StreamlineCounts
Expand Down
1 change: 1 addition & 0 deletions siibra/features/dataset/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Non-preconfigured data features published as datasets."""

from .ebrains import EbrainsDataFeature
3 changes: 1 addition & 2 deletions siibra/features/dataset/ebrains.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# simple data features anchored to a point in space
"""Non-preconfigured data features hosted at EBRAINS."""

from zipfile import ZipFile
from .. import anchor as _anchor
Expand Down
1 change: 1 addition & 0 deletions siibra/features/feature.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Handles multimodal data features and related queries."""

from . import anchor as _anchor

Expand Down
1 change: 1 addition & 0 deletions siibra/features/image/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Multimodal data features in volume or image formats."""

from zipfile import ZipFile
from .. import feature
Expand Down
1 change: 1 addition & 0 deletions siibra/features/tabular/tabular.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Multimodal data features in tabular formats."""

from zipfile import ZipFile
from .. import feature
Expand Down
1 change: 1 addition & 0 deletions siibra/livequeries/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Feature queries requiring live query or on-the-fly calculations."""

from .allen import AllenBrainAtlasQuery
from .bigbrain import LayerwiseBigBrainIntensityQuery, BigBrainProfileQuery
Expand Down
1 change: 1 addition & 0 deletions siibra/livequeries/allen.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Query Allen Human Brain Atlas microarray data in specified volume."""

from .query import LiveQuery

Expand Down
1 change: 1 addition & 0 deletions siibra/livequeries/bigbrain.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Matches BigBrain intesity profiles extracted by Wagstyl et al. to volumes."""

from . import query

Expand Down
1 change: 1 addition & 0 deletions siibra/livequeries/ebrains.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Query data features published as Ebrains datasets with AtlasConcepts"""

from ..features.dataset import ebrains as _ebrains
from . import query
Expand Down
1 change: 1 addition & 0 deletions siibra/livequeries/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Handles feature queries that rely on live or on-the-fly calculations."""

from ..commons import logger
from ..features.feature import Feature
Expand Down
1 change: 1 addition & 0 deletions siibra/locations/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Handles spatial concepts and spatial operation like warping between spaces."""

from .location import WholeBrain
from .point import Point
Expand Down
1 change: 1 addition & 0 deletions siibra/locations/boundingbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""A box defined by two farthest corner coordinates on a specific space."""

from . import point, pointset, location, boundingbox

Expand Down
2 changes: 1 addition & 1 deletion siibra/locations/location.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Concpets that have primarily spatial meaning."""

import numpy as np
from abc import ABC, abstractmethod
Expand Down
1 change: 1 addition & 0 deletions siibra/locations/point.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Singular coordinate defined on a space, possibly with an uncertainty."""

from . import location, boundingbox, pointset
from ..commons import logger
Expand Down
1 change: 1 addition & 0 deletions siibra/locations/pointset.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""A set of coordinates on a reference space."""

from . import location, point, boundingbox

Expand Down
1 change: 1 addition & 0 deletions siibra/retrieval/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""File digestion and caching."""

from .repositories import (
GitlabConnector,
Expand Down
1 change: 1 addition & 0 deletions siibra/retrieval/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Maintaining and hadnling caching files on disk."""

import hashlib
import os
Expand Down
2 changes: 1 addition & 1 deletion siibra/retrieval/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Metadata connection to EBRAINS datasets."""

from .requests import MultiSourcedRequest, GitlabProxy, GitlabProxyEnum

Expand Down
16 changes: 16 additions & 0 deletions siibra/retrieval/exceptions/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
# Copyright 2018-2021
# Institute of Neuroscience and Medicine (INM-1), Forschungszentrum Jülich GmbH

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

# http://www.apache.org/licenses/LICENSE-2.0

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Exceptions concerning file retrieval processes."""

class NoSiibraConfigMirrorsAvailableException(Exception):
pass

Expand Down
1 change: 1 addition & 0 deletions siibra/retrieval/repositories.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Connect to repositories to browse and pull files within."""

from .requests import (
HttpRequest,
Expand Down
1 change: 1 addition & 0 deletions siibra/retrieval/requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Request files with decoders, lazy loading, and caching."""

from .cache import CACHE
from .exceptions import EbrainsAuthenticationError
Expand Down
2 changes: 1 addition & 1 deletion siibra/vocabularies/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Abbreviations and aliases."""

from ..commons import InstanceTable

Expand Down
1 change: 1 addition & 0 deletions siibra/volumes/gifti.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Handles reading and preparing gii files."""

from . import volume

Expand Down
1 change: 1 addition & 0 deletions siibra/volumes/neuroglancer.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Handles reading and preparing neuroglancer files."""

from . import volume

Expand Down
1 change: 1 addition & 0 deletions siibra/volumes/nifti.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Handles reading and preparing nifti files."""

from . import volume

Expand Down

0 comments on commit 1f091e7

Please sign in to comment.