Development Guide¶
Testing¶
We use pytest for testing. The tests are located in the tests directory. To run the tests, use:
uv run pytest
Recent Fixes¶
Updated the expected output in
tests/test_PCBdraw.pyto match the current output format (removed leading spaces) while maintaining strict test assertions.
Code Quality¶
We use the following tools to maintain code quality:
Black: For code formatting. Run with:
uv run black .
isort: For import sorting. Run with:
uv run isort .
Ruff: For linting. Run with:
uv run ruff check .
Dependency Management¶
We use uv for dependency management. To sync dependencies, run:
uv sync
Building Documentation¶
To build the documentation using Sphinx, run:
uv run sphinx-build -b html docs docs/_build/html
The built documentation will be available in docs/_build/html.
Development with uv¶
We use uv for fast Python package and dependency management:
Install uv: Follow the official installation guide.
Sync Dependencies: Run
uv syncto create/update the virtual environment with locked dependencies.Run Commands: Use
uv run <command>to run commands in the project environment.Add Dependencies: Use
uv add <package>to add new dependencies (automatically updatesuv.lock).