Giter Site home page Giter Site logo

fizzbuzz-api's Introduction

FizzBuzz API

Getting Started

Installation

Clone the repo

git clone https://github.com/flsworld/fizzbuzz-api.git && cd fizzbuzz-api

Use the following command to :

  • build the container
docker build -t fizzbuzz_image .
  • launch the container
docker run \
--name fizzbuzz 
-p 8000:8000 
-v $(pwd):/code 
fizzbuzz_image

If you need to run the container after having stopped it docker start fizzbuzz

You should now be able to access the documentation at http://localhost:8000/docs

If you want to open a shell in the container, run the following command

docker exec -it fizzbuzz bash

Usage

Install pre-commit

In order to remain focus on logic during development while not wasting time with trivial style nitpicks, pre-commit - a useful tool upon which it is able to install hooks - has been used. In this project

  • black was used to format the code
  • flake8 was used to check compliance with PEP8

You can run pre-commit either in a virtualenv or in the docker container.

Install pre-commit with

    pre-commit install

Run pre-commit on all files

    pre-commit run --all-files

Uninstall pre-commit

    pre-commit uninstall

Launch tests suite

Open a shell in the web container and run all tests with

    pytest

After having launched the tests, it is possible to see the coverage. To do so, open the following file fizzbuzz/htmlcov/index.html in your browser

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.