Skip to content

Latest commit

 

History

History
68 lines (51 loc) · 2.24 KB

CONTRIBUTING.md

File metadata and controls

68 lines (51 loc) · 2.24 KB

Contributing Guide

Setting up a development environment

This assumes that you have rust and cargo installed. We use the workflow recommended by pyo3 and maturin.

Using pip and venv

# fetch this repo
git clone [email protected]:letsql/letsql.git
# prepare development environment (used to build wheel / install in development)
python3 -m venv venv
# activate the venv
source venv/bin/activate
# update pip itself if necessary
python -m pip install -U pip
# install dependencies 
python -m pip install -r requirements-dev.txt
# set up the git hook scripts
pre-commit install

Running the test suite

Install the just command runner, if needed. Download example data to run the tests successfully.

just download-data

To test the code:

# make sure you activate the venv using "source venv/bin/activate" first
maturin develop
just up postgres # some of the tests use postgres
python -m pytest # or pytest

Writing the commit

LETSQL follows the Conventional Commits structure. In brief, the commit summary should look like:

fix(types): make all floats doubles

The type (e.g. fix) can be:

  • fix: A bug fix. Correlates with PATCH in SemVer
  • feat: A new feature. Correlates with MINOR in SemVer
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)

If the commit fixes a GitHub issue, add something like this to the bottom of the description:

fixes #4242

Release Flow

This section is intended for LETSQL maintainers

Steps

  1. Compute the new version number (<version-number>) according to Semantic Versioning rules.
  2. Update the version number in Cargo.toml.
  3. Update the CHANGELOG using git cliff --github-repo letsql/letsql -p CHANGELOG.md --tag v<version-number>, manually add any additional notes (links to blogposts, etc.).
  4. Create commit with message release: <version-number>.
  5. Tag the last commit in main with v<version-number>, push the tag.
  6. Create a GitHub release to trigger the publishing workflow.