How henearkrxern0/python_graphing_app works
Project type and purpose
• This is a desktop, single-process Python application for graphing CSV data.
• Purpose: provide a Tkinter GUI for loading CSVs, configuring axis parameters, plotting with Matplotlib, and saving graphs.
File structure
• Top-level:
• app/ – contains core modules
• assets/, examples/, img/ – static data, sample CSVs, and screenshots
• requirements.txt – external dependencies
• app/ modules:
• main.py – entry point (initializes and runs the GUI)
• gui.py – Presentation layer (GraphingApp class and all widgets)
• file_manager.py – Handles folder/file selection, encoding detection (Chardet), CSV loading (Pandas)
• plot_manager.py – Business logic for preparing data, plotting graphs (Matplotlib), saving images
• settings.py – Configuration constants (default separators, file filters, scaling defaults)
• code_test.py – Utility or test harness (optional, lower-priority component)
README for insights
• Confirms use of Tkinter, Pandas, Matplotlib, Chardet.
• Describes user workflows: select folder, load files, set header/indices/separators, normalize/scale, set axis limits/labels, plot, save/reset.
• No distributed services—everything lives in one process.
Main components
a. Presentation Layer
• GraphingApp (app/gui.py)
b. Application Logic Layer
• FileManager (app/file_manager.py)
• PlotManager (app/plot_manager.py)
• Settings (app/settings.py)
c. Infrastructure
• Local File System (input CSVs in examples/ or user folder; output PNG/SVG)
d. External Libraries
• Tkinter (GUI toolkit)
• Pandas (data loading and manipulation)
• Chardet (encoding detection)
• Matplotlib (plot rendering and export)
Relationships and data flow
• User → (clicks) → GraphingApp
• GraphingApp → FileManager → File System → Pandas & Chardet → returns DataFrames → GraphingApp
• GraphingApp → PlotManager (passes DataFrames + settings) → Matplotlib → rendering in GUI
• PlotManager → File System (on “Save”) → writes PNG/SVG
• Both FileManager & PlotManager log events → GraphingApp.log window
Architectural patterns and principles
• Layered (Presentation → Application Logic → Infrastructure)
• Single-responsibility: each module has one clear role (GUI, I/O, plotting, config)
• Dependency injection (GraphingApp passes user settings into FileManager/PlotManager)
• Monolithic desktop application (no microservices, no database server)
Detailed checklist
• [ ] GraphingApp (UI) block with sub-widgets listed
• [ ] Settings block feeding into FileManager & PlotManager
• [ ] External Libraries grouped on one side