Skip to content

Conversation

@cofin
Copy link
Member

@cofin cofin commented Oct 19, 2025

Summary

This PR completes the reference documentation overhaul (Phase 3+) with comprehensive enhancements and critical issue fixes identified in the documentation audit.

Changes

Reference Documentation Enhancements

  • Add CLI Reference (docs/reference/cli.rst)

    • Standalone CLI module documentation with usage examples
    • Covers get_alchemy_group() and add_migration_commands()
    • Links to framework integration and usage guides
  • Enhance Types Reference (docs/reference/types.rst)

    • Organized sections: Core Types, File Storage, Security Types, Encryption Backends, Password Hashers, Mutable Types, Utilities, Constants
    • Explicit class documentation for all exported types
    • Fixes cross-reference warnings (JsonB, HashedPassword, etc.)
  • Enhance Base Reference (docs/reference/base.rst)

    • Organized sections: UUID Models, BigInt Models, NanoID Models, Declarative Base
    • Explicit class documentation for all base classes
    • Fixes cross-reference warnings (UUIDBase, UUIDAuditBase, BigIntAuditBase, etc.)

Critical Fixes

  • Remove Orphaned Files - Deleted 5 old usage files from previous reorganization:

    • docs/usage/cli.rst
    • docs/usage/modeling.rst
    • docs/usage/repositories.rst
    • docs/usage/services.rst
    • docs/usage/types.rst
  • Fix Document References

  • Fix SQL Lexing Error (docs/usage/cli/migrations.rst)

    • Replaced problematic SQL block with proper tab-set syntax
    • Database-specific tabs for PostgreSQL, MySQL, SQLite
    • Uses bash code blocks for shell commands
  • Fix Duplicate Documentation

    • Added :no-index: to CLI reference functions
    • Fixed duplicate object description warnings

Storage Documentation (from previous work)

  • MinIO Configuration - Comprehensive examples with Docker Compose, bucket initialization, environment-based configuration
  • Framework Integration - Fixed Litestar examples, added FastAPI examples with proper tab-set syntax
  • Tag Pattern Example - Enhanced to demonstrate UniqueMixin value

Build Results

Before: 19+ warnings, multiple critical errors
After: 8 warnings (only optional dependencies - expected)

Metrics

  • ✅ Zero critical errors
  • ✅ Zero title level inconsistencies
  • ✅ Zero orphaned document warnings
  • ✅ Zero duplicate label warnings
  • ✅ Zero cross-reference issues for core classes
  • ✅ Zero SQL lexing errors
  • ✅ All tabs render correctly (migrations, storage, framework examples)

Only Remaining Warnings

  • 5 autodoc import warnings for optional password hashers/encryption backends (argon2, passlib, pwdlib, pgcrypto)
  • 3 additional minor warnings from myst parser

Files Changed

Created:

  • docs/reference/cli.rst

Enhanced:

  • docs/reference/types.rst (18 → 156 lines with organized structure)
  • docs/reference/base.rst (11 → 89 lines with organized structure)
  • docs/reference/index.rst (added CLI to toctree)

Fixed:

  • docs/getting-started.rst (document references)
  • docs/index.rst (document references)
  • docs/usage/modeling/advanced.rst (document references, tag pattern)
  • docs/usage/modeling/basics.rst (document references)
  • docs/usage/modeling/index.rst (document references)
  • docs/usage/modeling/relationships.rst (tag pattern parity)
  • docs/usage/cli/migrations.rst (SQL lexing)
  • docs/usage/services/advanced.rst (Query Service examples)
  • docs/usage/storage/configuration.rst (MinIO configuration)
  • docs/usage/storage/obstore.rst (framework integration)

Deleted:

  • 5 orphaned usage files

Testing

# Clean build succeeds
make docs-clean && make docs
# Result: build succeeded, 8 warnings (only optional deps)

# Verify HTML output
ls -lh docs/_build/html/reference/{cli,types,base}.html
# Result: All files created successfully (33K, 425K, 54K)

# Check tabs rendering
grep "tab-set" docs/_build/html/usage/cli/migrations.html
grep "tab-set" docs/_build/html/usage/storage/obstore.html
# Result: All tabs render correctly

Documentation Standards Compliance

  • ✅ No marketing language violations
  • ✅ Factual, technical documentation throughout
  • ✅ Proper autodoc directives with organized structure
  • ✅ Cross-references work correctly
  • ✅ Consistent with sphinx_design and shibuya theme

Checklist

  • Documentation builds successfully
  • All warnings addressed (except expected optional dependency warnings)
  • Cross-references work correctly
  • Tabs render properly in all locations
  • No orphaned documents
  • No duplicate labels
  • No title level inconsistencies
  • Follows AGENTS.md documentation standards

cofin added 4 commits October 18, 2025 21:58
Add custom types documentation for Advanced Alchemy

- Introduced basic types: GUID, DateTimeUTC, JsonB, BigIntIdentity.
- Added file storage types: FileObject, FileObjectList, StoredObject.
- Documented security types: EncryptedString, EncryptedText, PasswordHash.
- Created index for custom types with quick reference and database compatibility.
- Included usage examples and integration patterns for each type.
**Reference Documentation Enhancements:**
- Add standalone CLI reference documentation with usage examples
- Enhance types reference with organized sections for all type categories
- Enhance base reference with explicit documentation for all base classes
- Add explicit class documentation to resolve cross-reference warnings

**Fixes:**
- Remove 5 orphaned usage files from previous reorganization
- Fix unknown document references in getting-started.rst and index.rst
- Fix document references in modeling docs (../types → ../types/index)
- Fix SQL lexing error in migrations.rst with proper tab-set syntax
- Add :no-index: to CLI functions to prevent duplicate documentation

**Storage Documentation:**
- Add comprehensive MinIO configuration examples
- Fix framework integration examples in obstore.rst
- Add tab-set for Litestar and FastAPI file upload patterns
- Correct tag pattern example to show UniqueMixin value

**Build Results:**
- Reduced warnings from 19+ to 8 (only optional dependencies)
- Zero critical errors
- Zero cross-reference issues for core classes
- Clean build with proper tab rendering

Resolves documentation completeness issues identified in Phase 3+ audit.
@github-actions
Copy link

Documentation preview will be available shortly at https://litestar-org.github.io/advanced-alchemy-docs-preview/586

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant