Skip to content

feat(cli): zero-config data-boar --demo (#1113)#1119

Merged
FabioLeitao merged 1 commit into
mainfrom
feat/cli-demo-1113
Jul 1, 2026
Merged

feat(cli): zero-config data-boar --demo (#1113)#1119
FabioLeitao merged 1 commit into
mainfrom
feat/cli-demo-1113

Conversation

@FabioLeitao

Copy link
Copy Markdown
Collaborator

Summary

  • data-boar --demo / python main.py --demo: synthetic corpus in temp dir, initial scan, loopback dashboard on :8088 with --allow-insecure-httpno config.yaml.
  • Generator moved to core/demo/ (pip-installable); scripts/generate_synthetic_poc_corpus.py is a thin wrapper.
  • scripts/demo.sh delegates to main.py --demo (headless keeps bash trap + register_cleanup=False).
  • Excel fix: sanitize "Praise / existing controls" sheet title (openpyxl rejects /).
  • Docs: README, QUICKSTART (Caminho 0), /help, man page, PLAN_CLI_DEMO_SUBCOMMAND.md.

Steering (locked)

  • Loopback only on --demo (127.0.0.1).
  • One cleanup owner per flow (atexit vs bash trap).
  • Headless test expects returncode == 0 + report written.

Test plan

  • ./scripts/check-all.sh green locally
  • pytest tests/test_cli_demo.py tests/test_demo_entrypoint.py tests/test_report_excel_sheet_names.py

Closes #1113.

Follow-up (operator): PyPI publish after merge so pip install data-boar + --demo works for Estela.

Made with Cursor

Move synthetic corpus generator into core.demo (pip-installable);
prepare_demo_workspace + loopback-only bind; scan before web;
demo.sh becomes thin wrapper. Fix Excel praise sheet name for
openpyxl. Docs: README, QUICKSTART, help surfaces, PLAN_CLI_DEMO.

Closes #1113.
Comment thread core/demo/runtime.py
global _registered_cleanup
if _registered_cleanup is not None:
return
_registered_cleanup = demo_dir
wb.active.append(["cpf", "nome"])
wb.active.append([_p(_CPFS, 0), _p(_NAMES, 0)])
wb.save(str(out / "sample.xlsx"))
except ImportError:
doc = _d.Document()
doc.add_paragraph(pii)
doc.save(str(out / "sample.docx"))
except ImportError:
c = rc.Canvas(str(out / "sample.pdf"))
c.drawString(50, 750, f"CPF: {_p(_CPFS, 0)}")
c.save()
except ImportError:
draw.text((10, 20), f"CPF: {_p(_CPFS, 0)}", (0, 0, 0))
img.save(str(out / "sample.png"))
img.save(str(out / "sample.jpg"))
except ImportError:
@FabioLeitao FabioLeitao merged commit 1d0d067 into main Jul 1, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(cli): subcomando 'data-boar demo' turnkey (dado sintético + web) — paridade com a imagem Docker

2 participants