Skip to content

Commit 451abfb

Browse files
authored
Merge pull request #19 from SyntaxArc/docs
Migrate to MkDocs
2 parents c55c6c1 + 17480f0 commit 451abfb

Some content is hidden

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

77 files changed

+4241
-3716
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Deploy MkDocs to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- docs
8+
paths:
9+
- 'docs/**'
10+
- 'mkdocs.yml'
11+
- '.github/workflows/deploy-docs.yml'
12+
13+
permissions:
14+
contents: write
15+
16+
jobs:
17+
deploy:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0 # Fetch all history for proper versioning
24+
25+
- name: Set up Python
26+
uses: actions/setup-python@v5
27+
with:
28+
python-version: '3.13'
29+
cache: 'pip'
30+
31+
- name: Install Poetry
32+
uses: snok/install-poetry@v1
33+
with:
34+
version: 2.0.0
35+
virtualenvs-create: true
36+
virtualenvs-in-project: true
37+
38+
- name: Load cached dependencies
39+
id: cached-poetry-dependencies
40+
uses: actions/cache@v3
41+
with:
42+
path: .venv
43+
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
44+
45+
- name: Install dependencies
46+
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
47+
run: |
48+
poetry install --with docs
49+
50+
- name: Configure Git user
51+
run: |
52+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
53+
git config --local user.name "github-actions[bot]"
54+
55+
- name: Deploy documentation
56+
run: |
57+
poetry run mkdocs gh-deploy --force

.readthedocs.yaml

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,12 @@ build:
1010
tools:
1111
python: "3.13" # Using a stable Python version supported by ReadTheDocs
1212
jobs:
13-
pre_build:
14-
# Generate API docs from source before building
15-
- cd docs && sphinx-apidoc -o source/ ../archipy -f -e -M -T
1613
post_create_environment:
1714
# Install poetry and configure it
1815
- pip install poetry
1916
- poetry config virtualenvs.create false
2017
post_install:
21-
# Ensure we have the latest documentation tools
22-
- pip install --upgrade sphinx sphinx-rtd-theme sphinx-autodoc-typehints sphinx-autoapi
18+
- poetry install --with docs
2319

2420
# Use the latest version of build system
2521
python:
@@ -28,21 +24,22 @@ python:
2824
path: .
2925
extra_requirements:
3026
- docs
31-
- requirements: docs/requirements.txt
27+
- requirements: docs/source/requirements.txt
3228

3329
# Build documentation with maximum extraction settings
34-
sphinx:
35-
configuration: docs/source/conf.py
36-
fail_on_warning: false # Set to true once your docs are stable
37-
builder: html
38-
30+
#sphinx:
31+
# configuration: docs/source/conf.py
32+
# fail_on_warning: false # Set to true once your docs are stable
33+
# builder: html
3934

35+
mkdocs:
36+
configuration: mkdocs.yml
37+
fail_on_warning: false
4038

4139
# Search settings
4240
search:
4341
ranking:
4442
# These paths will be ranked higher in search results
4543
api_reference/*: 2
46-
usage.rst: 3
47-
installation.rst: 3
48-
architecture.rst: 2
44+
installation.md: 3
45+
architecture.md: 2

CLAUDE.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# ArchiPy Development Guide
2+
3+
## Commands
4+
- **Setup**: `poetry install --with dev --all-extras`
5+
- **Format**: `make format` (Black, 120 char line length)
6+
- **Lint**: `make lint` (Ruff + MyPy)
7+
- **Test**: `make behave` (all tests)
8+
- **Single test**: `poetry run behave features/file_name.feature`
9+
- **Specific scenario**: `poetry run behave features/file_name.feature:line_number`
10+
- **All checks**: `make check` (lint + test)
11+
- **Pre-commit hooks**: `make pre-commit`
12+
13+
## Code Style
14+
- **Imports**: Use strict section order: `future → stdlib → third-party → first-party → local`
15+
- **Typing**: Strict typing required with MyPy (`disallow_untyped_defs=true`)
16+
- **Quotes**: Double quotes for inline strings, single quotes for multiline
17+
- **Docstrings**: Google-style docstrings required for all public APIs
18+
- **Naming**: Snake case for functions/vars, PascalCase for classes (enforced by Ruff)
19+
- **Error handling**: Use specific exception types, add to custom_errors.py when needed
20+
- **Line length**: 120 characters maximum
21+
- **Complexity**: Keep McCabe complexity below 10
22+
- **Formatting**: Files end with newline, consistent indent (4 spaces)

Makefile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,4 +140,19 @@ ci: ## Run CI pipeline locally
140140
$(MAKE) test
141141
$(MAKE) build
142142

143+
.PHONY: docs-serve
144+
docs-serve: ## Serve MkDocs documentation locally
145+
@echo "${BLUE}Serving documentation...${NC}"
146+
$(POETRY) run mkdocs serve
147+
148+
.PHONY: docs-build
149+
docs-build: ## Build MkDocs documentation
150+
@echo "${BLUE}Building documentation...${NC}"
151+
$(POETRY) run mkdocs build
152+
153+
.PHONY: docs-deploy
154+
docs-deploy: ## Deploy MkDocs to GitHub Pages
155+
@echo "${BLUE}Deploying documentation...${NC}"
156+
$(POETRY) run mkdocs gh-deploy --force
157+
143158
.DEFAULT_GOAL := help

0 commit comments

Comments
 (0)