DC002: HasDocsDirectory
Overview
| Property | Value |
|---|---|
| ID | DC002 |
| Name | HasDocsDirectory |
| Group | documentation |
| Severity | NOTE |
Description
Checks that a docs/ directory exists in the package root.
A dedicated documentation directory is important for:
- API documentation
- User guides and tutorials
- Examples and recipes
What it checks
The check verifies that a docs/ directory exists and is actually a directory (not a file).
How to fix
Create a docs/ directory and add documentation:
mkdir docsPopular documentation tools
| Tool | Description |
|---|---|
| Sphinx | Full-featured, supports reStructuredText and MyST |
| MkDocs | Simple, Markdown-based |
| Quarto | Modern, supports multiple languages |
| quartodoc | API docs for Python with Quarto |
Example structure
docs/
├── index.md # Homepage
├── getting-started.md
├── api/ # API reference
│ └── index.md
├── guides/
│ └── tutorial.md
└── _quarto.yml # or conf.py for Sphinx
Why NOTE severity?
This check is a NOTE (informational) because:
- Small packages may not need dedicated docs
- Documentation might live elsewhere (wiki, external site)
- README.md may be sufficient for simple packages
Configuration
Skip this check
[tool.pycmdcheck]
skip = ["DC002"]CLI
pycmdcheck --skip DC002