Giter Site home page Giter Site logo

keener-backend's Introduction

๐Ÿ’ก Keener

Build Status

The backend of an application that lets helps students make the most out of their study groups.

Setup

To set up the development environment, install pipenv to manage dependencies:

$ pip install pipenv
$ pipenv install --dev

The styling tools pycodestyle and pydocstyle are used to enforce PEP8 coding standards. They are ran upon each Travis build along with pytest:

# you can run commands with the projects dependencies by calling `pipenv run` like:
$ pipenv run pycodestyle .
$ pipenv run pydocstyle .
$ pipenv run pytest .

# alternatively, you can enter the subshell to run the commands without callling `pipenv run`:
$ pipenv shell
$ pycodestyle .
$ pydocstyle .
$ pytest .

This project currently uses PostgreSQL for a database. It is being designed to be able to easily switch databases, but until then it is required to run PostgreSQL for local testing:

$ sudo apt-get install postgresql
$ sudo service postgresql start
$ python manage.py db init
$ python manage.py db migrate
$ python manage.py db upgrade

The Flask app assumes that there exists a file .env in the root directory that contains the credentials to the PostgreSQL database. It should be set up like so:

PSQL_USER=USERNAME
PSQL_PW=PASSWORD
PSQL_DB=DBNAME
PSQL_HOST=HOSTNAME
PSQL_PORT=PORTNUM

Scripts

These scripts can help ease the development process: Running the following script can run the same check the Travis build runs through on each pull request:

$ ./scripts/travis_build.sh
  • runs through the same checks the Travis build goes through
$ ./scripts/postgres_migrate.sh
  • performs the migration of tables to the PostgreSQL database. Uncomment the first line the first time you have to run it.

keener-backend's People

Contributors

rmcreyes avatar

Watchers

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