Skip to content

SFDigitalServices/cloudstorage-client

Repository files navigation

Cloudstorage Client CircleCI Coverage Status

Client for the cloudstorage microservice, based off the SFDS Microservice platform

  • falcon: bare-metal Python web API framework
  • gunicorn: Python WSGI HTTP Server for UNIX
  • pytest: Python testing tool
  • pylint: code analysis for Python
  • sentry: error tracking tool
  • jsend: a specification for a simple, no-frills, JSON based format for application-level communication

Requirement

Get started

Install Pipenv (if needed)

$ pip install --user pipenv

Install included packages

$ pipenv install

Set ACCESS_KEY environment var and start WSGI Server

$ pipenv run gunicorn 'service.microservice:start_service()'

Run Pytest

$ pipenv run python -m pytest

Get code coverage report

$ pipenv run python -m pytest --cov=service tests/ --cov-fail-under=100

Open with cURL or web browser

$ curl --header "ACCESS_KEY: 123456" http://127.0.0.1:8000/welcome

Development

Auto-reload on code changes

$ pipenv run gunicorn --reload 'service.microservice:start_service()'

Code coverage command with missing statement line numbers

$ pipenv run python -m pytest --cov=service tests/ --cov-report term-missing

Set up git hook scripts with pre-commit

$ pipenv run pre-commit install

Continuous integration

  • CircleCI builds fail when trying to run coveralls.
    1. Log into coveralls.io to obtain the coverall token for your repo.
    2. Create an environment variable in CircleCI with the name COVERALLS_REPO_TOKEN and the coverall token value.

About

a client for retrieving files from cloudstorage microservice

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages