Skip to content

Commit a2f5b1f

Browse files
authored
Merge pull request #31 from AllenInstitute/feature/add-mkdocs
Add documentation page (powered by mkdocs)
2 parents 301654d + 99c18ae commit a2f5b1f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+4124
-1317
lines changed

.github/workflows/publish_docs.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Publish Docs
2+
on:
3+
push:
4+
branches: [main]
5+
paths: [mkdocs.yml, docs/**, src/**]
6+
workflow_dispatch:
7+
8+
jobs:
9+
build-deploy:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Install uv
16+
uses: astral-sh/setup-uv@v7
17+
- name: Sync dependencies
18+
run: make install
19+
- name: Build site
20+
run: make docs-build
21+
- name: Deploy to GitHub Pages
22+
uses: peaceiris/actions-gh-pages@v4
23+
with:
24+
github_token: ${{ secrets.GITHUB_TOKEN }}
25+
publish_dir: build/documentation/site
26+
publish_branch: gh-pages
27+
force_orphan: true

Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,17 @@ coverage-server: install ## Run coverage server
150150

151151
.PHONY: coverage-server
152152

153+
########################
154+
##@ Documentation Commands
155+
########################
156+
157+
docs-serve: .uv ## Serve MkDocs site locally
158+
uv run mkdocs serve --watch-theme
159+
160+
docs-build: .uv ## Build MkDocs site into build/documentation/site
161+
uv run mkdocs build --clean
162+
163+
.PHONY: docs-serve docs-build
153164

154165
#####################
155166
##@ Docker Commands

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# AIBS Informatics AWS Lambda
22

3+
[![Docs](https://img.shields.io/badge/docs-online-blue.svg)](https://alleninstitute.github.io/aibs-informatics-aws-lambda/)
34
[![Build Status](https://github.com/AllenInstitute/aibs-informatics-aws-lambda/actions/workflows/build.yml/badge.svg)](https://github.com/AllenInstitute/aibs-informatics-aws-lambda/actions/workflows/build.yml)
45
[![codecov](https://codecov.io/gh/AllenInstitute/aibs-informatics-aws-lambda/graph/badge.svg?token=SEHNFMIX4G)](https://codecov.io/gh/AllenInstitute/aibs-informatics-aws-lambda)
56

docs/api/common/api/handler.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# API Lambda Handler
2+
3+
Base class for creating API Gateway Lambda handlers.
4+
5+
---
6+
7+
::: aibs_informatics_aws_lambda.common.api.handler

docs/api/common/api/resolver.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# API Resolver
2+
3+
Utility class for building API Gateway resolvers.
4+
5+
---
6+
7+
::: aibs_informatics_aws_lambda.common.api.resolver

docs/api/common/base.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Base
2+
3+
Base utilities and helpers for Lambda handlers.
4+
5+
---
6+
7+
::: aibs_informatics_aws_lambda.common.base

docs/api/common/handler.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Lambda Handler
2+
3+
Base class for creating strongly typed Lambda functions with serialization, logging, and metrics support.
4+
5+
---
6+
7+
::: aibs_informatics_aws_lambda.common.handler

docs/api/common/index.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Common
2+
3+
The `common` module provides base classes and utilities for creating Lambda handlers.
4+
5+
## Overview
6+
7+
| Module | Description |
8+
|--------|-------------|
9+
| [Handler](handler.md) | `LambdaHandler` base class |
10+
| [Base](base.md) | Base utilities and helpers |
11+
| [Logging](logging.md) | Logging configuration and utilities |
12+
| [Metrics](metrics.md) | Metrics collection utilities |
13+
| [Models](models.md) | Common data models |
14+
| [API](api/handler.md) | API Gateway handler utilities |
15+
16+
## Quick Start
17+
18+
```python
19+
from aibs_informatics_aws_lambda.common.handler import LambdaHandler
20+
21+
class MyHandler(LambdaHandler):
22+
def handle(self, event, context):
23+
return {"status": "success"}
24+
25+
# Export handler for AWS Lambda
26+
handler = MyHandler().get_handler()
27+
```

docs/api/common/logging.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Logging
2+
3+
Logging configuration and utilities for Lambda handlers.
4+
5+
---
6+
7+
::: aibs_informatics_aws_lambda.common.logging

docs/api/common/metrics.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Metrics
2+
3+
Metrics collection utilities for Lambda handlers.
4+
5+
---
6+
7+
::: aibs_informatics_aws_lambda.common.metrics

0 commit comments

Comments
 (0)