Skip to content

SmartReconcile is an automated data reconciliation tool designed to compare datasets, detect mismatches, and manage exceptions efficiently. Built with Python and PostgreSQL, it supports configurable workflows, exception tracking, and automated testing with GitHub Actions for reliable CI/CD deployments.

License

Notifications You must be signed in to change notification settings

harishkamathuk/smart-reconcile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Combining the setup instructions, testing automation, local application development, Docker integration, and CI/CD pipeline configuration into a comprehensive and single response, here's everything you need to set up the SmartReconcile project from scratch with GitHub for source control, CI/CD, testing, and error handling automation.


SmartReconcile

Overview

SmartReconcile is an automated reconciliation tool designed to compare and match datasets from different sources, identify discrepancies, and notify users of mismatches. The system is modular, allowing configuration for multiple reconciliation logic use cases across financial, asset management, or other industries reliant on data comparisons.

This project incorporates Python as the core programming language and PostgreSQL for data persistence while adhering to testing and deployment automation using GitHub Actions.


Table of Contents

  1. Features
  2. Technologies Used
  3. Setup Instructions
  4. Running the Application
  5. Testing & Automation
  6. Docker Integration (Optional)
  7. Setting up CI/CD with GitHub Actions
  8. Contributing
  9. License

Features

Core Features:

  • Data Comparison: Compare defined datasets on user-specified keys and rules.
  • Exception Management: Flag discrepancies automatically for further investigation.
  • Custom Reconciliation Logic: Define rules to support multiple reconciliation workflows dynamically.
  • User Notifications: Integrated email alerts to notify users about mismatches.
  • Easy Deployment with Docker: Containerize the solution for portability across environments.

Technologies Used

  1. Python 3.x: The primary development language.
  2. Flask: (Optional) A web server layer for extended use-case scenarios.
  3. PostgreSQL: Relational database for storing logs, session data, and reconciliation reports.
  4. Docker: Optional, for consistent, containerized deployments.
  5. pytest: Unit testing library for automated validation.
  6. GitHub Actions: CI/CD pipeline to ensure smooth testing and deployments.

Setup Instructions

Step 1: Prerequisites

Make sure these tools are available on your system:

  • Python 3.x
  • PostgreSQL
  • pip
  • git
  • Docker (optional)

Step 2: Clone the Repository

git clone https://github.com/YOUR_USERNAME/SmartReconcile.git
cd SmartReconcile

Step 3: Set Up Virtual Environment

  1. Set up the Python virtual environment:

    python3 -m venv venv
    source venv/bin/activate  # Linux/Mac
    .\venv\Scripts\activate   # Windows
  2. Install the required dependencies:

    pip install -r requirements.txt

Step 4: Set up PostgreSQL

Create a database to use with SmartReconcile:

psql -U postgres -c "CREATE DATABASE smart_reconcile;"

Ensure the connection settings are correctly configured in config.py. You can configure this file with database connection details.


Step 5: Run Database Migrations (Optional)

Apply database migrations if you use database schema migrations:

python manage.py db upgrade

Step 6: Start the Application

  1. For a simple Python entry point:

    python run.py
  2. Or for a web-based UI:

    flask run

Running the Application

Once the application is running, you can:

  1. Upload or connect datasets for reconciliation.
  2. Configure your reconciliation logic in the database or logic config files.
  3. Trigger reconciliation from the UI or CLI.
  4. View results via logs or notifications.

Testing & Automation

pytest is configured to ensure quality and correctness.

Run Tests Locally

pytest

GitHub Actions for CI/CD

We set up GitHub Actions for automated testing every time code is pushed or a pull request is created.

Save this file as .github/workflows/python-app.yml:

name: CI

on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main

jobs:
  test:
    runs-on: ubuntu-latest

    steps:
    - name: Checkout the repository
      uses: actions/checkout@v2

    - name: Set up Python
      uses: actions/setup-python@v2
      with:
        python-version: 3.x

    - name: Install dependencies
      run: |
        python -m venv venv
        source venv/bin/activate
        pip install -r requirements.txt

    - name: Run Tests
      run: |
        source venv/bin/activate
        pytest

Docker Integration

Docker allows SmartReconcile to run in isolated, portable containers across development and production environments.

Dockerfile Example

FROM python:3.9

WORKDIR /app

COPY requirements.txt .

RUN pip install -r requirements.txt

COPY . .

CMD ["python", "run.py"]

Build & Run:

docker build -t smart_reconcile .
docker run -p 5000:5000 smart_reconcile

Setting up CI/CD with GitHub Actions

  1. Every push or pull request triggers tests using GitHub Actions.
  2. Testing ensures:
    • Code quality.
    • Bug detection early in the development lifecycle.
  3. Monitor the Actions tab on GitHub for workflows.

Contributing

We welcome contributions to improve the SmartReconcile ecosystem:

  1. Fork the repository.
  2. Clone your fork:
    git clone https://github.com/YOUR_USERNAME/SmartReconcile.git
  3. Implement changes and add tests to /tests.
  4. Submit a pull request with clear explanations.

License

This project is licensed under the MIT License.
See the LICENSE file for details.


Next Steps

  • 🚀 Feature Requests: Suggest logic customization, email notification preferences, or advanced exception resolution tools.
  • 🛠️ Docker Enhancements: Improve deployments via optimized Dockerfiles.
  • 📊 Monitoring: Add real-time monitoring tools or dashboards.

Happy reconciling! ✨

About

SmartReconcile is an automated data reconciliation tool designed to compare datasets, detect mismatches, and manage exceptions efficiently. Built with Python and PostgreSQL, it supports configurable workflows, exception tracking, and automated testing with GitHub Actions for reliable CI/CD deployments.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published