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]'
30
+
Use ``uv run`` to run the tests::
37
31
38
-
To run the tests::
39
-
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::
48
-
49
-
pip install -e '.[docs]'
39
+
To build the documentation run this command::
50
40
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::
41
+
uv run make livehtml --directory docs
52
42
53
-
cd docs
54
-
make livehtml
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.
55
44
56
45
The `cog <https://github.com/nedbat/cog>`__ tool is used to maintain portions of the documentation. You can run it like so::
57
46
58
-
cog -r docs/*.rst
47
+
uv run cog -r docs/*.rst
59
48
60
49
.. _contributing_linting:
61
50
62
51
Linting and formatting
63
52
======================
64
53
65
-
``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.
54
+
``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
55
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::
56
+
uv run black .
68
57
69
-
black .
58
+
Linting tools can be run like this::
70
59
71
-
To install ``mypy`` and ``flake8`` run the following::
72
-
73
-
pip install -e '.[flake8,mypy]'
74
-
75
-
Both commands can then be run in the root of the project like this::
76
-
77
-
flake8
78
-
mypy sqlite_utils
60
+
uv run flake8
61
+
uv run mypy sqlite_utils
79
62
80
63
All three of these tools are run by our CI mechanism against every commit and pull request.
81
64
82
65
.. _contributing_just:
83
66
84
-
Using Just and uv
85
-
=================
67
+
Using Just
68
+
==========
86
69
87
-
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.
70
+
If you install `Just <https://github.com/casey/just>`__ you can use it to manage your local development environment.
0 commit comments