Skip to content

feat: add beginner A-to-Z runbook and improve UI / API resilience#9

Merged
rad1092 merged 2 commits into
mainfrom
codex/start-project-according-to-readme.md-j9eftx
Feb 13, 2026
Merged

feat: add beginner A-to-Z runbook and improve UI / API resilience#9
rad1092 merged 2 commits into
mainfrom
codex/start-project-according-to-readme.md-j9eftx

Conversation

@rad1092
Copy link
Copy Markdown
Owner

@rad1092 rad1092 commented Feb 13, 2026

Motivation

  • Provide a standalone, beginner-friendly A→Z runbook so a single user can get from install to a working CSV→BitNet workflow without editing the main README.
  • Improve UI ergonomics so novices get clear step-by-step status messages and an explicit timeout control for model runs.
  • Harden backend input validation (CSV size, timeout parsing) and surface friendly errors instead of raw tracebacks.
  • Keep regression coverage for analysis and add tests for the new timeout parsing behavior.

Description

  • Add BEGINNER_README.md containing a step-by-step A-to-Z runbook (venv, install, Ollama, CLI, UI, troubleshooting).
  • Implement analysis core in bitnet_tools/analysis.py with CSV parsing, summarize_rows, prompt builder and AnalysisError.
  • Add CLI in bitnet_tools/cli.py with analyze and ui subcommands, friendly SystemExit on analysis errors, and optional model run via run_ollama.
  • Add web UI server in bitnet_tools/web.py with parse_timeout, endpoints /api/analyze and /api/run, CSV size checks, and safe JSON error responses; add static UI assets under bitnet_tools/ui/ (index.html, app.js, styles.css).
  • Extend tests in tests/test_analysis.py to include parse_timeout bounds/type checks and keep existing analysis/CLI regressions.

Testing

  • Ran unit tests with python -m pytest -q which returned 7 passed.
  • The test suite includes new assertions for parse_timeout behavior (type and bounds) and existing analysis/CLI regressions.

Codex Task

@rad1092 rad1092 merged commit 17e97ae into main Feb 13, 2026
0 of 4 checks passed
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 323ac35638

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread bitnet_tools/analysis.py Outdated
if reader.fieldnames is None:
raise AnalysisError("CSV header not found")

columns = [str(c).strip() for c in reader.fieldnames if str(c).strip()]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Normalize row keys after trimming CSV header names

Trimming reader.fieldnames here changes column names but the row dictionaries returned by csv.DictReader still keep the original untrimmed keys, so lookups in summarize_rows can silently miss entire columns. For CSVs with spaced headers like id, amount, the amount column is treated as fully missing (row.get("amount") never matches " amount"), which corrupts summary stats and the generated prompt/output.

Useful? React with 👍 / 👎.

@rad1092 rad1092 deleted the codex/start-project-according-to-readme.md-j9eftx branch February 13, 2026 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant