Giter Site home page Giter Site logo

fanboi2's Introduction

Fanboi2 ci

Board engine behind Fanboi Channel written in Python.

Getting Started

The Better Way

We use Vagrant for development environment provisioning. You must first install Vagrant (and VirtualBox or any other available providers) and Ansible (for Windows users, please use Cygwin):

$ pip install ansible
$ vagrant up

That's it! You can now visit http://localhost:8080/ and proceed on development. To clean up the VM, you can run either vagrant destroy to completely remove the VM or vagrant halt to shutdown the VM. See also Teardown section of Vagrant documentation. After you've confirmed the app is running, please see Management Scripts section below.

The Adventurous Way

If you don't want to use Vagrant, you can manually install everything. Start with dependencies:

After all prerequisites are installed, you can now create the database and run setup:

$ createuser -P fanboi2                # Create fanboi2 user. Please set "fanboi2" as password.
$ createdb -O fanboi2 fanboi2          # Create main database.
$ createdb -O fanboi2 fanboi2_test     # Create test database (required for testing).
$ python3 setup.py develop             # Setup app in develop mode.
$ python3 provisioning/genconfig.py    # Generate settings.ini and alembic.ini.
$ alembic upgrade head                 # Migrate database.

It is recommended to run tests and see if all tests passed:

$ pip install nose
$ nosetests

If all tests passed, you can now run the application. You must first setup assets compilation and do an initial compile before running:

$ npm install
$ brunch build
$ pserve development.ini --reload

You may also found brunch watch useful for automatic assets compilation:

$ brunch watch

You should now be able to visit http://localhost:6543/ and proceed on development. After you've confirmed the app is running, please see Management Scripts section below.

Management Scripts

We currently uses CLI to manage board settings. If you use Vagrant, you will need to SSH into the development box and run the following commands before begin:

$ vagrant ssh
$ cd /vagrant
$ source /srv/http/fanboi2/env/bin/activate

After you've setup the environment, the first thing you want to do is to create a new board:

$ fb2_create_board development.ini --title Lounge --slug lounge
$ fb2_create_board development.ini --title Demo --slug demo

Above commands will create a board named "Lounge" and "Demo" at /lounge and /demo respectively. Now if you want to update something such as description, you can now do:

$ fb2_update_board development.ini -s lounge -f description

Slug is used here to identify which board to edit. All database fields in board are editable this way. Some field, such as settings must be a valid JSON. Both commands also accepts --help which will display some available options.

Contributing

We use git-flow as primary branching model. All developments are done in the develop branch; master branch is the most stable and will be deployed immediately to the live site. You can install git-flow by following git-flow installation instructions (use the default values). Although using git-flow is not a requirement for pull request, it is recommended to do so:

  1. Fork this repo.
  2. Start a new feature with git flow feature start feature-name.
  3. After you've done, open a pull request against develop branch of this repo.

Please make sure that test coverage is 100% and everything passed. It's also a good idea to open a bug ticket for feature you want to implement before starting.

We have development IRC channel at irc.freenode.net#fanboi. Although if you want to submit patch anonymously you can also create git patch and post it to support thread as well.

License

Copyright (c) 2013, Kridsada Thanabulpong
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  • Neither the name of the author nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Icons License

Icons included with this software package are part of Glyphicons and are not covered by the open-source license. You must purchase a separate license for use outside the project at Glyphicons website.

fanboi2's People

Watchers

 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.