Testing and Documentation#
Independent Validation and Communication Auxiliary tasks should be structurally isolated into independent locations.
Testing Isolation and Scope#
✅ Validation Target (
src/<mypackage>)The
tests/directory is there to verifying installable code.Tests import and validate functions from
mypackage.
🚫 Strict Ignorance
Tests ignore
scripts/andnotebooks/.Execution endpoints are stateful and lack modularity.
Complex logic must be extracted to
src/before it can be reliably tested.
Dependency Separation via pyproject.toml#
Consolidated Dependency Management
Use the pyproject.toml to declare isolated dependencies for testing and further auxiliary tasks.
📄
pyproject.toml[project]
dependencies = ["pandas", "numpy"]
[project.optional-dependencies]
test = ["pytest", "pytest-cov"]
docs = ["sphinx", "mkdocs"]
⚙️ Isolated Installation
Auxiliary dependencies are strictly isolated and installed only when explicitly requested:
# Modern uv tooling
uv sync --extra test
# Standard pip
pip install -e .[test]