Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- name: Install project
run: uv sync --locked --no-dev --all-extras --group tests --managed-python
- name: Run tests
run: uv run pytest
run: uv run --no-dev pytest

check:
if: always()
Expand Down
2 changes: 1 addition & 1 deletion perdoo/comic/metadata/comic_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ def get_filename(self) -> str:


PATTERN_MAP: dict[str, Callable[[ComicInfo], str | int | None]] = {
"cover-date": lambda x: x.cover_date,
"cover-date": lambda x: str(x.cover_date) if x.cover_date else None,
"cover-day": lambda x: x.day,
"cover-month": lambda x: x.month,
"cover-year": lambda x: x.year,
Expand Down
10 changes: 5 additions & 5 deletions perdoo/comic/metadata/metron_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ def ensure_timezone(cls, v: str | datetime | None) -> str | datetime | None:


PATTERN_MAP: dict[str, Callable[[MetronInfo], str | int | None]] = {
"cover-date": lambda x: x.cover_date,
"cover-date": lambda x: str(x.cover_date) if x.cover_date else None,
"cover-day": lambda x: x.cover_date.day if x.cover_date else None,
"cover-month": lambda x: x.cover_date.month if x.cover_date else None,
"cover-year": lambda x: x.cover_date.year if x.cover_date else None,
Expand All @@ -414,10 +414,10 @@ def ensure_timezone(cls, v: str | datetime | None) -> str | datetime | None:
"series-name": lambda x: x.series.name,
"series-sort-name": lambda x: x.series.sort_name,
"series-year": lambda x: x.series.start_year,
"store-date": lambda x: x.store_date or "",
"store-year": lambda x: x.store_date.year if x.store_date else "",
"store-month": lambda x: x.store_date.month if x.store_date else "",
"store-day": lambda x: x.store_date.day if x.store_date else "",
"store-date": lambda x: str(x.store_date) if x.store_date else None,
"store-year": lambda x: x.store_date.year if x.store_date else None,
"store-month": lambda x: x.store_date.month if x.store_date else None,
"store-day": lambda x: x.store_date.day if x.store_date else None,
"title": lambda x: x.collection_title,
"upc": lambda x: x.gtin.upc if x.gtin else None,
"volume": lambda x: x.series.volume or 1,
Expand Down
6 changes: 3 additions & 3 deletions perdoo/services/metron.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from natsort import humansorted, ns
from prompt_toolkit.styles import Style
from questionary import Choice, confirm, select, text
from seagrin.cache import SQLiteCache
from seagrin.errors import ServiceError
from seagrin.metron import Metron as Seagrin
from seagrin.schemas import Issue, Series
Expand All @@ -23,8 +22,9 @@

class Metron(BaseService[Series, Issue]):
def __init__(self, username: str, password: str):
cache = SQLiteCache(path=get_cache_root() / "seagrin.sqlite")
self.session = Seagrin(username=username, password=password, cache=cache)
self.session = Seagrin(
username=username, password=password, cache=get_cache_root() / "seagrin.sqlite"
)

def _search_series_by_comicvine(self, comicvine_id: int | None) -> int | None:
if not comicvine_id:
Expand Down
2,292 changes: 2,292 additions & 0 deletions pylock.toml

Large diffs are not rendered by default.

33 changes: 19 additions & 14 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@ dev = [
"mdformat >= 1.0.0",
"mdformat-gfm >= 1.0.0",
"mdformat-ruff >= 0.1.0",
"prek >= 0.3.0",
"prek >= 0.4.0",
"ruff >= 0.15.0",
"toml-sort >= 0.24.0",
"ty >= 0.0.20",
"ty >= 0.0.30",
]
tests = [
"pytest >= 9.0.0",
"pytest-cov >= 7.0.0",
"tox >= 4.49.0",
"tox-uv >= 1.33.0",
"pytest-cov >= 7.1.0",
"tox >= 4.54.0",
"tox-uv >= 1.35.0",
]

[project]
authors = [
{email = "BuriedInCode@tuta.io", name = "BuriedInCode"},
{email = "buriedincode@duckpond.nz", name = "BuriedInCode"},
]
classifiers = [
"Development Status :: 4 - Beta",
Expand All @@ -35,30 +35,35 @@ classifiers = [
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python",
"Topic :: Internet",
"Typing :: Typed",
]
dependencies = [
"comicfn2dict >= 0.2.0",
"comicfn2dict >= 0.3.0",
"grayven >= 0.5.0",
"natsort >= 8.4.0",
"pillow >= 12.1.0",
"pydantic >= 2.12.0",
"pydantic-xml[lxml] >= 2.19.0",
"pillow >= 12.2.0",
"pydantic >= 2.13.0",
"pydantic-xml[lxml] >= 2.21.0",
"questionary >= 2.1.0",
"rarfile >= 4.2",
"rich >= 14.3.0",
"seagrin >= 0.4.0",
"rich >= 15.0.0",
"seagrin >= 2026.1.0",
"simyan >= 2.0.0",
"tomli >= 2.4.0 ; python_version < '3.11'",
"tomli-w >= 1.2.0",
"typer >= 0.24.0",
"typer >= 0.25.0",
"zipremove >= 0.8.0",
]
description = "Unify and organize your comic collection."
dynamic = ["version"]
keywords = ["comic", "comics", "metadata", "tagger", "tagging"]
license = "MIT"
license-files = ["LICENSE"]
maintainers = [
{email = "buriedincode@duckpond.nz", name = "BuriedInCode"},
]
name = "perdoo"
readme = "README.md"
requires-python = ">= 3.10"
Expand All @@ -84,7 +89,7 @@ show_missing = true
source = ["perdoo"]

[tool.hatch.build.targets.sdist]
exclude = [".github/"]
exclude = [".crow/", ".github/", ".woodpecker/"]

[tool.hatch.version]
path = "perdoo/__init__.py"
Expand Down
Loading
Loading