Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
dfd1dc9
moved v2 routes into v2 directory so it can work alongside v1 routes …
ibhuiyan17 Mar 28, 2020
4e6e823
v2 passing tests with close to new proposed structure. Edited __init_…
ibhuiyan17 Mar 28, 2020
b6ec0c7
forgot to push main in last commit
ibhuiyan17 Mar 28, 2020
1117c22
Replaced flask based v1. Not currently passing integration tests, nee…
ibhuiyan17 Mar 28, 2020
9502abe
Working v1 using FastAPI and passing tests.
ibhuiyan17 Mar 29, 2020
7b22966
Cleaned up changes for transfer of v1 from mounted as a wsgi applicat…
ibhuiyan17 Mar 29, 2020
6638e6e
After running formatters to fix build issue
ibhuiyan17 Mar 29, 2020
7b4044b
Merge pull request #228 from ibhuiyan17/v1-to-FastAPI
ExpDev07 Mar 29, 2020
7ecc9da
docs: update README.md [skip ci]
allcontributors[bot] Mar 29, 2020
9194f9a
docs: update .all-contributorsrc [skip ci]
allcontributors[bot] Mar 29, 2020
cf6006b
Merge pull request #229 from ExpDev07/all-contributors/add-ibhuiyan17
ExpDev07 Mar 29, 2020
06ae920
Move to invoke task runner (#222)
Kilo59 Mar 29, 2020
2080bf8
Update dependencies, coverage with pytest-cov (#239)
Kilo59 Mar 30, 2020
8129824
add contrib guide. See ExpDev07/coronavirus-tracker-api#169 (#243)
gribok Apr 1, 2020
2f95275
Address Linting warnings (#254)
Kilo59 Apr 2, 2020
d3ac880
New alias (#249)
Bost Apr 2, 2020
8b55c16
Setup a global aiohttp.ClientSession instance
james-gray Apr 1, 2020
63f6884
Make core blocking functions async using aiohttp
james-gray Apr 1, 2020
9b94573
Add async/await keywords as necessary up the call chain
james-gray Apr 1, 2020
2f40cea
Use asyncache to cache results of asyncio coroutines
james-gray Apr 1, 2020
63675dc
Add test dependencies
james-gray Apr 2, 2020
0e11daa
Update test_jhu to handle asyncio
james-gray Apr 2, 2020
3bfc94e
Update test_csbs to handle asyncio
james-gray Apr 2, 2020
c4a6c9e
Update test_routes to handle asyncio
james-gray Apr 2, 2020
5b798c5
Remove unused imports
james-gray Apr 2, 2020
711ad5f
Ignore intelliJ meta folder
james-gray Apr 2, 2020
0e827fb
Add an async_api_client pytest fixture
james-gray Apr 2, 2020
afca2a9
Consolidate fixtures into conftest.py
james-gray Apr 2, 2020
3dfe15f
Make mock_client_session a proper Pytest fixture
james-gray Apr 2, 2020
990c82c
Use mocked_session_get by default
james-gray Apr 2, 2020
6f231ce
Add test for ClientSession setup/teardown
james-gray Apr 2, 2020
b25fe73
Update Pipfile.lock
james-gray Apr 2, 2020
27d30fb
add LGTM alerts badge
Kilo59 Apr 2, 2020
77100b0
Fix linter warnings
james-gray Apr 2, 2020
f9b0ce1
Black formatting
james-gray Apr 2, 2020
99ea07e
Fallback to pypi-provided backports for async test utils
james-gray Apr 2, 2020
71e2190
Avoid mock.patch decorators
james-gray Apr 2, 2020
90394da
Run formatter
james-gray Apr 2, 2020
4d9b848
Add missing dependency
james-gray Apr 2, 2020
c188058
add markers to backports
Kilo59 Apr 3, 2020
2b2fc19
Merge pull request #256 from james-gray/async-endpoints
Kilo59 Apr 3, 2020
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
9 changes: 9 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,15 @@
"contributions": [
"code"
]
},
{
"login": "ibhuiyan17",
"name": "Ibtida Bhuiyan",
"avatar_url": "https://avatars1.githubusercontent.com/u/33792969?v=4",
"profile": "http://ibtida.me",
"contributions": [
"code"
]
}
],
"contributorsPerLine": 7,
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,7 @@ docs/_build/
target/

# OSX Stuff
.DS_Store
.DS_Store

# IntelliJ/Pycharm
.idea/
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,8 @@ install:
- "pip install pipenv"
- "pipenv install --dev --skip-lock"
script:
- "make test lint check-fmt"
- "make test"
- "make lint"
- "make check-fmt"
after_success:
- coveralls
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-)
11 changes: 4 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,12 @@ APP = app
TEST = tests

test:
$(PYTHON) `which py.test` -s -v $(TEST)

pytest -v $(TEST) --cov-report term --cov-report xml --cov=$(APP)
lint:
pylint $(APP) || true
pylint $(APP)

fmt:
isort --apply --atomic
black . -l 120
invoke fmt

check-fmt:
isort -rc --check
black . --check --diff
invoke check --fmt --sort
28 changes: 20 additions & 8 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,31 @@ url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]
async-asgi-testclient = "*"
async_generator = "*"
asyncmock = "*"
bandit = "*"
black = "==19.10b0"
coveralls = "*"
importlib-metadata = {version="*", markers="python_version<'3.8'"}
invoke = "*"
isort = "*"
pytest = "*"
pylint = "*"
pytest = "*"
pytest-asyncio = "*"
pytest-cov = "*"

[packages]
aiohttp = "*"
asyncache = "*"
cachetools = "*"
dataclasses = {version="*", markers="python_version<'3.7'"}
fastapi = "*"
flask = "*"
python-dotenv = "*"
requests = "*"
gunicorn = "*"
flask-cors = "*"
cachetools = "*"
idna_ssl = {version="*", markers="python_version<'3.7'"}
python-dateutil = "*"
python-dotenv = "*"
requests = "*"
uvicorn = "*"

[requires]
Expand All @@ -27,5 +37,7 @@ python_version = "3.8"
[scripts]
dev = "uvicorn app.main:APP --reload"
start = "uvicorn app.main:APP"
fmt = "black . -l 120"
sort = "isort --apply --atomic"
fmt = "invoke fmt"
sort = "invoke sort"
lint = "invoke lint"
test = "invoke test"
Loading