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
6 changes: 3 additions & 3 deletions .cursor/rules/documentation.mdc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
description: Documentation standards for ArchiPy MkDocs pages
description: Documentation standards for ArchiPy Zensical pages
globs: docs/**/*.md
alwaysApply: false
---
Expand Down Expand Up @@ -91,7 +91,7 @@ def get_item(key: str) -> str | None:

When documenting a new adapter, create **both** files:

- `docs/examples/adapters/<name>.md` — example guide with all 5 required sections
- `docs/tutorials/adapters/<name>.md` — example guide with all 5 required sections
- `docs/api_reference/adapters/<name>.md` — API reference with mkdocstrings directives

Then add both entries under the appropriate `nav:` keys in `mkdocs.yml`.
Then add both pages to the appropriate sections of the `nav` array in `zensical.toml`.
5 changes: 2 additions & 3 deletions .cursor/rules/tooling-workflow.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,9 @@ uv run pre-commit run --all-files
## Documentation

```bash
make docs-serve # Live-reload local server (balanced)
make docs-serve-fast # Fast rebuild (skip heavy API gen)
make docs-serve # Live-reload local server
make docs-build # Build static site
make docs-deploy # Deploy to GitHub Pages
make docs-check # Clean, strict production build
```

## Dependency Updates
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,19 @@ on:
- docs
paths:
- 'docs/**'
- 'overrides/**'
- 'archipy/**'
- 'packages/**'
- 'mkdocs*.yml'
- 'zensical.toml'
- 'scripts/check_docs.py'
- 'pyproject.toml'
- 'uv.lock'
- '.python-version'
- '.github/workflows/deploy-docs.yml'
pull_request:
paths:
- 'mkdocs*.yml'
- 'zensical.toml'
- 'scripts/check_docs.py'
- '.python-version'
- '.github/workflows/deploy-docs.yml'

Expand All @@ -37,7 +40,7 @@ jobs:
run: uv sync --locked --group docs

- name: Build documentation
run: uv run --no-sync zensical build --clean -f mkdocs-full.yml
run: uv run --no-sync python scripts/check_docs.py

- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v5
Expand Down
21 changes: 19 additions & 2 deletions .github/workflows/docs-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ on:
branches: [ '*' ]
paths:
- 'docs/**'
- 'mkdocs*.yml'
- 'overrides/**'
- 'zensical.toml'
- 'scripts/check_docs.py'
- 'scripts/smoke_docs.py'
- 'archipy/**'
- 'packages/**'
- 'pyproject.toml'
Expand All @@ -24,6 +27,14 @@ jobs:
container: ghcr.io/astral-sh/uv:0.13.9-trixie
env:
UV_PYTHON: ${{ matrix.python-version }}
services:
redis:
image: redis:8.10.3-alpine
options: >-
--health-cmd "redis-cli ping"
--health-interval 2s
--health-timeout 2s
--health-retries 15
strategy:
fail-fast: false
matrix:
Expand All @@ -38,13 +49,19 @@ jobs:
key: uv-docs-${{ runner.arch }}-${{ matrix.python-version }}-${{ hashFiles('uv.lock') }}

- name: Install dependencies
run: uv sync --locked --group docs
run: uv sync --locked --group docs --extra redis

- name: Build the docs in strict mode
env:
UV_NO_SYNC: "true"
run: make docs-check

- name: Run documentation examples
env:
UV_NO_SYNC: "true"
REDIS__MASTER_HOST: redis
run: make docs-smoke

docs-check:
needs: build
if: always()
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/instrumentor-compat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ jobs:
- name: Install Python
run: uv python install "$UV_PYTHON"
- name: Check instrumentor version ranges
run: ./scripts/check_instrumentor_compat.sh
run: uv run --script scripts/check_instrumentor_compat.py
6 changes: 4 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,10 @@ jobs:
- '!.claude/**'
- '!.idea/**'
- '!LICENSE'
- '!mkdocs.yml'
- '!mkdocs-*.yml'
- '!overrides/**'
- '!zensical.toml'
- '!scripts/check_docs.py'
- '!scripts/smoke_docs.py'
- '!.github/ISSUE_TEMPLATE/**'
- '!.github/workflows/{close-stale-issues,deploy-docs,dependency-review,docs-check,instrumentor-compat,labeler,link-check,pr-merged-issue-comment,publish,ruff-lint,ty-lint}.yml'
- '!.github/labeler.yml'
Expand Down
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ repos:
entry: uv run check-yaml
types:
- yaml
exclude: ^mkdocs
language: system
- id: check-toml
name: check-toml
Expand Down
4 changes: 1 addition & 3 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ build:
curl -fsSL https://astral.sh/uv/0.13.9/install.sh -o /tmp/archipy-uv-install.sh &&
UV_UNMANAGED_INSTALL="$HOME/.local/bin" sh /tmp/archipy-uv-install.sh
- '"$HOME/.local/bin/uv" sync --python 3.15 --locked --group docs'
- >-
"$HOME/.local/bin/uv" run --python 3.15 --no-sync zensical build
-f mkdocs.yml
- '"$HOME/.local/bin/uv" run --python 3.15 --no-sync python scripts/check_docs.py'
- mkdir -p "$READTHEDOCS_OUTPUT/html" && cp -a site/. "$READTHEDOCS_OUTPUT/html/"

search:
Expand Down
37 changes: 12 additions & 25 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ security: ## Run security scan with Bandit
.PHONY: check-instrumentor-compat
check-instrumentor-compat: ## Check whether OTel instrumentors now support the library versions ArchiPy requires
@echo "${BLUE}Checking OpenTelemetry instrumentor compatibility...${NC}"
./scripts/check_instrumentor_compat.sh
$(UV) run --script scripts/check_instrumentor_compat.py

# Features that run at the same time, and how many of those may start a heavy container
BEHAVE_JOBS ?= 8
Expand Down Expand Up @@ -231,44 +231,31 @@ check-mr: ## Run pre-commit only on files changed vs BASE (default master), e.g.
$(PRE_COMMIT) run --files $$CHANGED

.PHONY: docs-serve
docs-serve: ## Serve Zensical documentation locally (balanced mode)
docs-serve: ## Preview documentation locally with live reload
@echo "${BLUE}Serving documentation...${NC}"
$(UV) run --group docs zensical serve -f mkdocs.yml

.PHONY: docs-serve-fast
docs-serve-fast: ## Serve Zensical documentation with fast build (for quick iterations)
@echo "${BLUE}Serving documentation (fast mode)...${NC}"
$(UV) run --group docs zensical serve -f mkdocs-fast.yml

.PHONY: docs-serve-no-api
docs-serve-no-api: ## Serve Zensical documentation without API auto-generation (fastest)
@echo "${BLUE}Serving documentation (no API generation)...${NC}"
ENABLE_MKDOCSTRINGS=false $(UV) run --group docs zensical serve -f mkdocs.yml
$(UV) run --group docs zensical serve

.PHONY: docs-build
docs-build: ## Build Zensical documentation (balanced mode)
docs-build: ## Build the static documentation site
@echo "${BLUE}Building documentation...${NC}"
$(UV) run --group docs zensical build -f mkdocs.yml
$(UV) run --group docs zensical build

.PHONY: docs-check
docs-check: ## Build the docs in strict mode: broken links and API reference errors fail
docs-check: ## Run a clean, strict documentation build
@echo "${BLUE}Checking documentation...${NC}"
$(UV) run --group docs zensical build --strict -f mkdocs.yml
$(UV) run --group docs python scripts/check_docs.py

.PHONY: docs-build-fast
docs-build-fast: ## Build Zensical documentation with fast config
@echo "${BLUE}Building documentation (fast mode)...${NC}"
$(UV) run --group docs zensical build -f mkdocs-fast.yml
.PHONY: docs-smoke
docs-smoke: ## Run the published quickstart and upgrade examples using Redis
$(UV) run --group docs --extra redis python scripts/smoke_docs.py

.PHONY: docs-build-full
docs-build-full: ## Build Zensical documentation with full features (for production)
@echo "${BLUE}Building documentation (full mode)...${NC}"
$(UV) run --group docs zensical build -f mkdocs-full.yml --clean
docs-build-full: docs-check ## Build the production site

.PHONY: docs-time
docs-time: ## Time the documentation build
@echo "${BLUE}Timing documentation build...${NC}"
time $(UV) run --group docs zensical build -f mkdocs.yml
time $(UV) run --group docs zensical build

.PHONY: docs-deploy
docs-deploy: ## Documentation deploys from CI, not locally
Expand Down
20 changes: 4 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,31 +180,19 @@ Support ArchiPy by checking out our amazing sponsors! [View Sponsors](SPONSORS.m

## 📚 Documentation

ArchiPy's documentation has been built with Zensical for improved readability and organization:

- **Modern Interface**: Responsive theme with responsive design
- **Improved Navigation**: Intuitive organization and search
- **Clearer Examples**: Expanded code samples with explanations
- **API Reference**: Auto-generated from source code docstrings
- **Performance Optimized**: Multiple build modes for fast iteration
Zensical builds the documentation with the navigation and API reference settings in `zensical.toml`.

### Quick Start

```bash
# Install documentation dependencies
uv sync --group docs

# Fast mode for quick iterations (10-20s builds)
make docs-serve-fast

# Balanced mode for regular work (30-60s builds)
# Preview the docs with live reload
make docs-serve

# Full production build (2-5min, all features)
make docs-build-full

# Deploy to GitHub Pages
make docs-deploy
# Run the same clean, strict build as CI
make docs-check
```

**See [the quickstart](https://syntaxarc.github.io/ArchiPy/getting-started/quickstart/) for more commands and tips.**
Expand Down
22 changes: 0 additions & 22 deletions docs/404.md

This file was deleted.

18 changes: 9 additions & 9 deletions docs/api_reference/adapters/keycloak.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@ validation, user management, and role-based access control.
Abstract port interface defining the Keycloak adapter contract.

::: archipy.adapters.keycloak.ports
options:
show_root_toc_entry: false
heading_level: 3
options:
heading_level: 3
show_source: false

## Adapters

Concrete Keycloak adapter wrapping the Keycloak REST API for authentication and authorization operations.

::: archipy.adapters.keycloak.adapters
options:
show_root_toc_entry: false
heading_level: 3
options:
heading_level: 3
show_source: false

## Auth Guards

Expand All @@ -49,6 +49,6 @@ Ambiguous organization ownership raises `PermissionDeniedError`; it never falls
See [resource ownership](../../tutorials/adapters/keycloak.md#resource-ownership) for the contract and UUID migration notes.

::: archipy.adapters.keycloak.auth
options:
show_root_toc_entry: false
heading_level: 3
options:
heading_level: 3
show_source: false
Loading
Loading