Improve task control panel layout
Build custom container images / build (map[base_image:php:8-fpm-alpine build_args:PHP_VERSION=8 context:php8-pgsql fingerprint_command:{ apk info -v | LC_ALL=C sort; find /usr/local/lib/php/extensions /usr/local/etc/php/conf.d -type f -exec sha256sum {} + | LC_ALL=C sort; } name:ph… (push) Successful in 47s
Build custom container images / build (map[base_image:postgres:18 build_args:PG_VERSION=18 POSTGIS_VERSION=3 VCHORD_VERSION=0.5.3 context:postgres fingerprint_command:{ dpkg-query -W -f='${binary:Package}=${Version}\n' | LC_ALL=C sort; find /usr/lib/postgresql -type f -exec sha256su… (push) Successful in 1m40s
Build custom container images / build (map[base_image:python:3 build_args:PYTHON_VERSION=3 context:python-tools fingerprint_command:{ dpkg-query -W -f='${binary:Package}=${Version}\n' | LC_ALL=C sort; pip freeze | LC_ALL=C sort; } name:python-tools oci_labels:org.opencontainers.ima… (push) Successful in 1m18s

This commit is contained in:
ajp_anton
2026-08-18 01:40:27 +00:00
parent b9c886a5ea
commit c1146cfcf5
7 changed files with 177 additions and 38 deletions
+29 -4
View File
@@ -24,10 +24,10 @@ def test_discovers_only_direct_non_hidden_python_tasks(tmp_path: Path) -> None:
groups = catalog.groups()
assert [group.id for group in groups] == ["media_tasks", "space group"]
assert groups[0].display_name == "media tasks"
assert groups[0].display_name == "Media Tasks"
assert [task.filename for task in groups[0].tasks] == ["check_one.py", "with-hyphen.py"]
assert [task.display_name for task in groups[0].tasks] == ["check one", "with-hyphen"]
assert groups[1].tasks[0].display_name == "already named"
assert [task.display_name for task in groups[0].tasks] == ["Check One", "With-Hyphen"]
assert groups[1].tasks[0].display_name == "Already Named"
assert groups[0].tasks[0].description == "Checks one thing."
@@ -42,7 +42,7 @@ def test_ignores_symlinked_groups_and_tasks(tmp_path: Path) -> None:
(group / "linked.py").symlink_to(external / "outside" / "outside.py")
assert TaskCatalog(root).groups() == (
Group(id="safe", path=group, display_name="safe", tasks=()),
Group(id="safe", path=group, display_name="Safe", tasks=()),
)
@@ -119,6 +119,31 @@ def test_manifest_orders_listed_tasks_and_allows_empty_declarations(tmp_path: Pa
assert [task.filename for task in tasks.tasks] == ["review.py", "apply.py", "status.py"]
def test_manifest_can_override_the_group_display_name(tmp_path: Path) -> None:
root = tmp_path / "tasks"
group = root / "service"
write_task(root, "service", "status.py", '"""Shows status."""\n')
(group / "task-inputs.json").write_text(
'''{"version":1,"label":"Service UI","tasks":{}}''',
encoding="utf-8",
)
discovered = TaskCatalog(root).group("service")
assert discovered is not None
assert discovered.display_name == "Service UI"
def test_display_names_keep_common_acronyms_capitalized(tmp_path: Path) -> None:
root = tmp_path / "tasks"
write_task(root, "tools", "replace_api_urls.py", '"""Updates URLs."""\n')
task = TaskCatalog(root).task("tools/replace_api_urls.py")
assert task is not None
assert task.display_name == "Replace API URLs"
def test_rejects_manifest_for_unknown_task(tmp_path: Path) -> None:
root = tmp_path / "tasks"
group = root / "examples"
+2 -1
View File
@@ -20,7 +20,7 @@ def test_index_discovers_task_and_run_endpoint(settings) -> None:
page = client.get("/")
assert page.status_code == 200
assert b"status checks" in page.data
assert b"Status Checks" in page.data
assert b"Shows status." in page.data
response = client.post("/tasks/status_checks/show_status.py/run")
@@ -230,6 +230,7 @@ print(Path(os.environ["SERVER_MAINTENANCE_INPUT"]).read_text())
page = client.get("/")
assert b"Report only" in page.data
assert b"Apply changes" in page.data
assert b"data-execution-mode" in page.data
response = client.post("/tasks/examples/migrate.py/run")
run_id = int(response.headers["Location"].rsplit("/", 1)[1])
deadline = time.monotonic() + 3