CI/CD Workflows
Relevant source files
The following files were used as context for generating this wiki page:
Introduction
The CI/CD (Continuous Integration/Continuous Deployment) workflows for the Rosy Tax Processor project ensure the reliability and stability of the AI-powered tax document processing system. These workflows automate the testing of document classification, field extraction, tax calculation, and PDF generation to maintain a 100% complete prototype status.
The system leverages GitHub Actions for automated execution upon specific repository events, such as pushes or pull requests, and supports containerized deployment through Docker. This automation is critical for validating modular components like the semantic mapping system and the core processing pipeline before they are deployed to a production-like environment.
Sources: README.md:16-43, README.md:144-150
Continuous Integration (CI)
The CI process is designed to validate every change made to the codebase. It primarily focuses on executing the comprehensive test suite and ensuring that dependencies are correctly managed.
Automated Testing
The project includes 14 comprehensive tests that cover the major components of the system. These tests are executed using pytest and are categorized to ensure both unit and integration integrity.
| Category | Description | Relevant Files |
|---|---|---|
| Core Workflows | Validates the ingestion-to-generation pipeline. | test_pipeline.py, test_full_pipeline.py |
| Tax Logic | Verifies federal tax computation accuracy. | test_taxcalc.py |
| Security | Ensures file sanitization and PII masking. | test_security.py |
| API Endpoints | Tests Flask backend routes and responses. | test_backend.py, backend.py |
| Field Mapping | Validates semantic similarity and exact field mapping. | test_auto_mapper.py, test_exact_field_mapping.py |
Sources: README.md:92-108, tests/test_pipeline.py:1-26, tests/test_full_pipeline.py:1-17
Workflow Logic
The CI workflow follows a standard sequence: environment setup, dependency installation, and test execution.
The diagram shows the logic for the GitHub Actions workflow triggered by code changes.
Sources: README.md:144-150, SETUP.md:13-20
Continuous Deployment (CD)
The deployment workflow is centered around containerization using Docker, allowing for consistent execution across different environments.
Docker Support
The system provides a Dockerfile to build the rosy-tax-processor image. This image encapsulates the Flask backend, the tax calculation engine, and all necessary AI models (approx. 500MB).
| Command | Action |
|---|---|
docker build -t rosy-tax-processor . | Compiles the application into a reusable image. |
docker run -p 5000:5000 rosy-tax-processor | Deploys the containerized application on port 5000. |
Sources: README.md:136-141, SETUP.md:73-77
Pipeline Orchestration
The deployment relies on the stability of the pipeline.py orchestration. This module ties together the ingestion, classification, and generation phases, ensuring that the deployed service can handle multiple file types (PDF, TXT, PNG, JPG) reliably.
This sequence illustrates the flow from code validation to automated container deployment.
Sources: README.md:112-120, pipeline.py:46-95, backend.py:141-143
Configuration and Dependencies
The CI/CD pipeline requires specific environment configurations to handle the AI/ML components and document processing libraries.
- Python Version: 3.12+
- Core Dependencies:
pytest,reportlab,pdfrw,sentence-transformers - Optional OCR:
pytesseractandPilloware required for image processing in the pipeline.
Sources: requirements.txt:1-15, SETUP.md:9-12
Summary
The CI/CD workflows for the Tax-Processor project integrate automated testing via GitHub Actions and containerization via Docker. By validating 14 test categories—ranging from core parsing to PII security—the system ensures that the modular tax processing pipeline remains functional across updates, ultimately supporting a reliable local or containerized deployment.