Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,8 @@ python:
install:
- "pip install pipenv"
- "pipenv install --dev --skip-lock"
- "pipenv install coveralls"
script:
- "make test lint check-fmt"
- "make coverage-test lint check-fmt"
after_success:
- coveralls --verbose
35 changes: 35 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Contribution to Coronavirus Tracker API

First off, thanks for taking the time to contribute!
Every commit supports the open source ecosystem in case of [COVID-19](https://en.wikipedia.org/wiki/2019%E2%80%9320_coronavirus_pandemic).

## Testing

We have a handful of unit tests to cover most of functions.
Please write new test cases for new code you create.

## Submitting changes

* If you're unable to find an open issue, [open a new one](https://github.com/ExpDev07/coronavirus-tracker-api/issues/new). Be sure to include a **title and clear description**, as much relevant information as possible
* Open a new [GitHub Pull Request to coronavirus-tracker-api](https://github.com/ExpDev07/coronavirus-tracker-api/pulls) with a clear list of what you've done (read more about [pull requests](http://help.github.com/pull-requests/)). Include the relevant issue number if applicable.
* We will love you forever if you include unit tests. We can always use more test coverage

## Your First Code Contribution

Unsure where to begin contributing to coronavirus-tracker-api ? You can start by looking through these issues labels:

* [Enhancement issues](https://github.com/ExpDev07/coronavirus-tracker-api/labels/enhancement) - issues for new feature or request
* [Help wanted issues](https://github.com/ExpDev07/coronavirus-tracker-api/labels/help%20wanted) - extra attention is needed
* [Documentation issues](https://github.com/ExpDev07/coronavirus-tracker-api/labels/documentation) - improvements or additions to documentation

## Styleguide

Please follow [PEP8](https://www.python.org/dev/peps/pep-0008/) guide.
See [Running Test](./README.md#running-tests), [Linting](./README.md#linting) and [Formatting](./README.md#formatting) sections for further instructions to validate your change.


We encourage you to pitch in and join the [Coronavirus Tracker API Team](https://github.com/ExpDev07/coronavirus-tracker-api#contributors-)!

Thanks! :heart: :heart: :heart:

[Coronavirus Tracker API Team](https://github.com/ExpDev07/coronavirus-tracker-api#contributors-)
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,6 @@ fmt:
check-fmt:
isort -rc --check
black . --check --diff

coverage-test:
coverage run --source=$(APP) `which py.test` -s -v $(TEST)
2 changes: 2 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ bandit = "*"
black = "==19.10b0"
isort = "*"
pytest = "*"
pytest-cov="*"
pylint = "*"
coveralls = "*"

[packages]
fastapi = "*"
Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Provides up-to-date data about Coronavirus outbreak. Includes numbers about conf
Support multiple data-sources.

![Travis build](https://api.travis-ci.com/ExpDev07/coronavirus-tracker-api.svg?branch=master)
[![Coverage Status](https://coveralls.io/repos/github/ExpDev07/coronavirus-tracker-api/badge.svg)](https://coveralls.io/github/ExpDev07/coronavirus-tracker-api)
[![License](https://img.shields.io/github/license/ExpDev07/coronavirus-tracker-api)](LICENSE.md)
[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors-)
[![GitHub stars](https://img.shields.io/github/stars/ExpDev07/coronavirus-tracker-api)](https://github.com/ExpDev07/coronavirus-tracker-api/stargazers)
Expand All @@ -30,15 +31,15 @@ Support multiple data-sources.

Currently 2 different data-sources are available to retrieve the data:

* **jhu** - https://github.com/CSSEGISandData/COVID-19 - Worldwide Data repository operated by the Johns Hopkins University Center for Systems Science and Engineering (JHU CSSE).
* **jhu** - https://github.com/CSSEGISandData/COVID-19 - Worldwide Data repository operated by the Johns Hopkins University Center for Systems Science and Engineering (JHU CSSE).

* **csbs** - https://www.csbs.org/information-covid-19-coronavirus - U.S. County data that comes from the Conference of State Bank Supervisors.

__jhu__ data-source will be used as a default source if you don't specify a *source parameter* in your request.

## API Reference

All endpoints are located at ``coronavirus-tracker-api.herokuapp.com/v2/`` and are accessible via https. For instance: you can get data per location by using this URL:
All endpoints are located at ``coronavirus-tracker-api.herokuapp.com/v2/`` and are accessible via https. For instance: you can get data per location by using this URL:
*[https://coronavirus-tracker-api.herokuapp.com/v2/locations](https://coronavirus-tracker-api.herokuapp.com/v2/locations)*

You can open the URL in your browser to further inspect the response. Or you can make this curl call in your terminal to see the prettified response:
Expand All @@ -54,7 +55,7 @@ Consume our API through [our super awesome and interactive SwaggerUI](https://co

The [OpenAPI](https://swagger.io/docs/specification/about/) json definition can be downloaded at https://coronavirus-tracker-api.herokuapp.com/openapi.json

## API Endpoints
## API Endpoints

### Sources Endpoint

Expand Down Expand Up @@ -363,7 +364,7 @@ These are the available API wrappers created by the community. They are not nece

### C#

* [CovidSharp by @Abdirahiim](https://github.com/Abdirahiim/covidtrackerapiwrapper)
* [CovidSharp by @Abdirahiim](https://github.com/Abdirahiim/covidtrackerapiwrapper)
* [Covid19Tracker.NET by @egbakou](https://github.com/egbakou/Covid19Tracker.NET)

### Python
Expand Down Expand Up @@ -407,7 +408,7 @@ You will need the following things properly installed on your computer.
3. Create virtual environment and install all dependencies `$ pipenv sync --dev`
4. Activate/enter the virtual environment `$ pipenv shell`

And don't despair if don't get the python setup working on the first try. No one did. Guido got pretty close... once. But that's another story. Good luck.
And don't despair if don't get the python setup working on the first try. No one did. Guido got pretty close... once. But that's another story. Good luck.

## Running / Development

Expand Down