ArchiPy Documentation Guidelines¶
This document outlines the standards and practices for ArchiPy documentation.
Documentation Structure¶
mkdocs.yml
- Main configuration file for MkDocsdocs/
- Markdown documentation filesindex.md
- Home pageapi_reference/
- API documentationexamples/
- Usage examplesassets/
- Images and other static assets
Writing Documentation¶
Format and Style¶
- Use Markdown syntax for all documentation files
- Follow the Google Python style for code examples
- Include type hints in code samples (using Python 3.13 syntax)
- Include proper exception handling with
raise ... from e
pattern - Group related documentation in directories
- Link between documentation pages using relative links
Code Examples¶
When including code examples:
- Include proper type hints using Python 3.13 syntax (
x: list[str]
notList[str]
) - Demonstrate proper error handling with exception chaining
- Include docstrings with Args, Returns, and Raises sections
- Show realistic use cases that align with ArchiPy's patterns
- Keep examples concise but complete enough to understand usage
Admonitions¶
Use Material for MkDocs admonitions to highlight important information:
Building and Previewing Documentation¶
Preview the documentation locally:
Build the documentation:
Deploy to GitHub Pages:
Documentation Improvement Guidelines¶
When improving documentation:
- Ensure clarity and conciseness
- Include practical, runnable examples
- Explain "why" not just "how"
- Maintain logical navigation
- Use diagrams for complex concepts
- Validate that examples match the current API
- Test code examples to ensure they work correctly