# alleninstitute/abc_atlas_access architecture

> Architecture diagram of the GitHub repository alleninstitute/abc_atlas_access, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-07-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/alleninstitute/abc_atlas_access
- Repository: https://github.com/alleninstitute/abc_atlas_access

## Overview

##### Project type and purpose
- This is primarily a Python SDK (abc_atlas_access) for programmatic access to the Allen Brain Cell Atlas data, with a local caching layer and a manifest-building utility.
- It also includes a suite of Jupyter notebooks for tutorials and a JupyterBook-based static website (hosted on GitHub Pages) for documentation and examples.

##### File structure
- Top-level “src/abc_atlas_access”: the core Python client and cache modules (API client, file/cloud cache, anndata utilities, manifest management).
- “src/manifest_builder”: a standalone manifest-generation script.
- “notebooks/”: example workflows and tutorials in Jupyter Notebook form.
- “docs/” + “_static/” + “_config.yml”: JupyterBook source, static assets, and site configuration.
- “tests/”: pytest test suites for cache, manifest, and utility modules.
- CI/CD workflows in “.github/workflows/”: test, build, and deploy pipelines.
- “pyproject.toml” and pip install endpoints define packaging and dependencies.

##### README for additional insights
- Confirms the dual focus on data-access library and JupyterBook website.
- Shows how to install the core package and optional notebook dependencies.
- Points to GitHub Pages for site deployment.

## Diagram (Mermaid)

```mermaid
flowchart TD
  %% User Workloads
  subgraph "User Workloads"
    Scripts["Stand-alone Scripts"]:::user
    Notebooks["Jupyter Notebooks"]:::user
  end
  click Notebooks "https://github.com/alleninstitute/abc_atlas_access/tree/main/notebooks/"

  %% Library Components
  subgraph "Library (abc_atlas_access)" 
    Client["abc_atlas_access Client"]:::lib
    subgraph "Cache Layer"
      FileCache["FileCache"]:::cache
      CloudCache["CloudCache"]:::cache
      FileAttributes["File Attributes"]:::cache
      AnndataUtils["Anndata Utilities"]:::cache
    end
    ManifestModule["Manifest Manager"]:::lib
  end
  click Client "https://github.com/alleninstitute/abc_atlas_access/blob/main/src/abc_atlas_access/__init__.py"
  click FileCache "https://github.com/alleninstitute/abc_atlas_access/blob/main/src/abc_atlas_access/abc_atlas_cache/abc_project_cache.py"
  click CloudCache "https://github.com/alleninstitute/abc_atlas_access/blob/main/src/abc_atlas_access/abc_atlas_cache/cloud_cache.py"
  click FileAttributes "https://github.com/alleninstitute/abc_atlas_access/blob/main/src/abc_atlas_access/abc_atlas_cache/file_attributes.py"
  click AnndataUtils "https://github.com/alleninstitute/abc_atlas_access/blob/main/src/abc_atlas_access/abc_atlas_cache/anndata_utils.py"
  click ManifestModule "https://github.com/alleninstitute/abc_atlas_access/blob/main/src/abc_atlas_access/abc_atlas_cache/manifest.py"

  %% External Services & Storage
  API["ABC Atlas Data Service"]:::external
  LocalDisk["Local Disk Storage"]:::storage
  S3["Cloud Storage (S3)"]:::storage

  %% Manifest Builder
  ManifestBuilder["Manifest Builder"]:::tool
  click ManifestBuilder "https://github.com/alleninstitute/abc_atlas_access/blob/main/src/manifest_builder/manifest_builder.py"

  %% Documentation Pipeline
  subgraph "Docs Pipeline"
    MD["Markdown Source"]:::docs
    NotebooksSrc["Notebook Source"]:::docs
    Config["JupyterBook Config"]:::docs
    Static["Static Assets (_static)"]:::docs
    DocsBuilder["JupyterBook Build"]:::tool
    HTML["HTML Output"]:::docs
    GitHubPages["GitHub Pages Hosting"]:::external
  end
  click MD "https://github.com/alleninstitute/abc_atlas_access/tree/main/docs/"
  click Config "https://github.com/alleninstitute/abc_atlas_access/blob/main/_config.yml"
  click Static "https://github.com/alleninstitute/abc_atlas_access/tree/main/_static/"

  %% CI/CD Pipeline
  subgraph "CI/CD Pipeline"
    Tests["Test (pytest)"]:::ci
    DocsDeploy["Deploy Docs"]:::ci
    Pyproject["pyproject.toml"]:::config
  end
  click Tests "https://github.com/alleninstitute/abc_atlas_access/blob/main/.github/workflows/abc_atlas_access_ci.yaml"
  click DocsDeploy "https://github.com/alleninstitute/abc_atlas_access/blob/main/.github/workflows/deploy_book.yaml"
  click Pyproject "https://github.com/alleninstitute/abc_atlas_access/blob/main/pyproject.toml"

  %% Connections
  Scripts -->|uses| Client
  Notebooks -->|imports| Client
  Client -->|requests| API
  Client -->|reads/writes| FileCache
  Client -->|reads/writes| CloudCache
  FileCache -->|stores| LocalDisk
  CloudCache -->|stores| S3
  Client -->|manages| FileAttributes
  Client -->|utilizes| AnndataUtils
  Client -->|interfaces| ManifestModule
  ManifestBuilder -->|uses| ManifestModule
  ManifestBuilder -->|accesses| FileCache
  ManifestBuilder -->|outputs| ManifestModule
  MD --> DocsBuilder
  NotebooksSrc --> DocsBuilder
  Config --> DocsBuilder
  Static --> DocsBuilder
  DocsBuilder --> HTML
  HTML --> GitHubPages
  Tests -->|runs tests on| Client
  Tests -->|runs tests on| ManifestModule
  Tests -->|runs tests on| FileCache
  Tests -->|runs tests on| Utils
  Tests -->|runs| DocsBuilder
  DocsDeploy --> GitHubPages

  %% Styles
  classDef user fill:#E8F1F2,stroke:#2B7A78,color:#17252A;
  classDef lib fill:#D0E8F2,stroke:#204051,color:#0B3D91;
  classDef cache fill:#F1E7D8,stroke:#C99E10,color:#A65F00;
  classDef external fill:#C2FABC,stroke:#2F5233,color:#1B3A34,stroke-dasharray: 5 5;
  classDef storage fill:#F0F4C3,stroke:#827717,color:#33691E;
  classDef tool fill:#FFE0B2,stroke:#EF6C00,color:#BF360C;
  classDef docs fill:#FFF3E0,stroke:#FF8F00,color:#E65100;
  classDef ci fill:#E1BEE7,stroke:#6A1B9A,color:#4A148C;
  classDef config fill:#F3E5F5,stroke:#4A148C,color:#4A148C;
```
