Skip to content

Commit

Permalink
Replace Poetry by uv
Browse files Browse the repository at this point in the history
  • Loading branch information
kdeldycke committed Jul 3, 2024
1 parent b251c38 commit cbd0885
Show file tree
Hide file tree
Showing 16 changed files with 1,613 additions and 1,598 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/autofix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ name: Autofix
jobs:

autofix:
uses: kdeldycke/workflows/.github/workflows/autofix.yaml@v3.5.11
uses: kdeldycke/workflows/.github/workflows/autofix.yaml@v4.1.4
2 changes: 1 addition & 1 deletion .github/workflows/autolock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ name: Autolock
jobs:

autolock:
uses: kdeldycke/workflows/.github/workflows/autolock.yaml@v3.5.11
uses: kdeldycke/workflows/.github/workflows/autolock.yaml@v4.1.4
2 changes: 1 addition & 1 deletion .github/workflows/changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ name: Changelog & versions
jobs:

changelog:
uses: kdeldycke/workflows/.github/workflows/changelog.yaml@v3.5.11
uses: kdeldycke/workflows/.github/workflows/changelog.yaml@v4.1.4
2 changes: 1 addition & 1 deletion .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ name: Docs
jobs:

docs:
uses: kdeldycke/workflows/.github/workflows/docs.yaml@v3.5.11
uses: kdeldycke/workflows/.github/workflows/docs.yaml@v4.1.4

update-docs:
needs: docs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/label-sponsors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ name: Label sponsors
jobs:

label-sponsors:
uses: kdeldycke/workflows/.github/workflows/label-sponsors.yaml@v3.5.11
uses: kdeldycke/workflows/.github/workflows/label-sponsors.yaml@v4.1.4
2 changes: 1 addition & 1 deletion .github/workflows/labeller-content-based.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ name: Labeller (content-based)
jobs:

labeller:
uses: kdeldycke/workflows/.github/workflows/labeller-file-based.yaml@v3.5.11
uses: kdeldycke/workflows/.github/workflows/labeller-file-based.yaml@v4.1.4
2 changes: 1 addition & 1 deletion .github/workflows/labeller-file-based.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ name: Labeller (file-based)
jobs:

labeller:
uses: kdeldycke/workflows/.github/workflows/labeller-file-based.yaml@v3.5.11
uses: kdeldycke/workflows/.github/workflows/labeller-file-based.yaml@v4.1.4
2 changes: 1 addition & 1 deletion .github/workflows/labels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ name: Labels
jobs:

labels:
uses: kdeldycke/workflows/.github/workflows/labels.yaml@v3.5.11
uses: kdeldycke/workflows/.github/workflows/labels.yaml@v4.1.4
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ name: Lint
jobs:

lint:
uses: kdeldycke/workflows/.github/workflows/lint.yaml@v3.5.11
uses: kdeldycke/workflows/.github/workflows/lint.yaml@v4.1.4
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ name: Build & release
jobs:

release:
uses: kdeldycke/workflows/.github/workflows/release.yaml@v3.5.11
uses: kdeldycke/workflows/.github/workflows/release.yaml@v4.1.4
secrets:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
26 changes: 10 additions & 16 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ jobs:
"windows-2019",
},
"python-version": {
"3.8",
"3.9",
"3.10",
"3.11",
Expand All @@ -72,13 +71,6 @@ jobs:
# List of unstable criterions.
unstable: list[dict[str, str]] = [
# Python 3.13-dev is only failing on macOS:
# Building wheel for cffi (pyproject.toml) did not run successfully.
# Failed to build cffi
# ERROR: Could not build wheels for cffi, which is required to install pyproject.toml-based projects
# https://github.com/msgpack/msgpack-python/issues/573
{"python-version": "3.13-dev", "os": "macos-14"},
{"python-version": "3.13-dev", "os": "macos-13"},
# Ignore failing tests on Click development branch, because some top-level classes (BaseCommand,
# MultiCommand and OptionParser) have been removed. See:
# https://github.com/pallets/click/compare/8.1.x...main#diff-768bcdbbdaa3001d4905761c3eed38d5ce6a62b9127df80de90d9ca4e806cacc
Expand Down Expand Up @@ -163,25 +155,27 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install click-extra and its dependencies
- name: Install uv
run: |
python -m pip install --upgrade setuptools pip
python -m pip install --upgrade poetry
poetry install --all-extras --with test --no-interaction
python -m pip install -r https://raw.githubusercontent.com/kdeldycke/workflows/v4.1.4/requirements/uv.txt
- name: Install project
run: |
uv venv --system
uv pip install --all-extras ./pyproject.toml
- name: Install click@${{ matrix.click-version }}
if: matrix.click-version != 'released'
run: |
poetry add git+https://github.com/pallets/click.git#${{ matrix.click-version }}
uv pip install git+https://github.com/pallets/click.git#${{ matrix.click-version }}
- name: Install cloup@${{ matrix.cloup-version }}
if: matrix.cloup-version != 'released'
run: |
poetry add git+https://github.com/janluke/cloup.git#${{ matrix.cloup-version }}
uv pip install git+https://github.com/janluke/cloup.git#${{ matrix.cloup-version }}
- name: Tests
- name: Unittests
run: |
poetry run pytest
uv run pytest
- name: Codecov upload
uses: codecov/codecov-action@v4.5.0
Expand Down
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
> \[!IMPORTANT\]
> This version is not released yet and is under active development.
- Switch from Poetry to `uv`.
- Drop support for Python 3.8.
- Mark Python 3.13-dev tests as stable.

## [4.8.3 (2024-05-25)](https://github.com/kdeldycke/click-extra/compare/v4.8.2...v4.8.3)

- Fix string interpolation in log message.
Expand Down
10 changes: 4 additions & 6 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,10 @@
toml_config = tomllib.loads(toml_path.read_text())

# Redistribute pyproject.toml config to Sphinx.
project_id = toml_config["tool"]["poetry"]["name"]
version = release = toml_config["tool"]["poetry"]["version"]
url = toml_config["tool"]["poetry"]["homepage"]
author = ", ".join(
a.split("<")[0].strip() for a in toml_config["tool"]["poetry"]["authors"]
)
project_id = toml_config["project"]["name"]
version = release = toml_config["project"]["version"]
url = toml_config["project"]["urls"]["Homepage"]
author = ", ".join(author["name"] for author in toml_config["project"]["authors"])

# Title-case each word of the project ID.
project = " ".join(word.title() for word in project_id.split("-"))
Expand Down
Loading

0 comments on commit cbd0885

Please sign in to comment.