Skip to content
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
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: astral-sh/setup-uv@v5
with:
enable-cache: true
Expand All @@ -28,6 +30,8 @@ jobs:
python-version: ["3.12", "3.13"]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: astral-sh/setup-uv@v5
with:
enable-cache: true
Expand Down Expand Up @@ -56,6 +60,8 @@ jobs:
--health-retries 5
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Apply schema
env:
PGHOST: localhost
Expand Down Expand Up @@ -105,6 +111,8 @@ jobs:
--health-retries 5
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: astral-sh/setup-uv@v5
with:
enable-cache: true
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ jobs:
id-token: write
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: astral-sh/setup-uv@v5
with:
enable-cache: true
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "lexicons"]
path = lexicons
url = https://github.com/forecast-bio/atdata-lexicon.git
10 changes: 10 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@ uv run ruff check src/ tests/
uv run uvicorn atdata_app.main:app --reload
```

## Lexicon Submodule

The `lexicons/` directory is a git submodule pointing to [forecast-bio/atdata-lexicon](https://github.com/forecast-bio/atdata-lexicon), which contains the authoritative `science.alt.dataset.*` lexicon definitions. The submodule is for reference and CI validation — the Python source code does not read lexicon files at runtime.

After cloning, initialize the submodule:

```bash
git submodule update --init
```

## Architecture

### Data Flow
Expand Down
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ ATProto Network
# Install dependencies
uv sync --dev

# Initialize the lexicon submodule
git submodule update --init

# Set up PostgreSQL (schema auto-applies on startup)
createdb atdata_app

Expand Down Expand Up @@ -135,6 +138,16 @@ uv run ruff check src/ tests/

Tests mock all external dependencies (database, HTTP, identity resolution) using `unittest.mock.AsyncMock`. HTTP endpoint tests use httpx `ASGITransport` for in-process testing without a running server.

### Lexicon Definitions

The `lexicons/` directory is a [git submodule](https://github.com/forecast-bio/atdata-lexicon) containing the authoritative `science.alt.dataset.*` lexicon schemas. Initialize it with:

```bash
git submodule update --init
```

The lexicons are for reference and CI validation. The Python source code uses hardcoded NSID constants and does not read the lexicon JSON files at runtime.

## License

MIT
1 change: 1 addition & 0 deletions lexicons
Submodule lexicons added at ece47a