diff options
| author | 2025-11-09 16:15:05 +0000 | |
|---|---|---|
| committer | 2025-11-09 20:35:51 +0000 | |
| commit | 1abbaaa631305772082d0f8ceb134510f2a9409a (patch) | |
| tree | 4f5669835fcf6a35835b2b47b9d151473d0aa704 | |
| parent | Set minimum uv version (diff) | |
Replace most references to poetry with uv
| -rw-r--r-- | .dockerignore | 2 | ||||
| -rw-r--r-- | .pre-commit-config.yaml | 25 | ||||
| -rw-r--r-- | dev/README.rst | 2 | ||||
| -rw-r--r-- | docs/README.md | 4 | ||||
| -rw-r--r-- | docs/conf.py | 2 |
5 files changed, 21 insertions, 14 deletions
diff --git a/.dockerignore b/.dockerignore index 3ab95c01..ac5de864 100644 --- a/.dockerignore +++ b/.dockerignore @@ -3,5 +3,5 @@ !pydis_core/ !dev/ !pyproject.toml -!poetry.lock +!uv.lock !README.md diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 33674845..e3f3a09c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v6.0.0 hooks: - id: check-merge-conflict - id: check-toml @@ -11,11 +11,18 @@ repos: - repo: local hooks: - - id: ruff - name: ruff - description: Run ruff linting - entry: poetry run ruff check --force-exclude - language: system - 'types_or': [python, pyi] - require_serial: true - args: [--fix, --exit-non-zero-on-fix] + - id: uv-lock + name: uv-lock + description: "Automatically run 'uv lock' on your project dependencies" + entry: uv lock + language: system + files: ^(uv\.lock|pyproject\.toml|uv\.toml)$ + pass_filenames: false + - id: ruff + name: ruff + description: Run ruff linting + entry: uv run --locked ruff check --force-exclude + language: system + 'types_or': [python, pyi] + require_serial: true + args: [--fix, --exit-non-zero-on-fix] diff --git a/dev/README.rst b/dev/README.rst index 9428d788..648ed9a3 100644 --- a/dev/README.rst +++ b/dev/README.rst @@ -22,7 +22,7 @@ Option 1 - The path provided to install should be the root directory of this project on your machine. That is, the folder which contains the ``pyproject.toml`` file. - Make sure to install in the correct environment. Most Python Discord projects use - poetry, so you can run ``poetry run pip install /path/to/pydis_core``. + uv, so you can run ``uv run -- pip install /path/to/pydis_core``. 3. You can now use features from your local bot-core changes. To load new changes, run the install command again. diff --git a/docs/README.md b/docs/README.md index 6e218f1c..ba9ad369 100644 --- a/docs/README.md +++ b/docs/README.md @@ -12,7 +12,7 @@ Table of contents: ## Building To build the docs, you can use the following task: ```shell -poetry run task docs +uv run task docs ``` The output will be in the [`/docs/build`](.) directory. @@ -42,7 +42,7 @@ The project supports building all different versions at once using [sphinx-multi after version `v7.1.0`. You can run the following command to achieve that: ```shell -poetry run sphinx_multiversion -v docs docs/build -n -j auto -n +uv run sphinx_multiversion -v docs docs/build -n -j auto -n ``` This will build all tags, as well as the main branch. To build branches besides the main one diff --git a/docs/conf.py b/docs/conf.py index fb04d245..39492483 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -35,7 +35,7 @@ REPO_LINK = "https://github.com/python-discord/bot-core" # The full version, including alpha/beta/rc tags release = version = tomli.loads( (PROJECT_ROOT / "pyproject.toml").read_text(encoding="utf-8") -)["tool"]["poetry"]["version"] +)["project"]["version"] # -- General configuration --------------------------------------------------- |