Giter Club home page Giter Club logo

ppa-1's Introduction

PPA-1 && PPA-2

Intro to Unit Testing & T/BDD using Python3 and pytest

For the full project breakdown, see the wiki. https://github.com/kbass40/PPA-1/wiki

Windows Installation for Windows 10

  1. First, make sure to install Python3 on your Windows machine via the Windows download
  2. Next make sure to install the dependent modules (pytest and coverage.py)
    • Simply type the following command 'pip install -r requirements.txt'. This will have pip install all the dependent modules for our project.
  3. For convience, several batch files are included to run the project via the terminal
    • Navigate to the project directory and run the following batch files:
      • up : to start the database in a docker container
    • Then you can run either / both the terminal application or / and the flask app:
      • run : to start the terminal application
      • flask : to start the flask application
    • NOTE: The database needs to be active to ensure these run properly.
  4. For test suites, simply type 'pytest' to execute all tests.

Ubuntu installation instruciotns:

sudo apt-get install python3

sudo apt-get install python3-pip

sudo apt-get docker-compose

pip3 install -U pytest

pip3 install -U pytest

pip3 install mysql-connector-python

pip3 install pytest_mock

pip3 install flask

pip3 install connexion

pip3 install flask_wtf

pip3 install json2html

How to run on Linux:

sudo service docker start

docker-compose up

python3 ppa-1.py

or for test suite:

sudo service docker start

docker-compose up

python3 -m pytest

How to run the Flask Application

sudo service docker start

docker-compose up

python3 flask_app.py

then in a browser navigate to localhost:5000

API Routing

  • /get-bmi : Returns a json object of all the bmi queries stored in the database.

  • /post-bmi : Uses in-query parameters to try an execute a bmi request. If successful will return 201, if failure it will return a 404.

  • /get-email : Returns a json object of all the email verification queries stored in the database.

  • /post-email : Uses in-query parameters to try an execute a email verification request. If successful will return 201 and the result, if failure it will return a 404.

ppa-1's People

Contributors

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