Requirements & Specifications¶
This page lists all requirements and specifications for the sphinx-autodoc-toml project, automatically extracted from our pyproject.toml file.
Detailed Requirements:
- Core Product Features
- Developer Experience Requirements
- Overview
- Core Principles
- Project Structure
- Environment Setup
- Testing Workflow
- Code Quality & Linting
- Documentation
- Build Performance
- Packaging
- Common Development Commands
- Metrics & Goals
- Summary of Requirements
- Supporting Specifications
- Package Publishing & Release
- Future Improvements
- Architecture
- References
All Requirements¶
ID |
Title |
Status |
Tags |
|---|---|---|---|
Sphinx version MUST be 5.0 or higher for modern directive support. |
open |
dependencies |
|
tomlkit MUST be used instead of tomllib to preserve comments. |
open |
dependencies; architecture |
|
Development environment setup MUST be simple and well-documented. |
implemented |
developer-experience; documentation |
|
Dependency installation SHOULD complete in under 10 seconds on average hardware. |
implemented |
developer-experience; performance |
|
Test suite SHOULD complete in under 30 seconds for rapid feedback. |
implemented |
developer-experience; performance; testing |
|
Test coverage reporting MUST be available both in terminal and HTML formats. |
implemented |
developer-experience; testing; quality |
|
All linting tools MUST run in parallel when possible for speed. |
open |
developer-experience; performance; code-quality |
|
Linting errors MUST provide clear explanations and fix suggestions. |
implemented |
developer-experience; code-quality |
|
Developers SHOULD be able to auto-fix most linting issues with a single command. |
implemented |
developer-experience; code-quality |
|
Documentation builds MUST fail on warnings to maintain quality. |
open |
developer-experience; documentation; quality |
|
Documentation SHOULD build in under 15 seconds for quick iteration. |
open |
developer-experience; performance; documentation |
|
Package builds MUST complete in under 5 seconds for rapid iteration. |
implemented |
developer-experience; performance; build |
|
Build errors MUST clearly indicate which file or configuration is problematic. |
implemented |
developer-experience; build; quality |
|
Source distributions MUST include all files needed to run tests and build docs. |
implemented |
developer-experience; packaging; quality |
|
Builds MUST be reproducible using locked dependency versions. |
implemented |
developer-experience; packaging; reproducibility |
|
Pre-commit hooks MUST run the same checks as CI to catch issues early. |
implemented |
developer-experience; code-quality; git; ci-cd |
|
A single command MUST set up the complete development environment. |
implemented |
developer-experience; setup; git-hooks |
|
The project MUST support automated publishing to PyPI on stable releases. |
implemented |
developer-experience; release; ci-cd; pypi |
|
Package publishing MUST use PyPI Trusted Publishing for security. |
implemented |
developer-experience; security; release; pypi |
|
Development versions MUST be automatically published to TestPyPI on main branch pushes. |
implemented |
developer-experience; testing; release; ci-cd |
|
Development version numbers MUST include commit count and hash for traceability. |
implemented |
developer-experience; versioning; release |
|
The publish workflow MUST run tests and linters before publishing. |
implemented |
developer-experience; quality; release; ci-cd |
|
Maintainers SHOULD be able to manually trigger publishing for emergency releases. |
implemented |
developer-experience; release; flexibility |
|
The release process MUST be fully documented for maintainers. |
implemented |
developer-experience; documentation; release |
|
Contributors SHOULD receive immediate feedback when their PR is published to TestPyPI. |
implemented |
developer-experience; testing; ci-cd; feedback |
|
The system SHOULD provide a linter tool to validate TOML-Doc specification compliance. |
planned |
linter; validation; quality |
|
The linter MUST check for Separator Rule violations. |
planned |
linter; validation |
|
The linter MUST check for Attachment Rule violations. |
planned |
linter; validation |
|
The linter SHOULD provide an auto-format mode to fix common issues. |
planned |
linter; formatting; automation |
|
The system MUST parse TOML files while preserving all comments and whitespace. |
implemented |
parser; toml |
|
The system MUST extract all valid doc-comments from TOML files. |
implemented |
parser; extraction |
|
The system MUST validate doc-comments against the Separator Rule. |
implemented |
parser; validation |
|
The system MUST validate doc-comments against the Attachment Rule. |
implemented |
parser; validation |
|
The system MUST support documenting both TOML table headers and key-value pairs. |
implemented |
parser; toml |
|
The system MUST support hierarchical TOML paths (e.g., project.dependencies.pytest). |
implemented |
parser; toml; hierarchy |
|
The system MUST extract the actual TOML content for documented items. |
implemented |
parser; extraction |
|
The system MUST support a doc-comment marker syntax using #: (hash-colon). |
implemented |
toml-doc-spec; syntax |
|
Doc-comment blocks MUST be preceded by at least one empty line (Separator Rule). |
implemented |
toml-doc-spec; validation |
|
Doc-comment blocks MUST NOT be separated from the item they document by any empty lines (Attachment Rule). |
implemented |
toml-doc-spec; validation |
|
Doc-comments MUST support multi-line content. |
implemented |
toml-doc-spec; syntax |
|
The system MUST provide an autodoc-toml Sphinx directive. |
implemented |
sphinx; directive |
|
The autodoc-toml directive MUST accept a file path as its argument. |
implemented |
sphinx; directive |
|
The autodoc-toml directive MUST support both relative and absolute file paths. |
implemented |
sphinx; directive; paths |
|
The system MUST generate proper Sphinx documentation nodes from doc-comments. |
implemented |
sphinx; generation |
|
Doc-comments MUST support embedded Sphinx directives (e.g., sphinx-needs). |
implemented |
sphinx; directives; sphinx-needs |
|
The system MUST provide clear error messages for invalid files or parsing failures. |
implemented |
sphinx; error-handling |
|
The system MUST display TOML content alongside documentation in a collapsible format. |
implemented |
sphinx; ui; usability |
|
All code MUST have test coverage of at least 80%. |
open |
testing; quality |
|
All tests MUST be located in the tests/ directory. |
implemented |
testing |
|
Test coverage MUST be measured and reported. |
implemented |
testing; quality |
|
All tests MUST be runnable via a single 'hatch run test:run' command. |
implemented |
testing; tooling; developer-experience |
All Specifications¶
ID |
Title |
Status |
Tags |
|---|---|---|---|
The build backend MUST be PEP 517 compliant. |
implemented |
tooling |
|
Package installation MUST use uv for improved performance. |
implemented |
tooling; performance; developer-experience |
|
The build backend SHOULD use uv_build for optimal performance. |
implemented |
performance; tooling; developer-experience |
|
Build configuration MUST include tests in source distribution. |
implemented |
packaging; build |
|
Dependencies MUST be locked for reproducible builds across environments. |
implemented |
tooling; reproducibility; developer-experience |
|
Documentation MUST be buildable via 'hatch run docs:build' command. |
implemented |
documentation; tooling; developer-experience |
|
Test commands MUST provide clear, actionable output. |
implemented |
developer-experience; testing |
|
Code formatting MUST be automated and consistent across the project. |
implemented |
developer-experience; code-quality |
|
Documentation MUST demonstrate dogfooding by using autodoc-toml for its own config. |
implemented |
developer-experience; documentation |
|
Package layout MUST follow src-layout convention for clarity. |
implemented |
developer-experience; architecture; project-structure |
|
A single 'hatch run setup' command MUST configure the complete dev environment. |
implemented |
developer-experience; setup; git-hooks |
|
The extension MUST provide an autodoc-toml directive for Sphinx. |
implemented |
sphinx; directive |
|
The autodoc-toml directive MUST accept a file path argument. |
implemented |
sphinx; directive |
|
The extension MUST resolve both relative and absolute file paths. |
implemented |
sphinx; paths |
|
The extension MUST generate proper docutils nodes from doc-comments. |
implemented |
sphinx; generation |
|
The extension MUST use nested_parse to support embedded Sphinx directives. |
implemented |
sphinx; directives |
|
The extension MUST log clear warnings and errors for invalid files. |
implemented |
sphinx; error-handling |
|
The extension MUST display TOML content in collapsible admonitions. |
implemented |
sphinx; ui |
|
The linter tool MUST validate TOML-Doc specification compliance. |
planned |
linter; validation |
|
Linting MUST be runnable via 'hatch run lint:all' command. |
implemented |
code-quality; tooling; developer-experience |
|
The linter MUST check for Separator Rule violations. |
planned |
linter; validation |
|
The linter MUST check for Attachment Rule violations. |
planned |
linter; validation |
|
The linter MUST provide auto-formatting to fix spec violations. |
planned |
linter; formatting |
|
The linter CLI MUST be accessible via the toml-doc-lint command. |
planned |
||
The parser MUST recognize doc-comments marked with #: syntax. |
implemented |
parser; syntax |
|
The parser MUST validate the Separator Rule for doc-comments. |
implemented |
parser; validation |
|
The parser MUST validate the Attachment Rule for doc-comments. |
implemented |
parser; validation |
|
The parser MUST support multi-line doc-comments. |
implemented |
parser; syntax |
|
The parser MUST use tomlkit to preserve comments and whitespace. |
implemented |
parser; toml |
|
The parser MUST extract all valid doc-comments from a TOML file. |
implemented |
parser; extraction |
|
The parser MUST identify and parse TOML table headers. |
implemented |
parser; toml |
|
The parser MUST identify and parse TOML key-value pairs. |
implemented |
parser; toml |
|
The parser MUST determine hierarchical TOML paths for items. |
implemented |
parser; toml; hierarchy |
|
The parser MUST extract TOML content for documented items. |
implemented |
parser; extraction |
|
Line length MUST NOT exceed 100 characters. |
implemented |
code-quality |
|
All function definitions MUST have type annotations. |
implemented |
code-quality; types |
|
Project version MUST follow semantic versioning (semver). |
implemented |
All Tests¶
No needs passed the filters
Requirements Traceability¶
This diagram shows the complete traceability chain from requirements through specifications to tests:
Error
PlantUML is not available!