- Python 3.11 or later
- No external dependencies for the library itself
git clone https://github.com/SebTardif/MiniDB.git
cd MiniDB
# Install dev tools
pip install ruff mypy pytest pytest-cov
# Verify everything works
python -m pytest tests/ -v
python main.pyRun these before submitting a PR (CI enforces all of them):
# Lint
ruff check .
# Format
ruff format --check .
# Type check
mypy minidb/
# Tests
python -m pytest tests/ -vThis project uses Conventional Commits for automatic versioning via semantic-release.
Allowed prefixes: feat, fix, docs, style, refactor, perf,
test, build, ci, chore, revert.
Examples:
feat: add DISTINCT keyword supportfix: handle NULL in ORDER BY correctlytest: add edge case tests for JOINdocs: update SQL syntax reference
minidb/
database.py # MiniDB main class (facade)
parser.py # SQL lexer and parser
query.py # Query execution engine
table.py # Table storage and row management
column.py # Column and Schema definitions
index.py # Hash-based indexing
planner.py # Query planner (index vs table scan)
persistence.py # JSON serialization
types.py # Type definitions and enums
errors.py # Custom exception hierarchy
tests/
test_*.py # Test files matching source modules