reformat tomls

This commit is contained in:
2026-07-15 15:55:58 +03:00
parent 6e1567e6db
commit 2e5da95ec7
5 changed files with 135 additions and 78 deletions
+11 -5
View File
@@ -1,5 +1,7 @@
[build-system] [build-system]
requires = ["hatchling"] requires = [
"hatchling",
]
build-backend = "hatchling.build" build-backend = "hatchling.build"
[project] [project]
@@ -7,9 +9,9 @@ name = "ahriman-core"
description = "ArcH linux ReposItory MANager, core package" description = "ArcH linux ReposItory MANager, core package"
readme = "../README.md" readme = "../README.md"
requires-python = ">=3.13" requires-python = ">=3.13"
license = {file = "../COPYING"} license = { file = "../COPYING" }
authors = [ authors = [
{name = "ahriman team"}, { name = "ahriman team" },
] ]
dependencies = [ dependencies = [
"bcrypt", "bcrypt",
@@ -18,7 +20,9 @@ dependencies = [
"pyelftools", "pyelftools",
"requests", "requests",
] ]
dynamic = ["version"] dynamic = [
"version",
]
[project.optional-dependencies] [project.optional-dependencies]
journald = [ journald = [
@@ -61,7 +65,9 @@ Changelog = "https://github.com/arcan1s/ahriman/releases"
path = "src/ahriman/__init__.py" path = "src/ahriman/__init__.py"
[tool.hatch.build.targets.wheel] [tool.hatch.build.targets.wheel]
packages = ["src/ahriman"] packages = [
"src/ahriman",
]
[tool.hatch.build.targets.wheel.shared-data] [tool.hatch.build.targets.wheel.shared-data]
"package/lib" = "lib" "package/lib" = "lib"
+14 -6
View File
@@ -1,5 +1,7 @@
[build-system] [build-system]
requires = ["hatchling"] requires = [
"hatchling",
]
build-backend = "hatchling.build" build-backend = "hatchling.build"
[project] [project]
@@ -7,14 +9,16 @@ name = "ahriman-triggers"
description = "ArcH linux ReposItory MANager, additional extensions" description = "ArcH linux ReposItory MANager, additional extensions"
readme = "../README.md" readme = "../README.md"
requires-python = ">=3.13" requires-python = ">=3.13"
license = {file = "../COPYING"} license = { file = "../COPYING" }
authors = [ authors = [
{name = "ahriman team"}, { name = "ahriman team" },
] ]
dependencies = [ dependencies = [
"ahriman-core", "ahriman-core",
] ]
dynamic = ["version"] dynamic = [
"version",
]
[project.urls] [project.urls]
Documentation = "https://ahriman.readthedocs.io/" Documentation = "https://ahriman.readthedocs.io/"
@@ -25,8 +29,12 @@ Changelog = "https://github.com/arcan1s/ahriman/releases"
path = "../ahriman-core/src/ahriman/__init__.py" path = "../ahriman-core/src/ahriman/__init__.py"
[tool.hatch.build.targets.wheel] [tool.hatch.build.targets.wheel]
only-include = ["src/ahriman"] only-include = [
sources = ["src"] "src/ahriman",
]
sources = [
"src",
]
[tool.hatch.build.targets.wheel.shared-data] [tool.hatch.build.targets.wheel.shared-data]
"package/share" = "share" "package/share" = "share"
+14 -6
View File
@@ -1,5 +1,7 @@
[build-system] [build-system]
requires = ["hatchling"] requires = [
"hatchling",
]
build-backend = "hatchling.build" build-backend = "hatchling.build"
[project] [project]
@@ -7,9 +9,9 @@ name = "ahriman-web"
description = "ArcH linux ReposItory MANager, web server" description = "ArcH linux ReposItory MANager, web server"
readme = "../README.md" readme = "../README.md"
requires-python = ">=3.13" requires-python = ">=3.13"
license = {file = "../COPYING"} license = { file = "../COPYING" }
authors = [ authors = [
{name = "ahriman team"}, { name = "ahriman team" },
] ]
dependencies = [ dependencies = [
"ahriman-core", "ahriman-core",
@@ -18,7 +20,9 @@ dependencies = [
"aiohttp_jinja2", "aiohttp_jinja2",
"aiohttp_sse", "aiohttp_sse",
] ]
dynamic = ["version"] dynamic = [
"version",
]
[project.optional-dependencies] [project.optional-dependencies]
auth = [ auth = [
@@ -47,8 +51,12 @@ Changelog = "https://github.com/arcan1s/ahriman/releases"
path = "../ahriman-core/src/ahriman/__init__.py" path = "../ahriman-core/src/ahriman/__init__.py"
[tool.hatch.build.targets.wheel] [tool.hatch.build.targets.wheel]
only-include = ["src/ahriman"] only-include = [
sources = ["src"] "src/ahriman",
]
sources = [
"src",
]
[tool.hatch.build.targets.wheel.shared-data] [tool.hatch.build.targets.wheel.shared-data]
"package/lib" = "lib" "package/lib" = "lib"
+21 -22
View File
@@ -1,27 +1,26 @@
[build-system] [build-system]
requires = ["hatchling"] requires = [
"hatchling",
]
build-backend = "hatchling.build" build-backend = "hatchling.build"
[project] [project]
name = "ahriman" name = "ahriman"
description = "ArcH linux ReposItory MANager" description = "ArcH linux ReposItory MANager"
readme = "README.md" readme = "README.md"
requires-python = ">=3.13" requires-python = ">=3.13"
license = { file = "COPYING" }
license = {file = "COPYING"}
authors = [ authors = [
{name = "ahriman team"}, { name = "ahriman team" },
] ]
dependencies = [ dependencies = [
"ahriman-core", "ahriman-core",
"ahriman-triggers", "ahriman-triggers",
"ahriman-web", "ahriman-web",
] ]
dynamic = [
dynamic = ["version"] "version",
]
[project.urls] [project.urls]
Documentation = "https://ahriman.readthedocs.io/" Documentation = "https://ahriman.readthedocs.io/"
@@ -36,13 +35,13 @@ check = [
"pylint", "pylint",
] ]
docs = [ docs = [
"ahriman-core[s3,validator]", "ahriman-core[s3,validator]",
"Sphinx", "Sphinx",
"argparse-manpage", "argparse-manpage",
"pydeps", "pydeps",
"shtab", "shtab",
"sphinx-argparse", "sphinx-argparse",
"sphinx-rtd-theme>=1.1.1", # https://stackoverflow.com/a/74355734 "sphinx-rtd-theme>=1.1.1", # https://stackoverflow.com/a/74355734
] ]
tests = [ tests = [
"pytest", "pytest",
@@ -75,18 +74,18 @@ bypass-selection = true
[tool.hatch.envs.default] [tool.hatch.envs.default]
workspace.members = [ workspace.members = [
{path = "ahriman-core"}, { path = "ahriman-core" },
{path = "ahriman-triggers"}, { path = "ahriman-triggers" },
{path = "ahriman-web"}, { path = "ahriman-web" },
] ]
[tool.hatch.version] [tool.hatch.version]
path = "ahriman-core/src/ahriman/__init__.py" path = "ahriman-core/src/ahriman/__init__.py"
[tool.uv.sources] [tool.uv.sources]
ahriman-core = {workspace = true} ahriman-core = { workspace = true }
ahriman-triggers = {workspace = true} ahriman-triggers = { workspace = true }
ahriman-web = {workspace = true} ahriman-web = { workspace = true }
[tool.uv.workspace] [tool.uv.workspace]
members = [ members = [
+75 -39
View File
@@ -15,26 +15,36 @@ npm_install = [
"npm", "npm",
{ replace = "ref", of = ["flags", "npm"], extend = true }, { replace = "ref", of = ["flags", "npm"], extend = true },
"install", "install",
"--cache", "{envtmpdir}/npm-cache", "--cache",
"{envtmpdir}/npm-cache",
], ],
] ]
[flags] [flags]
autopep8 = [ autopep8 = [
"--max-line-length", "120", "--max-line-length",
"120",
"-aa", "-aa",
] ]
bandit = [ bandit = [
"--configfile", ".bandit.yml", "--configfile",
".bandit.yml",
] ]
manpage = [ manpage = [
"--author", "{[project]name} team", "--author",
"--author-email", "", "{[project]name} team",
"--description", "ArcH linux ReposItory MANager", "--author-email",
"--manual-title", "ArcH linux ReposItory MANager", "",
"--project-name", "{[project]name}", "--description",
"--version", "{env:VERSION}", "ArcH linux ReposItory MANager",
"--url", "https://github.com/arcan1s/ahriman", "--manual-title",
"ArcH linux ReposItory MANager",
"--project-name",
"{[project]name}",
"--version",
"{env:VERSION}",
"--url",
"https://github.com/arcan1s/ahriman",
] ]
mypy = [ mypy = [
"--implicit-reexport", "--implicit-reexport",
@@ -43,18 +53,22 @@ mypy = [
"--allow-subclassing-any", "--allow-subclassing-any",
] ]
npm = [ npm = [
"--prefix", "frontend", "--prefix",
"frontend",
] ]
pydeps = [ pydeps = [
"--no-config", "--no-config",
"--cluster", "--cluster",
] ]
pylint = [ pylint = [
"--rcfile", ".pylint.toml", "--rcfile",
".pylint.toml",
] ]
shtab = [ shtab = [
"--prefix", "{[project]name}", "--prefix",
"--prog", "{[project]name}", "{[project]name}",
"--prog",
"{[project]name}",
"ahriman.application.ahriman._parser", "ahriman.application.ahriman._parser",
] ]
@@ -73,7 +87,8 @@ system_site_packages = true
commands = [ commands = [
[ [
"{envpython}", "{envpython}",
"-m", "build", "-m",
"build",
"--sdist", "--sdist",
"--no-isolation", "--no-isolation",
], ],
@@ -99,7 +114,8 @@ commands = [
{ replace = "ref", of = ["flags", "autopep8"], extend = true }, { replace = "ref", of = ["flags", "autopep8"], extend = true },
"--exit-code", "--exit-code",
"--in-place", "--in-place",
"--jobs", "0", "--jobs",
"0",
"--recursive", "--recursive",
"ahriman-core/src/{[project]name}", "ahriman-core/src/{[project]name}",
"ahriman-triggers/src/{[project]name}", "ahriman-triggers/src/{[project]name}",
@@ -125,18 +141,20 @@ commands = [
[ [
"bandit", "bandit",
{ replace = "ref", of = ["flags", "bandit"], extend = true }, { replace = "ref", of = ["flags", "bandit"], extend = true },
"--skip", "B101,B105,B106", "--skip",
"B101,B105,B106",
"--recursive", "--recursive",
"ahriman-core/src/{[project]name}", "ahriman-core/tests/{[project]name}",
"ahriman-triggers/src/{[project]name}", "ahriman-triggers/tests/{[project]name}",
"ahriman-web/src/{[project]name}", "ahriman-web/tests/{[project]name}",
], ],
[ [
"mypy", "mypy",
{ replace = "ref", of = ["flags", "mypy"], extend = true }, { replace = "ref", of = ["flags", "mypy"], extend = true },
"--install-types", "--install-types",
"--non-interactive", "--non-interactive",
"--package", "{[project]name}", "--package",
"{[project]name}",
], ],
{ replace = "ref", of = ["commands", "npm_install"], extend = true }, { replace = "ref", of = ["commands", "npm_install"], extend = true },
[ [
@@ -166,26 +184,34 @@ commands = [
[ [
"shtab", "shtab",
{ replace = "ref", of = ["flags", "shtab"], extend = true }, { replace = "ref", of = ["flags", "shtab"], extend = true },
"--shell", "bash", "--shell",
"--output", "ahriman-core/package/share/bash-completion/completions/_ahriman", "bash",
"--output",
"ahriman-core/package/share/bash-completion/completions/_ahriman",
], ],
[ [
"shtab", "shtab",
{ replace = "ref", of = ["flags", "shtab"], extend = true }, { replace = "ref", of = ["flags", "shtab"], extend = true },
"--shell", "zsh", "--shell",
"--output", "ahriman-core/package/share/zsh/site-functions/_ahriman", "zsh",
"--output",
"ahriman-core/package/share/zsh/site-functions/_ahriman",
], ],
[ [
"argparse-manpage", "argparse-manpage",
{ replace = "ref", of = ["flags", "manpage"], extend = true }, { replace = "ref", of = ["flags", "manpage"], extend = true },
"--module", "ahriman.application.ahriman", "--module",
"--function", "_parser", "ahriman.application.ahriman",
"--output", "ahriman-core/package/share/man/man1/ahriman.1", "--function",
"_parser",
"--output",
"ahriman-core/package/share/man/man1/ahriman.1",
], ],
[ [
"pydeps", "pydeps",
{ replace = "ref", of = ["flags", "pydeps"], extend = true }, { replace = "ref", of = ["flags", "pydeps"], extend = true },
"--dot-output", "{tox_root}/docs/_static/architecture.dot", "--dot-output",
"{tox_root}/docs/_static/architecture.dot",
"--no-output", "--no-output",
"--show-dot", "--show-dot",
"{envsitepackagesdir}/{[project]name}", "{envsitepackagesdir}/{[project]name}",
@@ -194,7 +220,8 @@ commands = [
"sphinx-apidoc", "sphinx-apidoc",
"--force", "--force",
"--no-toc", "--no-toc",
"--output-dir", "docs", "--output-dir",
"docs",
"{envsitepackagesdir}/{[project]name}", "{envsitepackagesdir}/{[project]name}",
], ],
# compile list of dependencies for rtd.io # compile list of dependencies for rtd.io
@@ -202,11 +229,16 @@ commands = [
"uv", "uv",
"pip", "pip",
"compile", "compile",
"--group", "pyproject.toml:docs", "--group",
"--no-emit-package", "ahriman-core", "pyproject.toml:docs",
"--no-emit-package", "ahriman-triggers", "--no-emit-package",
"--no-emit-package", "ahriman-web", "ahriman-core",
"--output-file", "docs/requirements.txt", "--no-emit-package",
"ahriman-triggers",
"--no-emit-package",
"ahriman-web",
"--output-file",
"docs/requirements.txt",
"--quiet", "--quiet",
"pyproject.toml", "pyproject.toml",
], ],
@@ -240,9 +272,11 @@ recreate = true
commands = [ commands = [
[ [
"sphinx-build", "sphinx-build",
"--builder", "html", "--builder",
"html",
"--fail-on-warning", "--fail-on-warning",
"--jobs", "1", "--jobs",
"1",
"--write-all", "--write-all",
"docs", "docs",
"{envtmpdir}/html", "{envtmpdir}/html",
@@ -275,7 +309,8 @@ commands = [
[ [
"git", "git",
"commit", "commit",
"--message", "Release {posargs}", "--message",
"Release {posargs}",
], ],
[ [
"git", "git",
@@ -328,7 +363,8 @@ commands = [
# check if version is set and validate it # check if version is set and validate it
[ [
"{envpython}", "{envpython}",
"-c", "from packaging.version import Version; Version('{posargs}')", "-c",
"from packaging.version import Version; Version('{posargs}')",
], ],
[ [
"sed", "sed",