Skip to content

Tests & Documentation

SysPlant uses pytest for testing and mkdocs + mkdocstrings for documentation generation.


Running Tests

With Poetry (recommended):

poetry run pytest

Or without Poetry:

python3 -m pytest

For verbose output with short tracebacks:

poetry run pytest tests/ -v --tb=short

Test Coverage

The project currently has 68 tests covering:

  • Abstract base classes
  • NIM code generation (all iterators × all methods)
  • C code generation (all iterators × all methods)
  • Rust code generation (all iterators × all methods)
  • Scramble mode for each language
  • File output verification

Documentation

This project uses mkdocs with:

Writing Docstrings

  1. Use Google-style docstrings (Args:, Returns:, Raises:).
  2. Optionally use AutoDocString in VS Code to scaffold them.

API Reference

The API reference in docs/documentation/README.md uses mkdocstrings module.path directives. They automatically render class and method docs from the source code — no manual generation step needed.

Local Preview

Install doc dependencies and serve locally:

pip install -r docs/requirements.txt
mkdocs serve

Then open http://127.0.0.1:8000.

Build for Production

mkdocs build

The generated site will be in the public/ directory.