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 c1e43cf commit 30211b6
Show file tree
Hide file tree
Showing 6 changed files with 788 additions and 939 deletions.
58 changes: 19 additions & 39 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,23 @@ 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: poetry run ruff check
- run: poetry run ruff format --check
- run: uv sync --all-extras --dev
- run: uv run ruff check
- run: uv run ruff format --check

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"
- name: Install Poetry
uses: abatilo/actions-poetry@v4.0.0
- name: Poetry Install
run: poetry install
- name: Run sphinx
run: poetry run sphinx-build -W -b html docs public
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
- run: uv sync --all-extras --dev
- run: uv run sphinx-build -W -b html docs public
- uses: actions/upload-pages-artifact@v3
with:
path: public

Expand All @@ -63,18 +56,13 @@ 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 }}
- name: Install Poetry
uses: abatilo/actions-poetry@v4.0.0
- name: Poetry Install
run: poetry install
- name: Run pytest
run: poetry run pytest -vvv --cov=monitorcontrol
- run: uv sync --all-extras --dev
- name: uv run pytest -vvv --cov=monitorcontrol
- 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 @@ -86,15 +74,11 @@ 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
- name: Poetry Install
run: poetry install
- name: Finished
run: poetry run coveralls --finish --service=github
- run: uv sync --all-extras --dev
- run: uv run coveralls --finish --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -108,14 +92,10 @@ jobs:
- 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
- name: Poetry Install
run: poetry install
- name: Poetry publish
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 @@ -10,6 +10,9 @@ as of version 2.1.1.
### Added
- Added additional logging for Windows API calls.

### Changed
- Changed the build system from poetry-core to setuptools.

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

Expand Down
8 changes: 4 additions & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,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"2019 - {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 Down
Loading

0 comments on commit 30211b6

Please sign in to comment.