Skip to content
Martin Davtyan edited this page Jul 14, 2015 · 14 revisions

System overview

The breakdown of the system is the following:

  1. Add-in part. This is a C# part of the codebase that represents a MS Excel add-in. Lives in comnsense/comnsense/ and consists of:
  • Excel add-in ThisAddin.cs, that communicates with Excel through COM and to Router through ZeroMQ.
  • Router Router.cs, that talks to Agent through ZeroMQ.
  1. Agent part. This is Python code that runs as a Windows application, that lives in comnsense/agent/ and consists of:
  • Agent. When an Excel file is opened it receives a message and allocates a Worker for this file. Then it routes messages between Excel and worker.
  • Worker. Allocated for a particular Excel file, it receives events from Excel, processes them in its runtime and spits back actions.
  1. Server, which is intended to store models we built for workbooks (Excel files). For example, if comnsense once learned where the header of the file is, it can be stored in a server and retrieved the next time the workbook is open.

For a description of events, actions and communication between system parts see Methods.

Debugging comnsense

  1. Run the comnsense agent agent\bin\comnsense-agent with a 32-bit version on Python, e.g. C:\Users\dufft\code\comnsense\agent\bin>C:\Python27_x86\python.exe comnsense-agent
  2. Open the Visual Studio solution comnsense\comnsense\comnsense.sln and Start it in Debug mode.

Logging

The agent log is being written to C:\Users\<USER>\AppData\Roaming\Comnsense\Agent.log.

Building comnsense

From the files in this repo you can build a complete comnsense installation package. For it you need to:

  1. Build an Add-in C# application build with Visual Studio, find instructions here. This will produce a complete Add-in installation distribution.
  2. Package an Agent python code and binaries into a distribution as shown here. This will produce a folder from which the agent can be run.

This will produce two separate distributions that can be run on any Windows machine.

Installing and running comnsense

  1. Transfer two distribution folders to the PC you want to install comnsense on.
  2. Install the Add-in using Setup.exe from the first folder.
  3. Run comnsense Agent by starting comnsense-tray.exe from the second folder. Agent does not require installation and fully runs from the folder. Logs are written to it as well.

Tests

To execute tests use next command:

$ python runtests.py

If you want to see allure report:

$ python runtests.py --alluredir ./allure
$ allure generate -o ./allure-report -v 1.4.9 -- ./allure
$ allure report

Runtime test cases: