How oigonzalezp2024/python-software-architecture works
Main Components
• Enterprise Layer:
• Enterprise/enterpriceDependecies: Ensures that all external dependencies are present.
• Enterprise/enterpriseCore: Consolidates dependencies through inheritance in a single core class.
• Enterprise/enterpriseDeployment: Manages cloning and updating dependencies from remote repositories.
• Enterprise/enterpriseFlaskFlow: Likely integrates with Flask for web-based flows if needed.
• Project Layer:
• Project/projectConfig: Contains the configuration (projectConfig.py) that determines how external dependencies are cloned and installed.
• Project/dependencies: Houses the actual external dependencies (external repositories cloned by the system).
• Project/data: Manages data access and transformation, along with organized directories for raw data (data, json, oneMonth, quarter, semester) and transformed results (transformedData -> adminPath, images, json).
• Project/extract: Implements data extraction processes (various Python scripts to pull data like “promediosSipsa…”).
• Project/reports: Houses generated PDF reports.
• Additional supportive directories such as static and templates (both at root and inside project) which provide styling and HTML for visualization via Flask.
Relationships and Interactions
• Dependency Management Flow:
• The process begins with the project configuration script (project/projectConfig/projectConfig.py) which, before any primary execution, verifies if external dependencies exist.
• If dependencies are missing, the system uses GitPython (and optionally gitPullDependencies.py) to clone/update the repositories stored under the enterprise layer.
• Data Flow and Processing:
• External data is first fetched using a SOAP webservice (via demoClienteWebserviceSipsa.py using the zeep library).
• The raw data is then delimited over time intervals (via demoDelimitedData.py) and further processed – extracted (project/extract scripts) and then transformed (demoTransformData.py writing to project/data/transformedData/json).
• Visualization of data occurs with demoMatplotDraw.py (drawing charts from the transformed data and saving images).
• Execution Cycle:
• A demonstration script (demoAll.py) ties all these functions together in a sequential execution, ensuring all parts of the system execute in a proper order.
Architectural Patterns and Technologies
• The architecture leverages modular separation between dependency management (enterprise) and business logic/data processing (project).
• The design hints at a layered or “pipeline” approach where data moves from extraction to transformation to reporting.
• The project uses external libraries (e.g., fpdf2 for PDF generation, GitPython for repository management, zeep for SOAP requests) that are central to certain layers of the architecture.
• The use of Flask (via enterpriseFlaskFlow and the presence of templates and static files) indicates there is also a web interface component, likely aimed at visualization or admin control.
Details to Capture
• Details such as:
• Dependency management using GitPython (and supporting libraries from enterprise modules),
• Data extraction, transformation, and visualization pipeline,
• Integration points (i.e., how the Flask-based interface retrieves and displays data processed by the system).