sqlite-utils takes place in the sqlite-utils GitHub repository.
All improvements to the software should start with an issue. Read How I build a feature for a detailed description of the recommended process for building bug fixes or enhancements.
Obtaining the code#
To work on this library locally, first checkout the code. Then create a new virtual environment:
git clone firstname.lastname@example.org:simonw/sqlite-utils cd sqlite-utils python3 -mvenv venv source venv/bin/activate
Or if you are using
Within the virtual environment running
sqlite-utils should run your locally editable version of the tool. You can use
which sqlite-utils to confirm that you are running the version that lives in your virtual environment.
Running the tests#
To install the dependencies and test dependencies:
pip install -e '.[test]'
To run the tests:
Building the documentation#
To build the documentation, first install the documentation dependencies:
pip install -e '.[docs]'
make livehtml from the
docs/ directory to start a server on port 8000 that will serve the documentation and live-reload any time you make an edit to a
cd docs make livehtml
The cog tool is used to maintain portions of the documentation. You can run it like so:
cog -r docs/*.rst
Linting and formatting#
Black is installed as part of
pip install -e '.[test]' - you can then format your code by running it in the root of the project:
flake8 run the following:
pip install -e '.[flake8,mypy]'
Both commands can then be run in the root of the project like this:
flake8 mypy sqlite_utils
All three of these tools are run by our CI mechanism against every commit and pull request.