Fix accidentially pushed folder structure

This commit is contained in:
Florian Frank committed 2026-09-19 11:10:01 +02:00
1 parent 06593ac488
commit a154dc927e
7 files changed
+284 -2

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
"""Builds the PDF report of one stored scan, from the artifacts that scan put in the bucket.
A standalone tool rather than another persistent_storage command: it reads the store and writes a
file, and nothing else in the pipeline depends on it. The seams are drawn so that the whole package
moves to archon by changing what :mod:`sources` reads from --
everything after that point works on bytes and rows, not on a particular store.
The parts it does not own are reused rather than reimplemented, and copied into ``vendor/`` so the
package can also be lifted into a repository of its own. See ``vendor/README.md``.
"""
from .vendor import activate
# Before anything else imports what this borrows. In the monorepo it finds the real packages and
# does nothing; in a repository of its own it puts the copies on the path.
activate()
+33
View File
@@ -0,0 +1,33 @@
"""Entrypoint for the report generator CLI."""
from cc_common.api.cli import CLIManager
from cc_common.config import load_environment
from persistent_storage.shared import inject_secrets
from .commands.generate import GenerateProperties, generate
def run() -> None:
"""Entrypoint for CLI."""
load_environment()
cli = CLIManager("report_generator", "Generates the PDF report of a stored scan.")
cli.register_command(
"generate",
_with_storage_secrets,
GenerateProperties,
help="Builds the PDF report of one scan from the artifacts it stored.",
)
cli.run()
def _with_storage_secrets(properties: GenerateProperties) -> object:
"""Fill the storage configuration's secrets from the environment before the command runs."""
inject_secrets(properties.storage_config)
return generate(properties)
if __name__ == "__main__":
run()
+2 -2
View File
@@ -3,10 +3,10 @@
from pathlib import Path
from uuid import UUID
from cc_common.api import PipelineError, context
from cc_common.utils import print
from pydantic import BaseModel, Field
from cc_common.api import PipelineError, context
from cc_common.utils import print
from persistent_storage.shared import StorageConfiguration
from ..rendering import render