Giter Site home page Giter Site logo

saltierl / distributedreplays Goto Github PK

View Code? Open in Web Editor NEW
73.0 11.0 27.0 72.7 MB

๐Ÿ‘จโ€๐Ÿ’ป Rocket League Replay Collection and Analysis Server that powers calculated.gg

Home Page: https://calculated.gg

License: Apache License 2.0

Python 29.62% HTML 11.20% Shell 0.24% CSS 0.01% Batchfile 0.01% TypeScript 53.21% Dockerfile 0.04% JavaScript 5.66%
flask python rocket-league replay-analyzer calculatedgg hacktoberfest

distributedreplays's Introduction

Calculated.gg Backend Build Status

Setup

  • Install Python 3.6/pip (do not use Anaconda)
  • pip3 install -r requirements.txt
  • Install and run Redis with default port + settings (Windows is included, Ubuntu)
  • Install postgreSQL (Windows, Ubuntu, Mac)
  • Make sure that postgreSQL is in the path
  • If only for local development change the password in Ubuntu to postgres
  • Ensure you have the latest LTS version of node and npm installed
  • Run cd webapp, npm install

Running

Ubuntu

  • Run RLBotServer.py.
  • cd webapp, npm start

Windows

  • Run win_run.bat
  • You can optionally kill the python process and start it in an IDE
  • You can log into psql command line with psql postgresql://postgres:postgres@localhost
  • If the included redis does not work here is install directions
  • DO NOT USE IDLE, either use command line or pycharm (pycharm is recommended for development of backend)

Mac

  • Run mac_run.sh

You need to run in python3. Mac comes with python2 by default so do not run any commands without the 3

Structure

The structure of the server is split into different directories:

  • blueprints - Backend Python code, split into subsections
  • database - Database objects and queries
  • helpers - Various scripts to help in maintaining the server
  • static - Static website files (JS/CSS/images)
  • tasks - Contains celery code user for processing the queue of replays
  • templates - Dynamic website files (rendered HTML templates)

Setup and Running with Docker (Docs WIP)

Basic Dependencies

Run Everything

# Start containers. Should be in project root directory (where docker-compose.yml is)
docker-compose up

# See your containers running
docker ps

Now go to localhost:3000 and the site should be running.

Testing

We run with pytest and use some features from it. If you are using an ide (pycharm/intellij) you must change the default runner from unit tests to pytests You can make this change by going to settings and searching for "unittest" Python unit test configuration

distributedreplays's People

Contributors

abbondanzo avatar axelalex2 avatar ayala-io avatar azillion avatar bakkes avatar bauerm97 avatar binury avatar darkace65 avatar dbauducco avatar dependabot[bot] avatar dtracers avatar erid avatar jbyers44 avatar jeroen11dijk avatar jeromepl avatar kcolton avatar longi94 avatar lucaspickering avatar lyrex avatar omgoshjosh avatar sciguymjm avatar skoocda avatar skyborgff avatar spcemarine avatar tarnas14 avatar twobackfromtheend avatar wildermuthn avatar xanderluciano avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

distributedreplays's Issues

Win detection is wrong

It seems to be detecting a win if the player is on the Blue team, and a loss if they are on the Orange team.

Uploading files with model hash

we need a way to know what the model hash of the file is.
And a way for the server to associate an eval score with the hash of that model.

Add serverside flags based on group

Have 3 global methods that can return true if you are in this group

isDev()
isAlpha()
isBeta()

Then we can flag features based on these values and don't have to worry about pushing bad features to the server.

Ball Stats

Ball stats should have more to do with position the ball spent on the pitch

Authentication state not present on nav bar / inner pages

On inner pages, current navbar does not contain an account/auth section. Convention is for this to live in top right.

Can't tell if logged in or not, and have to return to homepage to link to profile.

Becomes more important when more actions requiring auth (editing replay names, tagging replays, etc) become more prevalent.

calculated gg_players_overview_76561197960785799

Chart Title Font

Can we style the chart titles - that font really doesn't fit our site.

OpenID login fails for steam profile names longer than 10 characters

Figured out why I was 500ing on steam login. My steam profile/persona name: "AlpacaFlightSim" is longer than the players.platformname column which is limited to 10 characters.

[SQL: 'INSERT INTO players (platformid, platformname, avatar, ranks) VALUES (%(platformid)s, %(platformname)s, %(avatar)s, %(ranks)s)'] [parameters: {'platformid': '76561197960785799', 'platformname': 'AlpacaFlightSim', 'avatar': 'https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/d9/d9af01e851ba44a965b178a59447a92228915281_full.jpg', 'ranks': None}]

Steam's API docs don't give a specified character limit, the input field for changing the name maxes out at 30.

<input class="dynInput" type="text" name="personaName" id="personaName" size="30" value="AlpacaFlightSim">

but there's always the possibility of legacy names or who knows. 50 is fine, and we'll be able to monitor once we get sentry setup and all that. No reason to be conservative with varchar sizes. Postgres doesn't care.

PR coming shortly :)

Docker for services for easy setup & avoiding platform specific files

Setup my local environment with a docker-compose.yml file so I didn't need to worry about installing postgres, redis, rabbitmq (needed at the time).

The docker-compose.yml file currently using

version: "3"
services:
  redis:
    image: redis:4-alpine
    container_name: saltie-redis4
    restart: always
    volumes:
      - "./.data/redis:/data"
    ports:
      - 6379:6379
  # Don't think this is used anymore, but using docker saves headache of installing erlang and all that
  rabbitmq:
    image: rabbitmq:3-alpine
    container_name: saltie-rabbitmq
    restart: always
    volumes:
      - "./.data/rabbitmq:/data"
    ports:
      - 5672:5672

  postgres:
    image: postgres:10-alpine
    environment:
      POSTGRES_PASSWORD: postgres

Starting and stopping:

# Start service dependencies
$ docker-compose up
# Stop service dependencies
$ docker-compose down

Removes the needs for having most of the platform specific files that exist now. Great for local environments - optionally useful for future production deployments, but takes more consideration.

rattletrap could also be trivially be added to a docker image and ran in a container without much of a hit to total parsing performance - but thats for another issue

Car Onhover Area

Car onhover's active area are smaller than the cars themselves?

Common Legend

If possible, we could try to have a common legend.

Club stat tracking

This will be difficult since clubs can change on a per-replay basis. However I think we can treat them like parties and do it on a per-replay basis. So if someone was in the club at the time of the replay, we count the stats towards the club.

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.