SQL Query Generator is an open-source project for natural language to SQL conversion using IBM WatsonX.
Read the README.md to understand the project architecture.
This project uses the same tools as BeeAI Framework:
- Black - Code Formatter
- Ruff - Fast Python Linter
- Commitizen - Conventional Commits
Mise-en-place manages tool versions and runs tasks:
# Install mise
curl https://mise.run | sh
# Trust and install tools
mise trust
mise install
# List available tasks
mise run# Create virtual environment
python3 -m venv venv
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
pip install -r requirements-dev.txt
# Install pre-commit hooks
pre-commit install| Task | Description |
|---|---|
mise run |
Run Streamlit app |
mise check |
Run format check + lint |
mise fix |
Fix formatting and lint issues |
mise format |
Format code with Black |
mise lint |
Lint code with Ruff |
mise test |
Run tests |
mise commit |
Interactive conventional commit |
# Format code
black .
# Check formatting
black --check --diff .
# Lint
ruff check .
# Fix lint issues
ruff check --fix .
# Run tests
python -m pytest tests/ -vWe use Conventional Commits for commit messages:
<type>(<scope>): <subject>
feat: New featurefix: Bug fixdocs: Documentationstyle: Formatting (no code change)refactor: Code refactoringperf: Performance improvementtest: Testschore: Maintenance
agent: Agent modules (beeai, langchain, self-improving)classifier: Query classificationlearning: Self-improving/learning storeui: Streamlit UIdb: Database operationsdocs: Documentation
feat(agent): add context awareness for follow-up queries
fix(classifier): prevent false positives for common words
docs(readme): update installation instructions
perf(learning): add embedding cache for faster lookups# Interactive commit
cz commit
# Or with mise
mise commitPre-commit hooks run automatically on git commit:
- Black - Formats code
- Ruff - Lints and fixes issues
- Commitizen - Validates commit message format
To skip hooks (not recommended):
git commit --no-verify -m "message"- Create a feature branch:
git checkout -b feat/my-feature - Make changes and commit using conventional commits
- Ensure all checks pass:
mise check - Push and create PR
- Line length: 120 characters
- Python version: 3.10+
- All code must pass Black formatting
- All code must pass Ruff linting
- Tests should pass before merging
MIT License - See LICENSE for details.