GithubHelp home page GithubHelp logo

riccap / lodeg Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 6.72 MB

Log analytics for the LODE platform

License: GNU General Public License v3.0

Python 84.71% CSS 1.12% JavaScript 0.40% HTML 11.56% Makefile 0.64% Shell 1.57%

lodeg's Introduction

LoDEg

Log analytics for the LODE platform.

The library: lodegML

lodegML is the name of the library on which the project runs. It exposes a facade API through the class LodegSystem. Please refer to the library documentation.

Requirements

Make sure you have python3.X installed and update pip to the latest version.

$ pip3 install --user --upgrade pip

Next, you can optionally create an isolated environment. This is recommended as it makes it possible to have a different environment for each project (e.g. one for this project), with potentially very different libraries, and different versions:

$ pip3 install --user --upgrade virtualenv
$ virtualenv -p `which python3` env

This creates a new directory called env in the current directory, containing an isolated Python environment based on Python 3. If you installed multiple versions of Python 3 on your system, you can replace `which python3` with the path to the Python executable you prefer to use.

Now you must activate this environment. You will need to run this command every time you want to use this environment.

$ source ./env/bin/activate

Next, use pip to install the required python packages. If you are not using virtualenv, you should add the --user option (alternatively you could install the libraries system-wide, but this will probably require administrator rights, e.g. using sudo pip3 instead of pip3 on Linux).

$ pip3 install --upgrade -r requirements.txt

WebApp

To deploy the WebApp run the following command in the folder lodeg_website:

$ python manage.py runserver [port_number]

The port number is not mandatory, defaults to 8000.

Tests

The following tests are provided:

  • Unit tests (with coverage)

    $ make tests [i,interactive]
    
  • Library integrity tests (between the WebApp and the standalone library)

    $ make check
    
  • Performance tests and benchmarking (todo)

    $ make tests performance (todo)
    
  • Logs integrity check

    $ make tests i
    

    and then select System test.

lodeg's People

Contributors

riccap avatar riccapunitn avatar

Watchers

Marco Ronchetti avatar  avatar

lodeg's Issues

Automate stress test for the platform

Automate DB migration and script launch to easily run stress tests on the platform.

Acceptance criteria: a script will be provided (or in Makefile) that runs the test population generation script, imports the data into the database and runs the test suite. Each build should provide a report that contains at least:

  • memory usage
  • clock time
  • number of queries launched

Complete the Contact page in the WebApp

The Contact page in the WebApp does not work as expected. The issue is due to the image upload.

Acceptance criteria: the user gets to the Contact page, fills the form (with the upload of an image) and clicks the submit button. At the end a email has been sent to the web app admin address.

Add MakeFile

Add a make file to automate:

  • clean
  • test
  • deployment

Add settings page to the WebApp

The library facade interface (the LodegSystem class) is configurable; we will need to provide a way for the administrator to change these configurations in the WebApp.

Add integrity check for real_logs

Before the deployment of the website we need to ensure that the system works nominally; to do so, we need to provide a test suite that checks for records integrity, namely running the whole library and looking for exceptions.

Implement CSV export from command line

By now LodegSystem.getCSV() works only when used from the WebApp (it returns an HTTP response). We should implement a way of exporting data from command line.

Automate code migration for the extraction library

The extraction library lives in two versions: the stand-alone version and the WebApp one; although they are the same library, the relative imports are different. We need to provide a way of automatically migrating the library from one folder to the other (fixing the imports) and the other way round.

Fix the library test suite

Fix the library test suite to use the most recent version of the extraction library. At the moment the test suite has some regression issues introduced when the log format was change.

Fix links in README

It seems that there are some links that still do not work in the project README.

Add plot capabilities without the web interface

The auto_plot library should be configured to plot graphs without the web interface. This can be easily achieved by leaving out the redirection of the function pyplot.plot(); jsut add a configuration param in LodegSystem.

Complete the About (Help) section of each page

The help section of each page is still missing content.

Acceptance criteria: the website provides the user with a meaningful and straightforward help section for each main page of the website.

Error when exporting datetimes

TypeError: key datetime.datetime(2017, 9, 6, 16, 26, 41, tzinfo=<bson.tz_util.FixedOffset object at 0x7fbcb7cfcbe0>) is not a string

Workaround = json.dump(skip_keys=True)

Probably the reason is that tzinfo is not an instance of datetime.datetime and the BetterEncoder does not work with it.

Fix day session distribution view

The day session distribution polar chart ticks are wrong; we can choose between two polar charts displaying 12 hours each, or a polar chart displaying 24 hours (the one we have now) and just correct the ticks labels.

Add missing locale detection to django application

Default locale has been set to CET. The Django framework requires manual detection and tuning of locale time zone in order to convert datetimes to the current locale, operation that is missing at the moment. Add a way to automagically detect locale timezones to the Django App.

Django keeps data in cache with mem_opt = True

When mem_opt is set to False Django (or MongoDD??) store the last query in cache; this memory is not necessary (at least if you do not want to run the extraction several times in a row); We should clear this cache and restrict data extraction to a maximum number of times to avoid performance issues and memory overflow.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.