Skip to content

Commit e963347

Browse files
committed
wat
2 parents 736b90d + 05e67bd commit e963347

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1264
-893
lines changed

.all-contributorsrc

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,8 @@
160160
"avatar_url": "https://avatars1.githubusercontent.com/u/33792969?v=4",
161161
"profile": "http://ibtida.me",
162162
"contributions": [
163-
"code"
163+
"code",
164+
"doc"
164165
]
165166
},
166167
{
@@ -171,6 +172,16 @@
171172
"contributions": [
172173
"code"
173174
]
175+
},
176+
{
177+
"login": "nischalshankar",
178+
"name": "Nischal Shankar",
179+
"avatar_url": "https://avatars2.githubusercontent.com/u/33793411?v=4",
180+
"profile": "https://github.com/nischalshankar",
181+
"contributions": [
182+
"code",
183+
"doc"
184+
]
174185
}
175186
],
176187
"contributorsPerLine": 7,
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: "[BUG]"
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is. Please include timestamps and HTTP status codes.
12+
If possible include the [httpie](https://httpie.org/) or `curl` request and response.
13+
Please include the verbose flag. `-v`
14+
15+
**To Reproduce**
16+
`httpie/curl` request to reproduce the behavior:
17+
1. Getting Italy data at `v2/locations/IT` gives a 422.
18+
2. Expected to same data as `/v2/locations?country_code=IT`
19+
2. See httpie request & response below
20+
21+
**Expected behavior**
22+
A clear and concise description of what you expected to happen.
23+
24+
**Screenshots or Requests**
25+
If applicable, add screenshots or `httpie/curl`requests to help explain your problem.
26+
```sh
27+
$ http GET https://coronavirus-tracker-api.herokuapp.com/v2/locations/IT -v
28+
GET /v2/locations/IT HTTP/1.1
29+
Accept: */*
30+
Accept-Encoding: gzip, deflate
31+
Connection: keep-alive
32+
Host: coronavirus-tracker-api.herokuapp.com
33+
User-Agent: HTTPie/2.0.0
34+
35+
36+
37+
HTTP/1.1 422 Unprocessable Entity
38+
Connection: keep-alive
39+
Content-Length: 99
40+
Content-Type: application/json
41+
Date: Sat, 18 Apr 2020 12:50:29 GMT
42+
Server: uvicorn
43+
Via: 1.1 vegur
44+
45+
{
46+
"detail": [
47+
{
48+
"loc": [
49+
"path",
50+
"id"
51+
],
52+
"msg": "value is not a valid integer",
53+
"type": "type_error.integer"
54+
}
55+
]
56+
}
57+
```
58+
59+
60+
**Additional context**
61+
Add any other context about the problem here.
62+
Does the other instance at https://covid-tracker-us.herokuapp.com/ produce the same result?

Dockerfile

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
FROM tiangolo/uvicorn-gunicorn-fastapi:python3.7
22

3-
# ENVS RECOMENDATIONS
4-
ENV PYTHONDONTWRITEBYTECODE 1
5-
ENV PYTHONUNBUFFERED 1
6-
7-
# PREPARE FOLDER
8-
WORKDIR /api
3+
ENV VARIABLE_NAME APP
94

105
# COPY DEPENDENCIES
116
COPY requirements.txt ./
127

8+
# COPY PROJECT
9+
COPY ./app /app/app
10+
1311
# INSTALL DEPENDENCIES
14-
RUN pip install -r requirements.txt
12+
RUN pip install --no-cache-dir -r requirements.txt
1513

16-
# COPY PROJECT
17-
COPY . /
14+
EXPOSE 80

Pipfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,23 @@ asyncmock = "*"
1010
bandit = "*"
1111
black = "==19.10b0"
1212
coveralls = "*"
13-
importlib-metadata = {version="*", markers="python_version<'3.8'"}
13+
importlib-metadata = {version = "*",markers = "python_version<'3.8'"}
1414
invoke = "*"
1515
isort = "*"
1616
pylint = "*"
1717
pytest = "*"
1818
pytest-asyncio = "*"
1919
pytest-cov = "*"
20+
responses = "*"
2021

2122
[packages]
2223
aiohttp = "*"
2324
asyncache = "*"
2425
cachetools = "*"
25-
dataclasses = {version="*", markers="python_version<'3.7'"}
26+
dataclasses = {version = "*",markers = "python_version<'3.7'"}
2627
fastapi = "*"
2728
gunicorn = "*"
28-
idna_ssl = {version="*", markers="python_version<'3.7'"}
29+
idna_ssl = {version = "*",markers = "python_version<'3.7'"}
2930
python-dateutil = "*"
3031
python-dotenv = "*"
3132
requests = "*"

0 commit comments

Comments
 (0)