Skip to content

docs: Add GitHub Pages documentation site (MkDocs Material)#9

Merged
svalench merged 5 commits into
masterfrom
docs/github-pages
Jul 25, 2026
Merged

docs: Add GitHub Pages documentation site (MkDocs Material)#9
svalench merged 5 commits into
masterfrom
docs/github-pages

Conversation

@svalench

@svalench svalench commented Jul 25, 2026

Copy link
Copy Markdown
Owner

What

Adds a complete documentation site for GitHub Pages using MkDocs Material.

Pages (13 total)

Page Content
index.md Landing page with feature cards, 30-second example, feature matrix
getting-started.md Installation (PyPI, extras, from source)
quickstart-sync.md Full sync SQLAlchemy CRUD example with curl tests
quickstart-async.md AsyncBaseViewset with SQLAlchemy 2.x + Pydantic v2
orm-adapters.md SQLAlchemy / Tortoise / Peewee setup, driver matrix, env vars
eager-loading.md RelatedConfig, select_related/prefetch_related, N+1 elimination
overrides.md Subclassing for custom search, ordering, conflict handling
authentication.md OAuth2PasswordBearer on selected CRUD methods
pagination-filtering.md limit/offset, search roadmap, ordering overrides
custom-routes.md add_api_route, permissions, APIRouter integration
api-reference.md BaseViewset, AsyncBaseViewset, register(), ORMFactory, BaseORMAdapter, db_conf, constants
comparison.md vs fastapi-crudrouter, hand-rolled FastAPI
changelog.md v1.1.0 - v1.3.0

Features

  • Material theme with dark/light toggle
  • Search with highlighting
  • Code copy buttons and annotations
  • Tabbed content for multi-DB examples
  • Admonitions (tips, warnings, info)
  • Responsive navigation with sections

CI/CD

GitHub Actions workflow auto-deploys to GitHub Pages on every push to main that touches docs/, mkdocs.yml, or the workflow itself.

pyproject.toml changes

  • Added [docs] optional dependency group (mkdocs, mkdocs-material, pymdown-extensions)
  • Added Documentation URL to [project.urls]

After merge

  1. Go to Settings > Pages in the repo
  2. Under Build and deployment, set Source to GitHub Actions
  3. The workflow will deploy automatically on push to master

The docs will be live at: https://svalench.github.io/fastapi_viewsets/

- mkdocs.yml with Material theme (dark/light, search, code copy, tabs)
- 14 documentation pages covering all features:
  - Landing page with feature cards and 30-second example
  - Installation guide with optional extras
  - Sync and async quickstarts (SQLAlchemy)
  - ORM adapters (SQLAlchemy/Tortoise/Peewee configuration)
  - Declarative eager loading (RelatedConfig)
  - Overriding handlers (custom LIST/POST)
  - OAuth2 authentication
  - Pagination, filtering & ordering
  - Custom routes and permissions
  - Full API reference (classes, methods, constants)
  - Comparison with alternatives
  - Changelog
- GitHub Actions workflow for automatic deploy to GitHub Pages
- docs extra in pyproject.toml
- Documentation URL in project.urls
@codecov

codecov Bot commented Jul 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Alexander Valenchits added 4 commits July 25, 2026 16:31
…mparison claim

- Workflow trigger: branches: [main] -> [master]
- edit_uri: edit/main -> edit/master
- authentication.md: clarify that OAuth2PasswordBearer only requires the header, not full JWT validation
- comparison.md: soften 'No other library offers...' to 'A key differentiator...'
- README: add docs badge and link
…pends, lifespan, workflow

Blockers:
- Replace PEP 604 union syntax (int | None) with Optional[int]/Union[int, str]
  in all doc examples (Python 3.9 compat, requires-python>=3.9)
- Fix broken blob/main links to blob/master (LICENSE, CI badge, RELEASE_NOTES,
  changelog links) — default branch is master
- Fix token parameter in override examples: Optional[str] = None →
  Depends(...) to prevent appearing as query param in OpenAPI
- Add missing 'from sqlalchemy import select' in pagination-filtering.md

Important:
- Remove extra.version.provider: mike (not installed in workflow, causes 404)
- Add pull_request trigger to docs workflow for pre-merge validation
- Use pip install -e .[docs] instead of hardcoded package list
- Guard deploy job with if: github.event_name == 'push'
- Replace deprecated @app.on_event with asynccontextmanager lifespan
- Add warning about non-functional search param in api-reference.md

Minor:
- Fix changelog version order (v1.2.1 after v1.2.0)
- Correct fastapi-crudrouter ORM support description
- Replace deprecated datetime.utcnow() with datetime.now(timezone.utc)
- Add comment for undefined get_current_user in custom-routes.md
- Document register_adapter, reset_default_adapter, serializer_utils, and
  _noop_dependency/butle alias in api-reference.md
- Fix Python 3.9 incompatibility: replace int | None with Optional[int]
  in docs/quickstart-sync.md and 3 README code blocks
- Add public initialize() and close() methods to TortoiseAdapter;
  rewrite Tortoise lifecycle examples in docs/orm-adapters.md and README.md
  to use them instead of manual Tortoise.init() (fixes double-init bug)
- Replace deprecated @app.on_event with lifespan in README async quickstart
- Fix driver matrix: asyncpg is included in [tortoise] extra, not built-in;
  aiomysql must be installed separately
- Clarify that SQLAlchemy is a core dependency in getting-started.md
- Add v1.2.1 and v1.2.2 sections to changelog.md
- Fix language tags: shell commands use bash, HTTP examples use text
- Add security warning for OAuth2 demo token endpoint
- Fix passlib note: not required for the token endpoint example
Mock-based tests that work with or without tortoise-orm installed,
so they run in CI where only [test] extras are available.

Fixes codecov/patch failure on PR #9.
@svalench
svalench merged commit a4d0925 into master Jul 25, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant