Compare commits

..

6 Commits

Author SHA1 Message Date
AJ Slater
3b6f8ca28b Merge branch 'main' into develop 2024-03-04 12:37:00 -08:00
AJ Slater
2a59ec4cbd
v0.2.1 (#7)
* update deps. bump version

* fix news

* update deps. update ruff. lint

* Support Python 3.9 (#6)

* lint

* update deps tests work against python 3.9

* bump version and news

---------

Co-authored-by: Timmy Welch <timmy@narnian.us>
2024-03-04 12:36:39 -08:00
AJ Slater
49a788425e bump version and news 2024-03-04 12:34:02 -08:00
AJ Slater
75d14dde6c update deps tests work against python 3.9 2024-03-04 12:32:15 -08:00
AJ Slater
213cd6f7b0 lint 2024-03-04 12:32:04 -08:00
Timmy Welch
9031295b4d
Support Python 3.9 (#6) 2024-03-04 12:26:59 -08:00
7 changed files with 34 additions and 23 deletions

View File

@ -1,4 +1,4 @@
FROM python:3.12.1-bookworm FROM python:3.9-bookworm
LABEL maintainer="AJ Slater <aj@slater.net>" LABEL maintainer="AJ Slater <aj@slater.net>"
COPY debian.sources /etc/apt/sources.list.d/ COPY debian.sources /etc/apt/sources.list.d/
@ -14,7 +14,7 @@ RUN apt-get clean \
WORKDIR /app WORKDIR /app
COPY bin ./bin COPY bin ./bin
COPY package.json package-lock.json pyproject.toml poetry.lock Makefile ./ COPY .eslintignore .gitignore .prettierignore .remarkignore .shellcheckrc eslint.config.js package.json package-lock.json pyproject.toml poetry.lock Makefile ./
RUN make install-all RUN make install-all
COPY . . COPY . .

View File

@ -1,5 +1,9 @@
# 📰 comicfn2dict News # 📰 comicfn2dict News
## v0.2.1
- Support Python 3.9, thanks to @lordwelch
## v0.2.0 ## v0.2.0
- The `-` character no longer breaks up tokens - The `-` character no longer breaks up tokens

View File

@ -1,11 +1,13 @@
"""Parse comic book archive names using the simple 'parse' parser.""" """Parse comic book archive names using the simple 'parse' parser."""
from __future__ import annotations
from calendar import month_abbr from calendar import month_abbr
from copy import copy from copy import copy
from pathlib import Path from pathlib import Path
from pprint import pformat from pprint import pformat
from re import Match, Pattern
from sys import maxsize from sys import maxsize
from typing import TYPE_CHECKING
from comicfn2dict.log import print_log_header from comicfn2dict.log import print_log_header
from comicfn2dict.regex import ( from comicfn2dict.regex import (
@ -34,6 +36,9 @@ from comicfn2dict.regex import (
YEAR_TOKEN_RE, YEAR_TOKEN_RE,
) )
if TYPE_CHECKING:
from re import Match, Pattern
_DATE_KEYS = frozenset({"year", "month", "day"}) _DATE_KEYS = frozenset({"year", "month", "day"})
_REMAINING_GROUP_KEYS = ("series", "title") _REMAINING_GROUP_KEYS = ("series", "title")
# Ordered by commonness. # Ordered by commonness.

View File

@ -1,5 +1,7 @@
"""Unparse comic filenames.""" """Unparse comic filenames."""
from __future__ import annotations
from calendar import month_abbr from calendar import month_abbr
from collections.abc import Callable, Mapping, Sequence from collections.abc import Callable, Mapping, Sequence
from contextlib import suppress from contextlib import suppress

24
package-lock.json generated
View File

@ -628,9 +628,9 @@
"dev": true "dev": true
}, },
"node_modules/@jridgewell/trace-mapping": { "node_modules/@jridgewell/trace-mapping": {
"version": "0.3.24", "version": "0.3.25",
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.24.tgz", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz",
"integrity": "sha512-+VaWXDa6+l6MhflBvVXjIEAzb59nQ2JUK3bwRp2zRpPtU+8TFRy9Gg/5oIcNlkEL5PGlBFGfemUVvIgLnTzq7Q==", "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/resolve-uri": "^3.1.0",
@ -1364,9 +1364,9 @@
} }
}, },
"node_modules/caniuse-lite": { "node_modules/caniuse-lite": {
"version": "1.0.30001591", "version": "1.0.30001593",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001591.tgz", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001593.tgz",
"integrity": "sha512-PCzRMei/vXjJyL5mJtzNiUCKP59dm8Apqc3PH8gJkMnMXZGox93RbE76jHsmLwmIo6/3nsYIpJtx0O7u5PqFuQ==", "integrity": "sha512-UWM1zlo3cZfkpBysd7AS+z+v007q9G1+fLTUU42rQnY6t2axoogPW/xol6T7juU5EUoOhML4WgBIdG+9yYqAjQ==",
"dev": true, "dev": true,
"funding": [ "funding": [
{ {
@ -1780,9 +1780,9 @@
"dev": true "dev": true
}, },
"node_modules/electron-to-chromium": { "node_modules/electron-to-chromium": {
"version": "1.4.690", "version": "1.4.691",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.690.tgz", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.691.tgz",
"integrity": "sha512-+2OAGjUx68xElQhydpcbqH50hE8Vs2K6TkAeLhICYfndb67CVH0UsZaijmRUE3rHlIxU1u0jxwhgVe6fK3YANA==", "integrity": "sha512-vJ+/LmKja/St8Ofq4JGMFVZuwG7ECU6akjNSn2/g6nv8xbIBOWGlEs+WA8/3XaWkU0Nlyu0iFGgOxC4mpgFjgA==",
"dev": true "dev": true
}, },
"node_modules/emoji-regex": { "node_modules/emoji-regex": {
@ -3171,9 +3171,9 @@
"dev": true "dev": true
}, },
"node_modules/ini": { "node_modules/ini": {
"version": "4.1.1", "version": "4.1.2",
"resolved": "https://registry.npmjs.org/ini/-/ini-4.1.1.tgz", "resolved": "https://registry.npmjs.org/ini/-/ini-4.1.2.tgz",
"integrity": "sha512-QQnnxNyfvmHFIsj7gkPcYymR8Jdw/o7mp5ZFihxn6h8Ci6fh3Dx4E1gPjpQEpIuPo9XVNY/ZUwh4BPMjGyL01g==", "integrity": "sha512-AMB1mvwR1pyBFY/nSevUX6y8nJWS63/SzUKD3JyQn97s4xgIdgQPT75IRouIiBAN4yLQBUShNYVW0+UG25daCw==",
"dev": true, "dev": true,
"engines": { "engines": {
"node": "^14.17.0 || ^16.13.0 || >=18.0.0" "node": "^14.17.0 || ^16.13.0 || >=18.0.0"

12
poetry.lock generated
View File

@ -1,4 +1,4 @@
# This file is automatically @generated by Poetry 1.8.1 and should not be changed by hand. # This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand.
[[package]] [[package]]
name = "click" name = "click"
@ -328,13 +328,13 @@ six = ">=1.13.0"
[[package]] [[package]]
name = "json5" name = "json5"
version = "0.9.18" version = "0.9.20"
description = "A Python implementation of the JSON5 data format." description = "A Python implementation of the JSON5 data format."
optional = false optional = false
python-versions = ">=3.8" python-versions = ">=3.8"
files = [ files = [
{ file = "json5-0.9.18-py2.py3-none-any.whl", hash = "sha256:3f20193ff8dfdec6ab114b344e7ac5d76fac453c8bab9bdfe1460d1d528ec393" }, { file = "json5-0.9.20-py3-none-any.whl", hash = "sha256:f623485b37fad95783233bad9352d21526709cbd9a2ec41ddc3e950fca85b701" },
{ file = "json5-0.9.18.tar.gz", hash = "sha256:ecb8ac357004e3522fb989da1bf08b146011edbd14fdffae6caad3bd68493467" }, { file = "json5-0.9.20.tar.gz", hash = "sha256:20a255981244081d5aaa4adc90d31cdbf05bed1863993cbf300b8e2cd2b6de88" },
] ]
[package.extras] [package.extras]
@ -963,5 +963,5 @@ test = ["pytest (>=6.0.0)", "setuptools (>=65)"]
[metadata] [metadata]
lock-version = "2.0" lock-version = "2.0"
python-versions = "^3.10" python-versions = "^3.9"
content-hash = "4515a96c7b7f52c54723925326999a5565d78f6c3c2f25adbd137dd7994ac4ce" content-hash = "262b669a592c5e0c92f1d59ebc67df0a9549ff54d2c45baff168478fdce76c1b"

View File

@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
[tool.poetry] [tool.poetry]
name = "comicfn2dict" name = "comicfn2dict"
version = "0.2.0" version = "0.2.1"
description = "Parse common comic filenames and return a dict of metadata attributes. Includes a cli." description = "Parse common comic filenames and return a dict of metadata attributes. Includes a cli."
license = "GPL-3.0-only" license = "GPL-3.0-only"
authors = ["AJ Slater <aj@slater.net>"] authors = ["AJ Slater <aj@slater.net>"]
@ -28,7 +28,7 @@ exclude = ["*/**/*~"]
include = [] include = []
[tool.poetry.dependencies] [tool.poetry.dependencies]
python = "^3.10" python = "^3.9"
[tool.poetry.group.dev.dependencies] [tool.poetry.group.dev.dependencies]
neovim = "^0.3.1" neovim = "^0.3.1"