Skip to content

feat: add multi-CSV visualization (charts) with CLI integration and graceful fallback#19

Merged
rad1092 merged 2 commits into
mainfrom
codex/evaluate-current-project-completion-level
Feb 14, 2026
Merged

feat: add multi-CSV visualization (charts) with CLI integration and graceful fallback#19
rad1092 merged 2 commits into
mainfrom
codex/evaluate-current-project-completion-level

Conversation

@rad1092
Copy link
Copy Markdown
Owner

@rad1092 rad1092 commented Feb 14, 2026

Motivation

  • Improve multi-file analysis by producing visual artifacts (histogram/boxplot/top-value bar) so users can immediately inspect distributions and top categories.
  • Integrate visualization into existing multi-analyze flow so reports, JSON and charts are produced together.
  • Ensure the CLI remains robust in minimal environments by providing a clear fallback when matplotlib is not available.

Description

  • Added a new visualization module bitnet_tools/visualize.py that generates per-file charts (numeric histograms and boxplots, categorical top-value bars) and exposes create_multi_charts to operate across multiple CSVs.
  • Extended CLI (bitnet_tools/cli.py) to accept --charts-dir for multi-analyze and wire up create_multi_charts, storing either charts or charts_error into the result.
  • Updated the multi-CSV analysis report builder (bitnet_tools/multi_csv.py) to include a "생성된 차트 파일" section when chart artifacts exist and to otherwise preserve analysis-only behavior.
  • Made matplotlib usage defensive in visualize.py by raising a clear RuntimeError when unavailable and catching that in the CLI to avoid hard failures.
  • Minor related additions: streaming summary improvements and markdown report builder in analysis.py, a lightweight doctor helper and Windows desktop glue files, README usage & capability updates, and tests covering chart integration and error fallback.

Testing

  • Ran the full test suite with pytest -q and all tests passed (15 passed).
  • Exercised the CLI multi-analyze path with --charts-dir to confirm that output JSON/Markdown are written and that the charts key is present when create_multi_charts succeeds.
  • Verified fallback behavior by simulating missing matplotlib where create_multi_charts raises and confirmed charts_error appears in the output JSON instead of failing the run.

Codex Task

@rad1092 rad1092 merged commit 4610ea0 into main Feb 14, 2026
4 checks passed
@rad1092 rad1092 deleted the codex/evaluate-current-project-completion-level branch February 14, 2026 14:46
@chatgpt-codex-connector
Copy link
Copy Markdown

💡 Codex Review

"print('결측 비율 상위:\n', missing_ratio.head(10))\n\n"

P1 Badge Escape newlines in generated pandas example code

build_code_guidance currently embeds \n inside single-quoted print(...) text in the template, which turns into a literal line break in the emitted pandas_example and makes the generated snippet fail with SyntaxError: unterminated string literal when users try to run it from the markdown report. This breaks the advertised runnable guidance for every multi-CSV analysis result until those newline escapes are double-escaped.


out = out_dir / f"{stem}_{col}_hist.png"

P2 Badge Sanitize column names before chart filename generation

Chart output paths are built directly from raw column names, so headers containing path separators or invalid filename characters (for example a/b) produce invalid/nested paths like .../s_a/b_hist.png and savefig fails with FileNotFoundError. In multi-analyze --charts-dir, this causes chart generation to abort for otherwise valid CSVs, so column names should be normalized before composing filenames.

ℹ️ 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".

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