refactor: rework configuration models, add CLI, tests and VSCode settings
- Replace hardcoded CONFIG_PATH with appdirs AppDirs (use app.user_config_dir) and update SETTINGS_PATH - Rework dataclasses: add Library, QbitTorrent; convert Komga.libraries to List[Library]; use Path for media_path; add getLibraryByName and proper __post_init__ conversions - Extend KomGrabber to support downloader/downloader_settings (aria2/qbit), normalize Path handling and expanduser usage - Add type fixes, utility methods (getattr/_setattr) and API __post_init__ to convert nested dicts to dataclass instances - Add package CLI entrypoints (__main__.py, src package main) and simple runner (main.py) - Add tests for package __init__ CLI and config behavior (tests/*) and a small test script (test.py) - Add .vscode/settings.json for pytest integration - Tidy pyproject.toml: format dependencies, add dev/test dependency groups and fix trailing newline in bumpversion section
This commit is contained in:
@@ -5,14 +5,23 @@ description = "A small library providing a config class that provides settings d
|
||||
readme = "README.md"
|
||||
authors = [{ name = "WorldTeacher", email = "coding_contact@pm.me" }]
|
||||
requires-python = ">=3.13"
|
||||
dependencies = ["omegaconf>=2.3.0"]
|
||||
dependencies = [
|
||||
"appdirs>=1.4.4",
|
||||
"omegaconf>=2.3.0",
|
||||
]
|
||||
|
||||
[build-system]
|
||||
requires = ["hatchling"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
[dependency-groups]
|
||||
test = ["pytest>=8.3.4"]
|
||||
dev = [
|
||||
"pip>=25.1.1",
|
||||
]
|
||||
test = [
|
||||
"pytest>=8.3.4",
|
||||
"pytest-cov>=6.1.1",
|
||||
]
|
||||
|
||||
[tool.bumpversion]
|
||||
current_version = "0.2.0"
|
||||
@@ -34,4 +43,4 @@ moveable_tags = []
|
||||
commit_args = ""
|
||||
setup_hooks = []
|
||||
pre_commit_hooks = []
|
||||
post_commit_hooks = []
|
||||
post_commit_hooks = []
|
||||
|
||||
Reference in New Issue
Block a user