Skip to content

Commit

Permalink
poetry -> uv
Browse files Browse the repository at this point in the history
  • Loading branch information
newAM committed Jan 14, 2025
1 parent df69186 commit 26165fa
Show file tree
Hide file tree
Showing 7 changed files with 1,283 additions and 1,286 deletions.
47 changes: 19 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,28 @@ jobs:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
- uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}
- uses: abatilo/actions-poetry@v4.0.0
- run: poetry install
- run: poetry run ruff check
- run: poetry run ruff format --check
- run: poetry run mypy idasen tests
- run: uv sync --all-extras --dev
- run: uv run ruff check
- run: uv run ruff format --check
- run: uv run mypy idasen tests

docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: astral-sh/setup-uv@v5
with:
python-version: "3.12"
- uses: abatilo/actions-poetry@v4.0.0
- run: uv sync --all-extras --dev
- name: Install bluetooth
run: |
sudo apt update
sudo apt install bluetooth
- run: poetry install
- name: Run sphinx
run: poetry run sphinx-build -W -b html docs public
run: uv run sphinx-build -W -b html docs public
- uses: actions/upload-pages-artifact@v3
with:
path: public
Expand All @@ -66,20 +63,18 @@ jobs:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
- uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}
- uses: abatilo/actions-poetry@v4.0.0
- run: uv sync --all-extras --dev
- name: Install bluetooth
run: |
sudo apt update
sudo apt install bluetooth
- run: poetry install
- name: Run pytest
run: poetry run pytest -vvv --cov=idasen --doctest-modules
run: uv run pytest -vvv --cov=idasen --doctest-modules
- name: Upload coverage data to coveralls.io
run: poetry run coveralls --service=github
run: uv run coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: py${{ matrix.python-version }}
Expand All @@ -91,14 +86,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: astral-sh/setup-uv@v5
with:
python-version: "3.12"
- name: Install Poetry
uses: abatilo/actions-poetry@v4.0.0
- run: poetry install
- run: uv sync --all-extras --dev
- name: Finished
run: poetry run coveralls --finish --service=github
run: uv run coveralls --finish --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -109,12 +102,10 @@ jobs:
needs: [pytest, docs, style]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: astral-sh/setup-uv@v5
with:
python-version: "3.12"
- name: Install Poetry
uses: abatilo/actions-poetry@v4.0.0
- run: poetry install
- run: poetry publish --build
- run: uv sync --all-extras --dev
- run: uv publish
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Changed
- Changed the build system from poetry to uv.

### Removed
- Removed support for end-of-life python version 3.8.

Expand Down
3 changes: 1 addition & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,7 @@ Related projects and packaging:
* `huserben/idasen-rest-bridge`_
* Repository this was forked from: `rhyst/idasen-controller`_

.. _poetry: https://python-poetry.org/
.. _install poetry: https://python-poetry.org/docs/#installation

.. _rhyst/idasen-controller: https://github.com/rhyst/idasen-controller
.. _NixOS package: https://search.nixos.org/packages?channel=unstable&show=idasen&query=idasen
.. _Arch Linux package: https://aur.archlinux.org/packages/idasen
Expand Down
10 changes: 5 additions & 5 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@
master_doc = "index"

# General information about the project.
project = pyproject["tool"]["poetry"]["name"]
project = pyproject["project"]["name"]
year = datetime.datetime.now().year
author = pyproject["tool"]["poetry"]["authors"][0].split("<", 1)[0].rstrip()
author = pyproject["project"]["authors"][0]["name"]
copyright = f"{year}, {author}"
version = pyproject["tool"]["poetry"]["version"]
release = pyproject["tool"]["poetry"]["version"]
version = pyproject["project"]["version"]
release = pyproject["project"]["version"]
language = "en"
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", ".tox"]
pygments_style = "sphinx"
Expand All @@ -67,7 +67,7 @@

# HTML Options
html_theme = "sphinx_rtd_theme"
htmlhelp_basename = pyproject["tool"]["poetry"]["name"]
htmlhelp_basename = pyproject["project"]["name"]
github_user = "newAM"
html_context = {
"display_github": True,
Expand Down
Loading

0 comments on commit 26165fa

Please sign in to comment.