feat: add markdown report export and improve desktop CSV paste workflow#16
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 88133c9337
ℹ️ 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".
| question = self._get_question() | ||
| csv_text = self.csv_text.get("1.0", "end").strip() |
There was a problem hiding this comment.
Keep Tkinter widget access on the main thread
_analyze_async launches _analyze in a worker thread, but _analyze immediately reads Tk widgets via self.question.get(...) and self.csv_text.get(...); the same off-main-thread pattern is also used in _doctor/_run_model with self.model.get(...). Tkinter is not thread-safe, so these reads can intermittently raise Tcl errors or freeze/crash the desktop app when users click 분석/환경진단/BitNet 실행. Capture UI values on the main thread before starting the worker (or marshal reads via after) and keep background threads limited to non-UI work.
Useful? React with 👍 / 👎.
Motivation
report).Description
build_markdown_reporttobitnet_tools/analysis.pyto render a markdown report with column info and numeric statistics.reportsubcommand inbitnet_tools/cli.pythat builds an analysis payload and writes a markdown report file viabuild_markdown_report.bitnet_tools/desktop.py) to include a CSV text input panel, auto-load file content into that panel when a CSV is opened, and accept either a selected file or pasted CSV text for analysis.bitnet_desktop.pyw,BitNet_Desktop_Start.bat, andbitnet-desktopscript inpyproject.toml, updatedREADME.mdto document the new features, and added tests intests/test_analysis.pyandtests/test_cli.pyfor report generation and CLI behavior.Testing
pytest -qand all tests passed (9 passed).python -m bitnet_tools.cli --helpand confirmed the newreportsubcommand appears in the usage output.python -m bitnet_tools.cli report /tmp/sample.csv --question "요약" --out /tmp/r.mdwhich saved a valid markdown report (inspected withhead).tests/data.csv) raisedFileNotFoundErroras expected for missing input files.Codex Task