mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-23 09:24:31 +02:00
Documentation for Just, closes #494
Also added 'just init' and fixed a couple of missing pipenv run calls.
This commit is contained in:
parent
6b268a1b36
commit
c7cad6fc25
2 changed files with 46 additions and 2 deletions
8
Justfile
8
Justfile
|
|
@ -1,6 +1,10 @@
|
|||
# Run tests and linters
|
||||
@default: test lint
|
||||
|
||||
# Setup project
|
||||
@init:
|
||||
pipenv run pip install -e '.[test,docs,mypy,flake8]'
|
||||
|
||||
# Run pytest with supplied options
|
||||
@test *options:
|
||||
pipenv run pytest {{options}}
|
||||
|
|
@ -10,11 +14,11 @@
|
|||
pipenv run black . --check
|
||||
pipenv run flake8
|
||||
pipenv run mypy sqlite_utils tests
|
||||
cog --check README.md docs/*.rst
|
||||
pipenv run cog --check README.md docs/*.rst
|
||||
|
||||
# Rebuild docs with cog
|
||||
@cog:
|
||||
cog -r README.md docs/*.rst
|
||||
pipenv run cog -r README.md docs/*.rst
|
||||
|
||||
@docs: cog
|
||||
cd docs && pipenv run make livehtml
|
||||
|
|
|
|||
|
|
@ -79,6 +79,46 @@ Both commands can then be run in the root of the project like this::
|
|||
|
||||
All three of these tools are run by our CI mechanism against every commit and pull request.
|
||||
|
||||
Using Just and pipenv
|
||||
=====================
|
||||
|
||||
If you install `Just <https://github.com/casey/just>`__ and `pipenv <https://pipenv.pypa.io/>`__ you can use them to manage your local development environment.
|
||||
|
||||
To create a virtual environment and install all development dependencies, run::
|
||||
|
||||
cd sqlite-utils
|
||||
just init
|
||||
|
||||
To run all of the tests and linters::
|
||||
|
||||
just
|
||||
|
||||
To run tests, or run a specific test module or test by name::
|
||||
|
||||
just test # All tests
|
||||
just test tests/test_cli_memory.py # Just this module
|
||||
just test -k test_memory_no_detect_types # Just this test
|
||||
|
||||
To run just the linters::
|
||||
|
||||
just lint
|
||||
|
||||
To apply Black to your code::
|
||||
|
||||
just black
|
||||
|
||||
To update documentation using Cog::
|
||||
|
||||
just cog
|
||||
|
||||
To run the live documentation server (after building with Cog first)::
|
||||
|
||||
just docs
|
||||
|
||||
And to list all available commands::
|
||||
|
||||
just -l
|
||||
|
||||
.. _release_process:
|
||||
|
||||
Release process
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue