Development Setup
Prerequisites
Before starting development, ensure you have:
Python 3.12 or 3.13
Rust toolchain (for building native extensions)
UV package manager (recommended)
Quick Setup
Clone and set up the development environment:
git clone https://github.com/Whth/fabricatio.git
cd fabricatio
make init
make dev
Alternative Setup with UV
Using UV with maturin for development:
git clone https://github.com/Whth/fabricatio.git
cd fabricatio
uvx --with-editable . maturin develop --uv -r
Development Commands
Initialize Development Environment:
make init
Build in Development Mode:
make dev
Run Tests:
make test
# or
make tests
Fix Linting Issues:
make fix
Build Distribution:
make bdist
Generate Subpackages:
make rs # Generate Rust subpackage
make py # Generate Python subpackage
Project Structure
The project follows a workspace structure with multiple packages:
packages/- Individual fabricatio subpackagespython/- Main Python source codesrc/- Rust source codeexamples/- Usage examplesdocs/- Documentation sourcetests/- Test suite
Testing
Run the full test suite:
make tests
For specific test configurations, check the pytest.ini_options in pyproject.toml.
Code Quality
The project uses several tools for code quality:
Ruff for linting and formatting
PyRight for type checking
Pytest for testing
Run linting and auto-fix issues:
make fix
Building Documentation
To build the documentation locally:
cd docs
make html
The documentation will be available in docs/build/html/.
Debugging
For debugging with visual tracing:
# Install viztracer (included in dev dependencies)
viztracer your_script.py
This will generate trace files that can be viewed in the VizTracer viewer.