.env.example
if you need to run on local machine cp .env.example .env
and change the value accordingly.devsummit
on your mysql if you haven't change the DB_NAME
on .env
file.make env
to setup your environments.source env/bin/activate
make deps
inside env
to automatically install all dependencies in requirements.txt
touch app.db
, naming convention follows the configuration in alembic.ini
sqlalchemy.url
value.alembic upgrade head
python manage.py seed
python manage.py server
.You can run the server on docker simply by running: *not in virtual environment
docker-compose build
docker-compose up
docker-compose exec database sh
and run mysql_upgrade -u root -p
docker-compose exec web sh
and run alembic upgrade head
then seed by running python manage.py seed
additional setup including migrations
and seeding
will be the same as setup instruction above by docker-compose exec bash web sh
to get into the container environment.
and server should be up on localhost:5000
Make sure flake-8 is installed on your env, by running make deps
inside your env
Linting is achieved by integrating flake8.
You can check you PEP8 compliance by typing: make lint
We use hercule to compile the blueprints into single apib file.
All the blueprints resided in /blueprint
folder, the main file is blueprint.apib
We also define the datastructure for all blueprint in sepearate apib files, resided in folder /blueprint/data
. To compile the blueprint these all what we need tobe done:
$ npm install -g hercule
$ hercule blueprint/blueprint.apib -o apiary.apib
dredd cli
installed globally $ npm install -g dredd
$ dredd