GithubHelp home page GithubHelp logo

allanderek / drunken-octo-avenger Goto Github PK

View Code? Open in Web Editor NEW

This project forked from karlorg/drunken-octo-avenger

0.0 4.0 0.0 1.51 MB

Python/Flask version of Go website prototype, for comparison

License: Creative Commons Zero v1.0 Universal

Python 44.74% CoffeeScript 42.08% CSS 0.25% HTML 9.85% Shell 2.61% Mako 0.14% JavaScript 0.33%

drunken-octo-avenger's Introduction

Introduction

This is a turn-based Go server. We are mostly writing this for fun and as practice for other web applications.

Setup

Run the setup script, give the python version you wish to use as the only argument.

source setup.sh 3.4

This will create a virtual environment, activate it, and install all of the dependencies. We also have a setup script for users of fish, simply run this as . setup.fish.

manage.py

Once you have done that, a good place to start is to look in manage.py and run python manage.py --help, you can also get help for a specific command, for example python manage.py test --help.

database

Run python manage.py remake_db to create the database (by default it will appear in a directory named generated which is excluded from the git repo).

Generally you can run python manage.py db upgrade to upgrade the database to the most recent version, for example you may have to do this following a git pull. You can see the current version of the database with python manage.py db current.

compilation

So far the only code that needs compiling is the coffeescript in app/coffee (and at time of writing, the resulting Javascript is still included in the repo, so unless you're editing it, you shouldn't need to compile even that). In the repository root directory, run

python manage.py coffeebuild

running

(from virtualenv)

python manage.py runserver

Access the local server at http://localhost:5000 by default (other domains will need to be set in config.py to avoid confusing the login system).

testing

Just run python manage.py test to run all of our tests with coverage analysis. You can run more specific tests, for example whilst developing, rather than repeat everything here, just checkout the manage.py file.

testing against a remote server

For notes on running browser automation tests against remote servers, see the markdown file in app/browser_tests.

Javascript code

To enable the coverage options for Javascript, run a local server as above and open http://localhost:5000/static/tests/tests.html. This may later become the only way to run the tests if we start doing clever things that get the server involved in JS testing.

If you don't care about coverage, you can also just open the local file app/static/tests/tests.html in your browser.

drunken-octo-avenger's People

Contributors

karlorg avatar allanderek avatar

Watchers

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