Skip to content

jasonsuzhou/cogenda-web

Repository files navigation

   ______                                __          _       __       __  
  / ____/____   ____ _ ___   ____   ____/ /____ _   | |     / /___   / /_ 
 / /    / __ \ / __ `// _ \ / __ \ / __  // __ `/   | | /| / // _ \ / __ \
/ /___ / /_/ // /_/ //  __// / / // /_/ // /_/ /    | |/ |/ //  __// /_/ /
\____/ \____/ \__, / \___//_/ /_/ \__,_/ \__,_/     |__/|__/ \___//_.___/ 
             /____/                                                       

Build Status


  • Preparation: Install pip, virtualenv and dependency libs.

    $ sudo easy_install pip
    $ pip install virtualenv
    $ ./setenv.sh
    $ source venv/bin/activate
    $ brew install node
    $ make web
    
  • Start Web Server

    $ make alembic-init (optional: If alembic/cogenda_app.db not create yet)
    $ make run
    

    Open url http://localhost:8088

  • SQLite Migration

    $ make alembic-init
    

    Initial SQLite database file under migration/ folder.

    $ make alembic-revision 'eg. add new table/column'
    

    When create or update model, we need to run this command to generate schema version file. Under migration/version folder, then we need to edit generated file for db changes.

    $ make alembic-upgrade
    

    Once we finished edit the db version file, use this command to sync with SQLite.

    $ make alembic-version
    

    Run this command to verify current database schema version.

  • Babel I18n

    $ make babel-extract
    

    If you added new i18n message in *.py or *.html, this command will collect the i18n message, put into message.pot

    $ make babel-update
    

    This command combined babel-extract, then will sync the new i18n message into en/zh *.po files.

    $ make babel-compile
    

    After *.po file modified by dev, this command will compile the *.po to *.mo for application use.

  • Web assets optimizing

    $ make web
    

    Optimize web static files.

  • Static Code Check

    $ make pylint
    

    Warning / Error codes: http://flake8.readthedocs.org/en/latest/warnings.html#error-codes

    $ make jslint
    

    Check js code

  • Testing Your Code

    $ make test
    

About

Cogenda website.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published