Flocs is an intelligent web application for learning computer science, aiming at creating a flow experience. Flocs is developed by Adaptive Learning group at Faculty of informatics, Masaryk university.
Install Python 3, virtualenv, virtualenvwrapper and npm:
$ sudo pacman -S python python-virtualenv python-virtualenvwrapper npmInstall Grunt and Bower using npm:
$ sudo npm install -g grunt-cli karma-cli bowerConfigure virtualenv and virtualenvwrapper by adding the following two lines in your
~/.bashrc:export WORKON_HOME=~/.virtualenvs source /usr/bin/virtualenvwrapper.sh
Load the changes:
$ source ~/.bashrc
Clone the project repository:
$ git clone https://github.com/effa/flocs.gitCreate virtual environment and bind it with the project directory:
$ cd flocs $ mkvirtualenv flocs && setvirtualenvproject
The name of the virtual environment (flocs) should now appear in front of the prompt.
Install dependencies and initialize DB:
$ make update
The make update command uses pip, npm and bower to install both backend and frontend dependencies (including django and pylint) and it also sets up the database for development. (See Makefile for details.)
You can check that Django was installed correctly by command django-admin --version,
which should output 1.8.2.
You can deactivate the virtual environment by calling deactivate.
Start the virtual environment and jump to the project directory:
$ workon flocsPull the changes from the repository.
$ git pullUpdate dependencies and database:
$ make updateTake a look at the code written by your friends (quick code review). Also look at the issues, documentation and diagrams to decide what feature you want to implement.
Create and checkout a git branch for the implemented feature.
$ git checkout -b name_of_the_featureWrite unit tests for the implemented feature (and possibly integration tests as well). Check that the tests don't pass.
$ make testDevelop the feature. Enjoy it, experience the state of flow :-)
If you need a python console (with all models automatically imported), call:
$ ./manage.py shell_plusIf you need a testing server, call:
$ ./manage.py runserverIf you change data in fixtures and want to load them to the database:
$ make db-load-dataIf you change the data model, create and apply a migration:
$ ./manage.py makemigrations $ ./manage.py migrateIf you are working on frontend, you need to start the testing server and run
grunt worktask to automatically apply all changes into a development build (concatenating html partials, JavaScript and CSS files, compiling index.html, etc.). This can be done by a single command:$ ./manage.py gruntserverTake a regular breaks (e.g. after 25 minutes), stretch yourself (including your eyes).
Test the implemented feature and check the code by pylint:
$ make test $ make checkCommit changes:
$ git add changed_files $ git commit -m "Implement feature X"Merge the feature branch to the master branch:
$ git checkout master $ git merge name_of_the_featurePush changes to the GitHub:
$ git pushDeactivate the virtual environment:
$ deactivateCelebrate the developed feature with some physical exercise and healthy snack.
- A lot of information about the project can be found in our wiki.
- Check useful development tools.
- Check our style guide.