Skip to content

This is a Python project created when I was an intern in Thomson Reuters. It aims to monitor the live rule's state on the server and automatically send report to group peers to help them track potential problems.

License

Notifications You must be signed in to change notification settings

baiwfg2/rule_automation

Repository files navigation

Basic Introductions

This project includes two part: one is Python program to do the monitoring work, another is C# program to send email automatically to group peers.

The project is used to check the potential rule errors on the machine VAH06 and VAH20, and generate daily report.

Here are simple introductions of project hierarchy:

  • .idea
    folder created by PyCharm IDE. You can ignore it for the most of time.

  • csv_report
    folder filled with data file extracted from server web page. They are all .csv files, which can be easily opened by Microsoft Office Excel. And some of them will be sent as email attachments.

  • EmailSender
    C# project folder created with Visual Studio 2012 to generate EmailSender.exe. You may modify it for your own needs.

  • chromedriver.exe
    chrome plugin for selenium. In my example, I use the chrome browser to do the automation test, so this plugin must be included.

  • config.txt
    main configuration file used by main.py and EmailSender.exe. It defines some custom variables with its own format to meet dynamic changes.

  • EmailSender.exe
    program created by EmailSender project and invoked by main.py to send emails automatically to group peers, since the email-sending code wrote by main.py didn't work well.

  • errors.txt
    error file generated by main.py to show the possible rule errors.

  • main.py
    core module script called by Python

  • report.html
    final report HTML file generated by main.py and sent by EmailSender.exe. Final example

  • run.bat
    bat helper file to launch the whole program. Executed by Windows Task Scheduler.

Installation Guide

Main installation process is as follows:

  1. Install Chrome browser
  2. Install python2.7.9 and add locations "Python27","Python27\Scripts" to environment variable PATH
  3. Install python-selenium library. Use the following command in Command Prompt:
    pip install -U selenium
  4. Copy chromedriver.exe to PATH, you may choose to copy it to C:\windows\system32
  5. To run EmailSender.exe, .Net Framework 4.0 should be installed
  6. Copy the root directory to a location and create a basic task in Task Scheduler. Let the task points to run.bat and set the trigger time, then program will be runnng at the given time every day. Furthermore, if exceptions occur, email will be sent to the sender.

Maintainer: Lewis Chan
Mail: [email protected]

About

This is a Python project created when I was an intern in Thomson Reuters. It aims to monitor the live rule's state on the server and automatically send report to group peers to help them track potential problems.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published