Skip to content

Latest commit

 

History

History
59 lines (43 loc) · 1.74 KB

File metadata and controls

59 lines (43 loc) · 1.74 KB

Contributing to smelt

Thanks for your interest in contributing! smelt is maintained by Redrock Software.

Getting started

git clone https://github.com/go-redrock-software/smelt.git
cd smelt
pip install -e ".[all,dev]"

Development workflow

Run all checks before submitting a PR:

ruff check .              # lint
ruff format --check .     # format check
mypy src/smelt            # type check (strict mode)
pytest                    # tests

Code standards

  • Python 3.11+, async throughout
  • All logging to stderr (stdout is MCP JSON-RPC)
  • CPU-heavy work wrapped in asyncio.to_thread()
  • Every backend is optional — smelt must work with any single backend installed
  • No assert for runtime checks — use proper exceptions from smelt.types

Adding a backend

  1. Create src/smelt/backends/your_backend.py implementing BaseConverter
  2. Register it in src/smelt/registry.py
  3. Add an install extra in pyproject.toml
  4. Add tests in tests/backends/
  5. Follow the patterns in SPEC_02_BACKENDS.md

Adding a formatter

  1. Create src/smelt/formatters/your_format.py implementing BaseFormatter
  2. Register it in src/smelt/registry.py
  3. Add tests in tests/formatters/
  4. Follow the patterns in SPEC_03_FORMATTERS.md

Pull requests

  • One feature or fix per PR
  • Include tests for new functionality
  • All CI checks must pass
  • Keep commits focused — squash if needed

Reporting issues

Open an issue at github.com/go-redrock-software/smelt/issues with:

  • What you expected vs what happened
  • Steps to reproduce
  • Python version and installed backends (use the list_backends MCP tool, or pip list | grep smelt)