Giter Club home page Giter Club logo

3pp-visualiser's Introduction

3PP Visualiser

As 3PP contests become more relevant, a need arises for analysis tools.

This repo contains a Python script to generate SVG graphs of 3PP contests, plus tooling to put it online.

Using the script

Download and run visualise.py. There are no dependencies other than modern Python 3.

README - WSGI

This folder contains a WSGI application intended for use with uWSGI (threeparty.py), and corresponding configuration files.

The script assumes the presence of a copy of this repository in the static website serve path /var/www/SITE_NAME.tld/html/FOO, such that

  • https://SITE_NAME.tld/FOO/index.html is where the requests come from
    • (i.e. create-index.py's --site-root is https://SITE_NAME.tld/FOO)

Setup (for recent Debian/Ubuntu)

Install the server-specific packages (or perhaps ensure they're installed):

sudo apt-get install nginx uwsgi

(N.B.: I tried using a virtualenv and it was a bit of a mess, so everything is system-installed.)

Create a service directory:

sudo mkdir /etc/threeparty

Copy the WSGI-related files from this subdirectory of the repository to the service directory:

sudo cp -r /PATH/TO/threeparty/ /etc/threeparty

Copy the threeparty.service.conf where it needs to be, then edit if required:

sudo cp /etc/threeparty/threeparty.service.conf /etc/systemd/system/threeparty.service
sudo nano /etc/systemd/system/threeparty.service

Enable and activate:

sudo systemctl enable --now threeparty

Test if it all started OK with systemctl status threeparty.

Meanwhile, in your NGINX config you'll need at least the following:

location /FOO/wsgi {
	include uwsgi_params;
	uwsgi_pass unix:///run/uwsgi/threeparty.sock;
}

N.B: /FOO should be as above. It also might not exist, in which case you'd just have https://SITE_NAME.tld/index.html and location /wsgi {, etc.

A full sample configuration is in nginx.conf.

If you're running this on its own subdomain then you can probably just go:

sudo cp nginx.conf /etc/nginx/sites-available/SITE_NAME.TLD
sudo nano /etc/nginx/sites-available/SITE_NAME.TLD
sudo ln -s /etc/nginx/sites-available/SITE_NAME.TLD /etc/nginx/sites-enabled/SITE_NAME.TLD

Test your configuration with sudo nginx -t and then reload to activate:

sudo systemctl reload nginx

You should now be able to use the site. (If not, the log file location is specified in the .ini)

TODO

  • points of interest that work over the web

3pp-visualiser's People

Contributors

alexjago avatar

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.