Skip to content
This repository was archived by the owner on Oct 26, 2025. It is now read-only.

Commit 270e6de

Browse files
committed
Switch from poetry to uv. Bump a bunch of versions. Remove unused modules.
1 parent b24866a commit 270e6de

8 files changed

Lines changed: 359 additions & 665 deletions

File tree

.dockerignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@
1414
.mypy_cache
1515
.requirements*
1616
.tox
17+
.venv
1718
.vscode
1819
Pipfile.lock
1920
__pycache__
2021
dev.env
2122
env
2223
pip-wheel-metadata
23-
poetry.lock
24+
venv

.github/workflows/create-release-from-tag.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,15 @@ jobs:
1414
- name: Checkout code
1515
uses: actions/checkout@v4
1616

17-
- name: Install Poetry
18-
run: curl -sSL https://install.python-poetry.org/ | python -
17+
# https://docs.astral.sh/uv/guides/integration/github/
18+
- name: Install uv
19+
uses: astral-sh/setup-uv@v5
1920

2021
- name: Build packages
21-
run: poetry build -f wheel
22+
run: uv build
2223

2324
- name: Create Release
2425
id: create_release
25-
uses: softprops/action-gh-release@v1
26+
uses: softprops/action-gh-release@v2
2627
with:
2728
files: dist/*.whl

.pre-commit-config.yaml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,22 @@
22
exclude: "(venv|.vscode)" # regex
33
repos:
44
- repo: https://github.com/astral-sh/ruff-pre-commit
5-
rev: "v0.7.4"
5+
rev: "v0.13.0"
66
hooks:
7-
- id: ruff
7+
- id: ruff-check
88
args:
99
- "--fix"
1010
- "--exit-non-zero-on-fix"
1111
- "--unsafe-fixes"
1212
- id: ruff-format
1313
- repo: https://github.com/PyCQA/bandit
14-
rev: 1.7.10
14+
rev: 1.8.6
1515
hooks:
1616
- id: bandit
1717
args: ["-s", "B101"]
1818
- repo: https://github.com/pre-commit/pre-commit-hooks
19-
rev: v5.0.0
19+
rev: v6.0.0
2020
hooks:
21-
- id: check-byte-order-marker
2221
- id: check-case-conflict
2322
- id: check-executables-have-shebangs
2423
- id: check-docstring-first
@@ -36,11 +35,10 @@ repos:
3635
- id: mixed-line-ending
3736
args: ["--fix=lf"]
3837
- id: pretty-format-json
39-
- id: requirements-txt-fixer
4038
- id: sort-simple-yaml
4139
- id: trailing-whitespace
4240
- repo: https://github.com/adrienverge/yamllint.git
43-
rev: v1.35.1
41+
rev: v1.37.1
4442
hooks:
4543
- id: yamllint
4644
- repo: https://github.com/Lucas-C/pre-commit-hooks
@@ -49,7 +47,7 @@ repos:
4947
- id: remove-tabs
5048
exclude_types: [makefile, binary]
5149
- repo: https://github.com/danielhoherd/pre-commit-hooks
52-
rev: 976b58ba36fcd3313fed6d5a7abc228cec64f994
50+
rev: 37614dad793bbbdea699c63c8b341ce1e2bf855a
5351
hooks:
5452
- id: CVE-2017-18342
5553
- id: remove-unicode-left-to-right-mark

Makefile

Lines changed: 13 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -37,35 +37,24 @@ docker-push: ## Push built Docker container to Docker Hub
3737

3838
.PHONY: clean
3939
clean: ## Delete build artifacts
40-
rm -f .requirements-dev .requirements || true
41-
find . -name '*.pyc' -delete
42-
find . -name '__pycache__' -delete
43-
rm -rf dist
40+
-rm -rf .venv
41+
-find . -name '*.pyc' -delete
42+
-find . -name '__pycache__' -delete
43+
-rm -rf dist
4444

45-
.PHONY: poetry-clean
46-
poetry-clean: ## Delete poetry virtualenv
47-
poetry env remove --all
48-
rm -fv .requirements
49-
50-
.PHONY: wheel
51-
wheel: ## Build a wheel
52-
poetry build -f wheel
45+
.PHONY: build
46+
build: ## Build a wheel
47+
uv build
5348

5449
.PHONY: test
5550
test: ## Run tests
56-
poetry run pytest tests
57-
58-
.PHONY: requirements-dev
59-
requirements-dev: .requirements-dev ## Install dev requirements
60-
.requirements-dev:
61-
poetry install
62-
touch .requirements-dev .requirements
51+
uv run pytest tests
6352

64-
.PHONY: requirements
65-
requirements: .requirements ## Install requirements
66-
.requirements:
67-
poetry install --no-dev
68-
touch .requirements
53+
.PHONY: venv
54+
venv: .venv ## Install dev requirements
55+
.venv:
56+
uv venv --seed
57+
uv sync
6958

7059
.PHONY: generate-setup.py
7160
generate-setup.py: wheel ## Generate the setup.py file from pyproject.toml

plexdl/plexdl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def print_item_info(self, item, access_token):
6060
except ValueError:
6161
pass
6262
if media_info:
63-
print(f'({", ".join(media_info)})')
63+
print(f"({', '.join(media_info)})")
6464
print(f' {self.item_prefix} "{download_filename}" "{download_url}"')
6565

6666
@staticmethod

poetry.lock

Lines changed: 0 additions & 607 deletions
This file was deleted.

pyproject.toml

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,40 @@
1-
[tool.poetry]
1+
[project]
22
name = "plexdl"
3-
version = "0.4.3"
3+
version = "0.5.0"
44
description = ""
5-
authors = ["Daniel Hoherd <daniel.hoherd@gmail.com>"]
6-
license = "MIT License"
7-
classifiers=[
5+
authors = [
6+
{ name = "Daniel Hoherd", email = "daniel.hoherd@gmail.com" }
7+
]
8+
license = { text = "MIT License" }
9+
classifiers = [
810
"Development Status :: 4 - Beta",
911
"Environment :: Console",
1012
"License :: OSI Approved :: MIT License",
1113
"Programming Language :: Python :: 3",
1214
"Programming Language :: Python :: 3.11",
1315
"Topic :: Utilities",
1416
]
17+
dependencies = [
18+
"humanfriendly>=10.0",
19+
"PlexAPI>=4.16.0",
20+
"requests>=2.32.3",
21+
"typer>=0.13.1",
22+
"humanize>=4.11.0",
23+
]
24+
requires-python = ">=3.11"
1525

16-
[tool.poetry.scripts]
17-
plexdl = 'plexdl.cli:app'
26+
[project.scripts]
27+
plexdl = "plexdl.cli:app"
1828

19-
[tool.poetry.dependencies]
20-
python = "^3.11"
21-
humanfriendly = "^10.0"
22-
importlib-metadata = "^8.5.0"
23-
pendulum = "^3.0.0"
24-
PlexAPI = "^4.16.0"
25-
requests = "^2.32.3"
26-
typer = "^0.13.1"
27-
humanize = "^4.11.0"
2829

29-
[tool.poetry.group.dev.dependencies]
30-
pytest = "^8.2.2"
30+
[dependency-groups]
31+
dev = [
32+
"pytest>=8.4.2",
33+
]
3134

3235
[build-system]
33-
requires = ["poetry>=1.8.0"]
34-
build-backend = "poetry.masonry.api"
36+
requires = ["hatchling"]
37+
build-backend = "hatchling.build"
3538

3639
# https://docs.astral.sh/ruff/settings/
3740
[tool.ruff]

0 commit comments

Comments
 (0)