1. Run make install-uv to install uv if not already installed
1. Run make install to install all dependencies and pre-commit hooks
- Fork the sqlspec repository
- Clone your fork locally with git
- Set up the environment
- Make your changes
- Run
make lintto run linters and formatters. This step is optional and will be executed automatically by git before you make a commit, but you may want to run it manually in order to apply fixes - Commit your changes to git
- Push the changes to your fork
- Open a pull request. Give the pull request a descriptive title
indicating what it changes. If it has a corresponding open issue, the issue number should be included in the title as
well. For example a pull request that fixes issue
bug: Increased stack size making it impossible to find needle #100could be titledfix(#100): Make needles easier to find by applying fire to haystack
Tip
Pull requests and commits all need to follow the Conventional Commit format
- All code should be fully typed. This is enforced via mypy.
- All code should be tested. This is enforced via pytest.
- All code should be properly formatted. This is enforced via black and Ruff.
- Logger names must follow the
sqlspec.<module>hierarchy. - Always obtain loggers via
sqlspec.utils.logging.get_loggerto ensure filters are attached. - Use static event names in structured logs and include context fields instead of dynamic message strings.
.. todo:: Write this section
The documentation is located in the /docs directory and is ReST and
Sphinx. If you're unfamiliar with any of those,
ReStructuredText primer and
Sphinx quickstart are recommended reads.
You can serve the documentation with make docs-serve, or build them with make docs.
SQLSpec uses VHS to record terminal demos as GIF files that are embedded in the documentation.
Requirements: VHS, ffmpeg, ttyd
Installation:
go install github.com/charmbracelet/vhs@latestRecording demos:
make docs-demosThis will process every .tape file in docs/_tapes/ and write GIF output to
docs/_static/demos/.
Creating a new tape:
- Create a new
.tapefile indocs/_tapes/. - Use the standard header (see existing tapes for examples). All tapes should use
the
Catppuccin Mochatheme, font size 14, and 1000x600 dimensions. - Use
Hide/Showcommands to hide setup steps like virtual environment activation. - Include generous
Sleepdurations after commands that produce output. - Run
make docs-demosto generate the GIF. - Reference the GIF in your documentation with an
.. image::directive pointing to/_static/demos/<name>.gif.
Building docs with demos:
make docs-all- Increment the version in pyproject.toml.
Note
The version should follow semantic versioning and PEP 440.
Draft a new release on GitHub
- Use
vMAJOR.MINOR.PATCH(e.g.v1.2.3) as both the tag and release title - Fill in the release description. You can use the "Generate release notes" function to get a draft for this
- Use
Commit your changes and push to
mainPublish the release
Go to Actions and approve the release workflow
Check that the workflow runs successfully