mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-09-16 21:44:10 +02:00
Merge branch 'main' into quotes-not-braces
This commit is contained in:
commit
b6e0885aa6
3 changed files with 19 additions and 22 deletions
28
Justfile
28
Justfile
|
|
@ -1,30 +1,32 @@
|
||||||
# Run tests and linters
|
# Run tests and linters
|
||||||
@default: test lint
|
@default: test lint
|
||||||
|
|
||||||
# Setup project
|
|
||||||
@init:
|
|
||||||
pipenv run pip install -e '.[test,docs,mypy,flake8]'
|
|
||||||
|
|
||||||
# Run pytest with supplied options
|
# Run pytest with supplied options
|
||||||
@test *options:
|
@test *options:
|
||||||
pipenv run pytest {{options}}
|
just run pytest {{options}}
|
||||||
|
|
||||||
|
@run *options:
|
||||||
|
uv run --isolated --with-editable '.[test,mypy,flake8,docs]' -- {{options}}
|
||||||
|
|
||||||
# Run linters: black, flake8, mypy, cog
|
# Run linters: black, flake8, mypy, cog
|
||||||
@lint:
|
@lint:
|
||||||
pipenv run black . --check
|
just run black . --check
|
||||||
pipenv run flake8
|
just run flake8
|
||||||
pipenv run mypy sqlite_utils tests
|
just run mypy sqlite_utils tests
|
||||||
pipenv run cog --check README.md docs/*.rst
|
just run cog --check README.md docs/*.rst
|
||||||
pipenv run codespell docs/*.rst --ignore-words docs/codespell-ignore-words.txt
|
just run codespell docs/*.rst --ignore-words docs/codespell-ignore-words.txt
|
||||||
|
|
||||||
# Rebuild docs with cog
|
# Rebuild docs with cog
|
||||||
@cog:
|
@cog:
|
||||||
pipenv run cog -r README.md docs/*.rst
|
just run cog -r README.md docs/*.rst
|
||||||
|
|
||||||
# Serve live docs on localhost:8000
|
# Serve live docs on localhost:8000
|
||||||
@docs: cog
|
@docs: cog
|
||||||
cd docs && pipenv run make livehtml
|
#!/usr/bin/env bash
|
||||||
|
cd docs
|
||||||
|
uv run --isolated --with-editable '../.[test,docs]' make livehtml
|
||||||
|
|
||||||
|
|
||||||
# Apply Black
|
# Apply Black
|
||||||
@black:
|
@black:
|
||||||
pipenv run black .
|
just run black .
|
||||||
|
|
|
||||||
|
|
@ -81,15 +81,10 @@ All three of these tools are run by our CI mechanism against every commit and pu
|
||||||
|
|
||||||
.. _contributing_just:
|
.. _contributing_just:
|
||||||
|
|
||||||
Using Just and pipenv
|
Using Just and uv
|
||||||
=====================
|
=================
|
||||||
|
|
||||||
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.
|
If you install `Just <https://github.com/casey/just>`__ and `uv <https://github.com/astral-sh/uv>`__ 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::
|
To run all of the tests and linters::
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ build-backend = "setuptools.build_meta"
|
||||||
max-line-length = 160
|
max-line-length = 160
|
||||||
# Black compatibility, E203 whitespace before ':':
|
# Black compatibility, E203 whitespace before ':':
|
||||||
extend-ignore = ["E203"]
|
extend-ignore = ["E203"]
|
||||||
exclude = [".venv"]
|
extend-exclude = [".venv", "build", "dist", "docs", "sqlite_utils.egg-info"]
|
||||||
|
|
||||||
[tool.setuptools.package-data]
|
[tool.setuptools.package-data]
|
||||||
sqlite_utils = ["py.typed"]
|
sqlite_utils = ["py.typed"]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue