Git Product home page Git Product logo

the-blue-alliance's Introduction

The Blue Alliance

The Blue Alliance is a FIRST Robotics tool to help teams scout for, compete at, and relive competitions. You can see how the whole site works here, or even write code to make it better!

Contributing

  1. Fork this project!
  2. Make your changes on a branch.
  3. Make changes!
  4. Send pull request from your fork.
  5. We'll review it, and push your changes to the site!

If you're having trouble getting set up, reach out to us at our mailing list and we'll help you through it!

Setup

  1. Learn a bit about Git and Github:
  2. Install App Engine
    • Specifically use the Python SDK
    • Run installer and allow it make symbolic links (you will be asked to enter your root password)
  3. Get the latest version of The Blue Alliance
    • Run git clone git://github.com/gregmarra/the-blue-alliance.git
  4. Import the project into Google App Engine Launcher
    • By default TBA uses port 8088, make sure your local setup is consistent with this
  5. Run the app in App Engine
  6. Get some test data: In your terminal console, from the the-blue-alliance directory, run the following command
  7. You should now have a basic development installation!

Paver Commands

Paver is an easy way automate repetitive tasks. For The Blue Alliance, these tasks are stored in pavement.py. To install paver, use one of the methods below:

Simple Commands

  • paver clean - Deletes artifacts that the app creates that you don't need.

CSS Icon Sprites

If possible, icons are combined into single files called sprites to reduce the number of requests needed to render a page. To simplify development, we add icons normally (not to the sprite), and every so often we will combine them all into a sprite and fix all necessary CSS. Potentially useful: http://spriteme.org/

LESS

The CSS files are compiled from LESS to ease in development. Use a program such as http://wearekiss.com/simpless that automatically compiles the LESS files into CSS. Just drag static/css into SimpLESS, and whenever you edit and save a LESS file, the CSS will be compiled! Make sure "minify" is enabled in order to minimize the final CSS file size.

CSS/Javascript Combination and Compression

Once the LESS files are compressed into CSS, we combine the resulting file with other CSS files, such as 'jquery-ui-1.8.13.custom.css.' Similarly, we combine all relevant Javascript files into a single file and compress them. This means that whenever changes are made to CSS or Javascript, you must run of the following:

  • paver less
  • paver javascript

Facebook

We use the Facebook SDK to allow users to log in to The Blue Alliance using their pre-existing Facebook account. The Javascript portion of this is loaded dynamically and the backend portion is kept in facebook.py, provided by https://github.com/pythonforfacebook/facebook-sdk. To enable your development environment, you must register an app at the https://developers.facebook.com/apps.

Once you register an app (named tbatv-dev-YOURNAME), you can configure The Blue Alliance to use the App ID and secret by adding them to your Sitevars (/admin/sitevars/create). Each developer should have their own App ID and secret.

Testing

Testing is implemented using a combination of unittest2 and the Google App Engine testbed framework. Test coverage is a work in progress, and focuses on maintaining datafeed integrity in the face of optimizations and changes to FIRST's data formats.

To run the tests, or just the offline (fast) tests:

  • paver test
  • paver test_fast

the-blue-alliance's People

Contributors

gregmarra avatar fangeugene avatar legoktm avatar brandondean avatar techguydave avatar zachorr avatar josephbisch avatar samuelcouch avatar chrismarra avatar tombot avatar dweitz avatar pordonj avatar

Watchers

James Cloos avatar Nathan Zhang 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.