Chapter 02.11 — opinionated/ layer#

Everything that’s opt-in: a picky user can swap any of it. CLI, loggers, report plugins, bootstrap, drive_page alias. This layer is what you see on the surface, not the core — the turnkey version Ocarina ships so a typical project doesn’t have to reinvent it.

Plan#

#FileSubject
0101-cli-builder.mdCliBuilder, CliArg, _SilentArgumentParser.
0202-cli-store-phantoms.mdCliStore[TKeys], _CliField[T], phantom_validate.
0303-selenium-cli.mdcreate_selenium_auto_cli_store + flags + validation.
0404-loggers.mdILogger implementations: PrintLogger, FileLogger, PrintAndFileLogger, MutedLogger, create_matching_logger.
0505-plugins-reports.mdpretty_print_results, results_to_json, generate_docx_proof, timing.
0606-bootstrap-launcher.mdbootstrap + run_plugins (parallel).

Opt-out / opt-in#

Without opinionated/With opinionated/
Write your CLI from scratchcreate_selenium_auto_cli_store() hands it to you
Write your loggercreate_matching_logger("terminal+file") hands it to you
Write your reportspretty_print_results, generate_json_results, generate_docx_proof
Write your main()bootstrap(test_cycle, run_plugins, post_exec)

Alternatives#

ComponentReplaceable by…
CliBuilder / CliStoreAny argparse-like lib (click, typer, fire)
PrintLogger / FileLoggerAny ILogger implementation
pretty_print_resultsAny (TestCycleResults) -> None function
generate_docx_proofSame
bootstrapAny () -> None function that calls TestCycle.run_all + post-processes
drive_pagechain_actions directly, or a project alias (drive_section, drive_widget)