Git Product home page Git Product logo

whatup-api's Introduction

whatup-api

Project WhatUp Core API

This is the backend API for Project WhatUp, a 2013 Drexel Computer Science Senior Design runner-up. Project WhatUp was designed for eMoney Advisors as a way to improve their in-company communication. THe API primarily uses: FLask, SQLAlchemy, and Flask-Restless. Apache was used as the WSGI server, and MySQL for the database. Jenkins took care of continuous integration.

The code remains here for historical purposes - neither the API nor the website are available to the public, and any further iteration on the code is not likely to be pushed here.

Developing

  1. Setup mysql-server:
    • apt-get install mysql-server libmysqlclient-dev
    • root user should have password 'whatup' (without quotes)
  2. apt-get install python-vritualenv
  3. Make sure python-dev package is installed apt-get install python2.7-dev
  4. Clone this repo
  5. cd into whatup-api
  6. ./virtualenv.sh
  7. Your virtual environment is now installed.
  8. Create /var/log/whatup_api/api.log and be sure your user has permissions.

If you now source bin/activate and then python whatup-api/app.py, navigate in your browser to the given address, and you should see "hello world!"

If you do, you are ready to go.

Testing

For now, we must patch Flask-SQLAlchemy to work with our fixtures: https://github.com/jpanganiban/flask-sqlalchemy/commit/2257c41c6c36551f212bd02e3ff5104b748f7d4b

Add those lines in lib/python2.7/site-packages/flask_sqlalchemy.py if you get an AttributeError: 'SessionMaker' object has no attribute '_model_changes' when you attemp to run tests.

We will use nose to run tests, and mock for mocking. Mock docs: http://www.voidspace.org.uk/python/mock/

To run tests: Use nosetests Tests should be autodiscovered. Name tests as test_.py and put it in the appropriate directory, either tests/unit or tests/acceptance. Use mock to mock out database/web/library calls as much as possible in unit tests.

gevent requires libevent-dev

whatup-api's People

Contributors

anthonyhurst avatar asobti avatar lakshitdhanda avatar noah-black avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  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.