mirror of
https://github.com/mcloh/decision-models-benchmark.git
synced 2026-11-05 22:04:12 +00:00
Proteger dados sensíveis e atualizar andamento do plano
- Caminho do compartimento pai e CIDR do SSH saem do código para .secrets/oci-settings.json (fora do Git), com override por DMB_*. - Relatórios de sanidade deixam de gravar o hostname local. - tests/test_sensitive.py falha se OCIDs, chaves, IPs públicos ou valores de .secrets aparecerem em arquivos versionados. - tools/plan_progress.py gera o bloco de andamento por fase no plano. - Plano: status reais das tarefas de F0, F3 e F6; README e docs/05 com GPU em sa-saopaulo-1, runtime CUDA do Rizzo e pipeline sintético. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
42
tools/plan_progress.py
Normal file
42
tools/plan_progress.py
Normal file
@@ -0,0 +1,42 @@
|
||||
"""Atualiza o bloco de andamento de docs/03-plano-de-tarefas.md a partir das caixas de cada tarefa.
|
||||
|
||||
Legenda: [x] concluída · [~] em andamento/parcial · [ ] pendente.
|
||||
Uso: python tools/plan_progress.py
|
||||
"""
|
||||
import re
|
||||
from datetime import date
|
||||
from pathlib import Path
|
||||
|
||||
PLAN = Path(__file__).resolve().parents[1] / "docs" / "03-plano-de-tarefas.md"
|
||||
START, END = "<!-- PROGRESSO:INICIO -->", "<!-- PROGRESSO:FIM -->"
|
||||
|
||||
|
||||
def main():
|
||||
text = PLAN.read_text()
|
||||
phases, current = [], None
|
||||
for line in text.splitlines():
|
||||
if line.startswith("## F"):
|
||||
current = [line[3:].strip(), 0, 0, 0]
|
||||
phases.append(current)
|
||||
m = re.match(r"- \[(x| |~)\] \*\*\d+\.\*\*", line)
|
||||
if m and current:
|
||||
current[{"x": 1, "~": 2, " ": 3}[m.group(1)]] += 1
|
||||
rows = ["| Fase | Concluídas | Em andamento | Pendentes |", "|------|-----------|--------------|-----------|"]
|
||||
totals = [0, 0, 0]
|
||||
for name, done, doing, todo in phases:
|
||||
rows.append(f"| {name} | {done} | {doing} | {todo} |")
|
||||
totals = [totals[0] + done, totals[1] + doing, totals[2] + todo]
|
||||
rows.append(f"| **Total** | **{totals[0]}** | **{totals[1]}** | **{totals[2]}** |")
|
||||
block = (f"{START}\n**Andamento em {date.today():%Y-%m-%d}:** {totals[0]} de {sum(totals)} tarefas concluídas "
|
||||
f"({100 * totals[0] // sum(totals)}%), {totals[1]} em andamento.\n\n" + "\n".join(rows)
|
||||
+ "\n\nLegenda: `[x]` concluída · `[~]` em andamento ou parcial · `[ ]` pendente.\n" + END)
|
||||
if START in text:
|
||||
text = re.sub(re.escape(START) + ".*?" + re.escape(END), block, text, flags=re.S)
|
||||
else:
|
||||
text = text.replace("\n---\n", f"\n{block}\n\n---\n", 1)
|
||||
PLAN.write_text(text)
|
||||
print(block)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user