Development Setup
Set up a development environment for contributing to StructKit.
Prerequisites
- Python 3.8 or higher
- Git
- Virtual environment tool (venv, virtualenv, or conda)
Getting Started
Terminalbash
# Clone the repository
git clone https://github.com/httpdss/structkit.git
cd struct
# Create virtual environment
python3 -m venv .venv
source .venv/bin/activate
# Install dependencies
pip install -r requirements.txt
pip install -r requirements.dev.txt
pip install -e .
# Verify installation
structkit --helpRunning Tests
Terminalbash
# Run all tests
pytest
# Run with coverage
pytest --cov=structkit
# Run specific test file
pytest tests/test_specific.pyCode Quality
Terminalbash
# Format code
black .
# Sort imports
isort .
# Lint
flake8 .
# Type checking
mypy structkit/
# Install pre-commit hooks
pre-commit installProject Structure
structkit/
├── structkit/ # Main Python package
│ ├── commands/ # CLI command implementations
│ ├── contribs/ # Built-in structure templates
│ └── ...
├── tests/ # Test files
├── docs/ # Documentation
├── example/ # Example configurations
├── scripts/ # Utility scripts
└── requirements*.txt # DependenciesDebugging
Terminalbash
# Enable debug logging
structkit --log=DEBUG generate my-config.yaml ./output