Skip to content

Latest commit

 

History

History
92 lines (66 loc) · 2.53 KB

File metadata and controls

92 lines (66 loc) · 2.53 KB

ShopPyBot Refactor

Overview

This document outlines the refactoring process and the current status of the ShopPyBot project. The goal of the refactor is to modernize and optimize the codebase, making it more maintainable, scalable, and efficient.

Initial Goals

  1. Code Structure and Organization

    • Modularize the Code
    • Configuration Management
  2. Performance Improvements

    • Multi-threading/Multiprocessing
    • Asynchronous Programming
  3. Selenium Enhancements

    • Headless Browsing
    • Browser Automation Alternatives
    • Error Handling and Recovery
  4. Security and Data Privacy

    • Obscure Sensitive Data
    • Logging and Monitoring
  5. Dependency Management

    • Virtual Environments
    • Dependency Updates
  6. Testing and Quality Assurance

    • Unit Testing
    • Integration Testing
    • Continuous Integration/Continuous Deployment (CI/CD)
  7. Documentation and Maintainability

    • Code Documentation
    • User Documentation
    • Code Reviews
  8. Future-Proofing

    • Scalability
    • Modular Design

Current Status

Completed ✅

  1. Code Structure and Organization

    • ✅ Modularized the code into amazon_bot.py, bestbuy_bot.py, config.py, logger.py, utils.py, and main.py.
    • ✅ Configuration management using config.yml and PyYAML.
  2. Security and Data Privacy

    • ✅ Obscured sensitive data by storing it in config.yml.
    • ✅ Implemented robust logging using writeLog.
  3. Selenium Enhancements

    • ✅ Improved error handling in functions.
    • ✅ Implemented automatic downloading of the latest ChromeDriver using webdriver_manager.
  4. Driver Management

    • ✅ Ensured the driver is reinitialized after each iteration to maintain a fresh browser session.
  5. Database Integration

    • ✅ Implemented SQLite database for tracking purchased items.

In Progress ⚠️

  1. Documentation and Maintainability
    • ⚠️ Added some docstrings and comments.
    • ⚠️ Created this refactor.md document.

Not Yet Started ❌

  1. Performance Improvements

    • ❌ Multi-threading/Multiprocessing
    • ❌ Asynchronous Programming
  2. Testing and Quality Assurance

    • ❌ Unit Testing
    • ❌ Integration Testing
    • ❌ Continuous Integration/Continuous Deployment (CI/CD)
  3. Future-Proofing

    • ❌ Scalability
    • ❌ Modular Design

Next Steps

  1. Complete the documentation and maintainability tasks.
  2. Implement performance improvements.
  3. Set up testing and CI/CD pipelines.
  4. Plan for future-proofing the codebase.