Skip to content

Commit

Permalink
build: Update deps, migrate to PEP621-compatible metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
janw committed Jan 5, 2025
1 parent b91c8ec commit 75a6c93
Show file tree
Hide file tree
Showing 10 changed files with 158 additions and 111 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests-brew.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

- name: Install poetry + poetry-brew
run: |
pipx install 'poetry>=1.7.0'
pipx install 'poetry>=2.0.0'
pipx inject poetry poetry-homebrew-formula
- name: Configure cache
Expand Down
10 changes: 4 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ repos:
- id: sync_ruff_version

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.6.8'
rev: 'v0.8.6'
hooks:
- id: ruff
args: [ --fix, --exit-non-zero-on-fix ]
- id: ruff-format

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v4.6.0"
rev: "v5.0.0"
hooks:
- id: trailing-whitespace
exclude_types: [svg]
Expand All @@ -26,15 +26,13 @@ repos:
- id: check-ast

- repo: https://github.com/python-poetry/poetry
rev: '1.8.0'
rev: '2.0.0'
hooks:
- id: poetry-lock
args:
- --no-update
- id: poetry-check

- repo: https://github.com/streetsidesoftware/cspell-cli
rev: v8.13.3
rev: v8.17.0
hooks:
- id: cspell

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM python:3.12-slim as venv
LABEL maintainer="Jan Willhaus <[email protected]>"

ENV PYTHONUNBUFFERED=1
ENV POETRY_VERSION=1.8.2
ENV POETRY_VERSION=2.0.0

WORKDIR /src
COPY pyproject.toml poetry.lock ./
Expand Down
2 changes: 1 addition & 1 deletion config.yaml.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Podcast-Archiver configuration
## Generated using podcast-archiver v2.2.1
## Generated using podcast-archiver v2.3.0

# Field 'feeds': Feed URLs to archive.
#
Expand Down
2 changes: 1 addition & 1 deletion podcast_archiver/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class Database(BaseDatabase):
lock: Lock
conn: sqlite3.Connection

__slots__ = ("lock", "conn")
__slots__ = ("conn", "lock")

def __init__(self, filename: str, ignore_existing: bool) -> None:
super().__init__(filename=filename, ignore_existing=ignore_existing)
Expand Down
2 changes: 1 addition & 1 deletion podcast_archiver/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class FeedProcessor:

known_feeds: dict[str, FeedInfo]

__slots__ = ("settings", "database", "filename_formatter", "pool_executor", "stop_event", "known_feeds")
__slots__ = ("database", "filename_formatter", "known_feeds", "pool_executor", "settings", "stop_event")

def __init__(self, settings: Settings | None = None, database: BaseDatabase | None = None) -> None:
self.settings = settings or Settings()
Expand Down
2 changes: 1 addition & 1 deletion podcast_archiver/utils/pretty_printing.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class PrettyPrintEpisodeRange:
_last_populated: _ValPair
pairs: list[_ValPair]

__slots__ = ("_present", "_missing", "_last_populated", "pairs")
__slots__ = ("_last_populated", "_missing", "_present", "pairs")

def __init__(self) -> None:
self._present = _ValPair(prefix=DownloadResult.ALREADY_EXISTS)
Expand Down
2 changes: 1 addition & 1 deletion podcast_archiver/utils/progress.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class ProgressManager:
_refresher: _ProgressRefreshThread
_started: bool

__slots__ = ("_progress", "_lock", "_refresher", "_started")
__slots__ = ("_lock", "_progress", "_refresher", "_started")

def __init__(self) -> None:
self._started = False
Expand Down
189 changes: 116 additions & 73 deletions poetry.lock

Large diffs are not rendered by default.

56 changes: 31 additions & 25 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
[tool.poetry]
[build-system]
requires = ["poetry-core>=2.0.0,<3.0.0"]
build-backend = "poetry.core.masonry.api"

[project]
name = "podcast-archiver"
version = "2.3.0"
requires-python = ">=3.10,<4"
description = "Archive all episodes from your favorite podcasts"
# cspell: disable
authors = ["Jan Willhaus <[email protected]>"]
authors = [
{name = "Jan Willhaus", email = "[email protected]"},
]
maintainers = [
{name = "Jan Willhaus", email = "[email protected]"},
]
license = "MIT"
readme = "README.md"
packages = [{ include = "podcast_archiver" }]
classifiers = [
"Development Status :: 4 - Beta",
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Information Technology",
"Operating System :: MacOS",
Expand All @@ -19,34 +27,36 @@ classifiers = [
"Topic :: System :: Archiving",
"Topic :: Utilities",
]
repository = "https://github.com/janw/podcast-archiver"

[tool.poetry.urls]
"Bug Reports" = "https://github.com/janw/podcast-archiver/issues"
dependencies = [
"feedparser (>=6.0,<7)",
"requests (>=2.29,<3)",
"pydantic (>=2.5,<3)",
"pyyaml (>=6.0,<7)",
"rich-click (>=1.8,<2)",
"python-slugify (>=8.0,<9)",
]

[tool.poetry.scripts]

[project.urls]
Repository = "https://github.com/janw/podcast-archiver.git"
Issues = "https://github.com/janw/podcast-archiver/issues"
Changelog = "https://github.com/janw/podcast-archiver/blob/main/CHANGELOG.md"

[project.scripts]
podcast-archiver = 'podcast_archiver.cli:main'

[tool.poetry.dependencies]
python = "^3.10"
feedparser = "^6.0.10"
requests = "^2.29.0"
pydantic = "^2.5.3"
platformdirs = ">=3.4,<5.0"
pyyaml = "^6.0"
rich-click = "^1.8.0"
python-slugify = "^8.0.1"
tqdm = "^4.66.4"
[tool.poetry]
packages = [{ include = "podcast_archiver" }]

[tool.poetry.group.dev.dependencies]
ipython = "^8"
ipdb = "*"
ruff = "0.6.8"
ruff = "0.8.6"
pre-commit = ">=3,<5"
commitizen = ">=3,<5"
rich-codex = "^1"
mypy = "^1"
types-tqdm = "^4.66.0.20240417"

[tool.poetry.group.tests.dependencies]
pytest = "^8"
Expand Down Expand Up @@ -166,7 +176,3 @@ ignore_missing_imports = true
[[tool.mypy.overrides]]
module = ["podcast_archiver.compat.*"]
implicit_reexport = true

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

0 comments on commit 75a6c93

Please sign in to comment.