You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use `uv run` to run the development version of the tool:
24
22
25
-
pipenv shell
26
-
27
-
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.
23
+
uv run sqlite-utils --help
28
24
29
25
.. _contributing_tests:
30
26
31
27
Running the tests
32
28
=================
33
29
34
-
To install the dependencies and test dependencies::
35
-
36
-
pip install -e '.[test]'
37
-
38
-
To run the tests::
30
+
Use `uv run` to run the tests:
39
31
40
-
pytest
32
+
uv run pytest
41
33
42
34
.. _contributing_docs:
43
35
44
36
Building the documentation
45
37
==========================
46
38
47
-
To build the documentation, first install the documentation dependencies::
39
+
To build the documentation run this command::
48
40
49
-
pip install -e '.[docs]'
41
+
uv run make livehtml --directory docs
50
42
51
-
Then run ``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 ``.rst`` file::
43
+
This will start a server on port 8000 that will serve the documentation and live-reload any time you make an edit to a ``.rst`` file.
52
44
53
45
cd docs
54
46
make livehtml
55
47
56
48
The `cog <https://github.com/nedbat/cog>`__ tool is used to maintain portions of the documentation. You can run it like so::
57
49
58
-
cog -r docs/*.rst
50
+
uv run cog -r docs/*.rst
59
51
60
52
.. _contributing_linting:
61
53
@@ -64,18 +56,12 @@ Linting and formatting
64
56
65
57
``sqlite-utils`` uses `Black <https://black.readthedocs.io/>`__ for code formatting, and `flake8 <https://flake8.pycqa.org/>`__ and `mypy <https://mypy.readthedocs.io/>`__ for linting and type checking.
66
58
67
-
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::
68
-
69
-
black .
70
-
71
-
To install ``mypy`` and ``flake8`` run the following::
72
-
73
-
pip install -e '.[flake8,mypy]'
59
+
uv run black .
74
60
75
-
Both commands can then be run in the root of the project like this::
61
+
Linting tools can be run like this::
76
62
77
-
flake8
78
-
mypy sqlite_utils
63
+
uv run flake8
64
+
uv run mypy sqlite_utils
79
65
80
66
All three of these tools are run by our CI mechanism against every commit and pull request.
0 commit comments