some more housekeeping

This commit is contained in:
holger krekel
2023-12-10 12:17:05 +01:00
parent a6d24b3af7
commit 587d8142d2
2 changed files with 9 additions and 9 deletions

View File

@@ -19,6 +19,9 @@ dependencies = [
[project.scripts]
cmdeploy = "deploy_chatmail.cmdeploy:main"
[tool.setuptools_scm]
write_to = "src/deploy_chatmail/_version.py"
[tool.pytest.ini_options]
addopts = "-v -ra --strict-markers"

View File

@@ -51,7 +51,7 @@ def add_subcommand(subparsers, func):
name = func.__name__
assert name.endswith("_cmd")
name = name[:-4]
doc = func.__doc__.strip()
doc = func.__doc__.strip().strip(".")
p = subparsers.add_parser(name, description=doc, help=doc)
p.set_defaults(func=func)
add_config_option(p)
@@ -80,13 +80,10 @@ def get_parser():
help="don't actually modify the server",
)
add_subcommand(subparsers, webdev_cmd)
add_subcommand(subparsers, test_cmd)
add_subcommand(subparsers, bench_cmd)
add_subcommand(subparsers, dns_cmd)
add_subcommand(subparsers, bench_cmd)
add_subcommand(subparsers, test_cmd)
add_subcommand(subparsers, webdev_cmd)
return parser
@@ -116,7 +113,7 @@ def run_cmd(args, out, config):
def webdev_cmd(args, out, config):
"""Run web development loop for static local web pages."""
"""Run local web development loop for static web pages."""
from .www import main
main()
@@ -153,7 +150,7 @@ def read_dkim_entries(entry):
def dns_cmd(args, out, config):
"""generate dns zone file."""
"""Generate dns zone file."""
template = importlib.resources.files(__package__).joinpath("chatmail.zone.f")
ssh = f"ssh root@{config.mailname}"