Read CONTRIBUTING.md for code style, linting (e.g. make lint, make fmt), and release process.
- When adding tests to a file that already uses class-based pytest structure (e.g.
tests/test_jsonld.py), add them as methods on the appropriate existing class — do not introduce a parallel standalone function-based test. A repo-wide refactor to function-based tests is planned but not yet landed; until then, match each file's existing structure. - For brand-new test files, prefer function-based pytest tests (module-level
def test_...) over class-based tests. - Use descriptive test names that reflect behavior (e.g.
test_remote_context_via_link_alternate).
- Put docs-specific CSS in
docs/stylesheets/extra.cssand register it viaextra_cssinmkdocs.yml. - Put runnable doc examples in
docs/examples/and embed them with theexample()macro indocs_macros.py. - One page = one idea — do not combine unrelated topics on a single doc page.
- Python object names in docs must always use backticks — in prose, headings, and card link text (not
__bold__). - Doc examples must not use
set_document_loader(); passdocumentLoaderper operation viaoptions. - Do not use or mention function-based document loaders (
requests_document_loader,aiohttp_document_loader, or plain callables) in docs; use*DocumentLoaderclasses or aDocumentLoadersubclass. - Doc page H1 headers should use icons that match their card icons (e.g.
# :material-cloud-download: \RequestsDocumentLoader``). - Custom document-loader docs should illustrate subclassing
DocumentLoader, not a bare callable.
- Prefer one file per commit
- Base the commit message on the diff of the file that you are going to commit
- Prefer one line commit messages
- Do not co-author commits