From bc61c71d42561daa3aacc07838b969767ac06819 Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Fri, 1 May 2026 20:00:20 -0500 Subject: [PATCH] Recommend uv and move default venv location to .venv --- .gitignore | 2 +- README.rst | 9 +++++++-- docs/installation.rst | 5 +++++ pyproject.toml | 2 +- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index be3378f..ea4d4a1 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,4 @@ __pycache__ build dist docs/_build -venv +.venv diff --git a/README.rst b/README.rst index f29299d..4e893bd 100644 --- a/README.rst +++ b/README.rst @@ -57,10 +57,14 @@ You can install the development version of the bot:: git clone https://github.com/earwig/earwigbot.git cd earwigbot - python3 -m venv venv - . venv/bin/activate + python3 -m venv .venv + . .venv/bin/activate pip install -e '.[crypto,sql,copyvios,dev]' +Or with `uv`_:: + + uv sync --all-extras + To run the bot's unit tests, run ``pytest`` (requires the ``dev`` dependencies). Coverage is currently rather incomplete. @@ -180,6 +184,7 @@ docstrings`_ to learn how to use it in a more hands-on fashion. For reference, .. _Python Package Index: https://pypi.python.org/pypi/earwigbot .. _Toolforge: https://wikitech.wikimedia.org/wiki/Portal:Toolforge .. _this StackOverflow post: https://stackoverflow.com/questions/6504810/how-to-install-lxml-on-ubuntu/6504860#6504860 +.. _uv: https://docs.astral.sh/uv/ .. _documentation: https://pythonhosted.org/earwigbot/ .. _earwigbot.bot.Bot: https://github.com/earwig/earwigbot/blob/main/earwigbot/bot.py .. _earwigbot.config.BotConfig: https://github.com/earwig/earwigbot/blob/main/earwigbot/config.py diff --git a/docs/installation.rst b/docs/installation.rst index ab4be13..4a67101 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -40,6 +40,10 @@ You can install the development version of the bot:: . venv/bin/activate pip install -e '.[crypto,sql,copyvios,dev]' +Or with `uv`_:: + + uv sync --all-extras + To run the bot's unit tests, run :command:`pytest` (requires the ``dev`` dependencies). Coverage is currently rather incomplete. @@ -48,3 +52,4 @@ dependencies). Coverage is currently rather incomplete. .. _Python Package Index: https://pypi.python.org/pypi/earwigbot .. _Toolforge: https://wikitech.wikimedia.org/wiki/Portal:Toolforge .. _this StackOverflow post: https://stackoverflow.com/questions/6504810/how-to-install-lxml-on-ubuntu/6504860#6504860 +.. _uv: https://docs.astral.sh/uv/ diff --git a/pyproject.toml b/pyproject.toml index 18e76be..c9a72f0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ build-backend = "setuptools.build_meta" [tool.pyright] pythonVersion = "3.11" venvPath = "." -venv = "venv" +venv = ".venv" [tool.ruff] target-version = "py311"