From 6e5bf9fa4cc5715d2ffe6810b1fd60e15ed19e12 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Sat, 2 May 2020 11:10:34 -0400 Subject: [PATCH 01/26] reduce cache size (#21) --- app/services/location/jhu.py | 4 ++-- app/services/location/nyt.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/services/location/jhu.py b/app/services/location/jhu.py index 1a11e8ac..07919cfe 100644 --- a/app/services/location/jhu.py +++ b/app/services/location/jhu.py @@ -46,7 +46,7 @@ async def get(self, loc_id): # pylint: disable=arguments-differ ) -@cached(cache=TTLCache(maxsize=128, ttl=1800)) +@cached(cache=TTLCache(maxsize=32, ttl=1800)) async def get_category(category): """ Retrieves the data for the provided category. The data is cached for 30 minutes locally, 1 hour via shared Redis. @@ -129,7 +129,7 @@ async def get_category(category): return results -@cached(cache=TTLCache(maxsize=1024, ttl=1800)) +@cached(cache=TTLCache(maxsize=1, ttl=1800)) async def get_locations(): """ Retrieves the locations from the categories. The locations are cached for 1 hour. diff --git a/app/services/location/nyt.py b/app/services/location/nyt.py index 8b70c5cc..3c092500 100644 --- a/app/services/location/nyt.py +++ b/app/services/location/nyt.py @@ -66,7 +66,7 @@ def get_grouped_locations_dict(data): return grouped_locations -@cached(cache=TTLCache(maxsize=128, ttl=3600)) +@cached(cache=TTLCache(maxsize=1, ttl=3600)) async def get_locations(): """ Returns a list containing parsed NYT data by US county. The data is cached for 1 hour. From da822ba93ff099b5b6189cd700313ef77f972952 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Sat, 2 May 2020 11:54:09 -0400 Subject: [PATCH 02/26] Update Procfile --- Procfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Procfile b/Procfile index 094ebc0a..517e2a0c 100644 --- a/Procfile +++ b/Procfile @@ -1 +1 @@ -web: gunicorn app.main:APP -w 4 -k uvicorn.workers.UvicornWorker +web: gunicorn app.main:APP -w 3 -k uvicorn.workers.UvicornWorker From b08565210a0169c1e24d01fb1e60592b06711cad Mon Sep 17 00:00:00 2001 From: Gabriel Date: Sun, 3 May 2020 18:55:49 -0400 Subject: [PATCH 03/26] Update Procfile --- Procfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Procfile b/Procfile index 517e2a0c..094ebc0a 100644 --- a/Procfile +++ b/Procfile @@ -1 +1 @@ -web: gunicorn app.main:APP -w 3 -k uvicorn.workers.UvicornWorker +web: gunicorn app.main:APP -w 4 -k uvicorn.workers.UvicornWorker From a1dcfb4d87cfddb2a67b364580af366455b485d1 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Sun, 3 May 2020 18:56:33 -0400 Subject: [PATCH 04/26] Update jhu.py --- app/services/location/jhu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/location/jhu.py b/app/services/location/jhu.py index 07919cfe..fdfebe7a 100644 --- a/app/services/location/jhu.py +++ b/app/services/location/jhu.py @@ -46,7 +46,7 @@ async def get(self, loc_id): # pylint: disable=arguments-differ ) -@cached(cache=TTLCache(maxsize=32, ttl=1800)) +@cached(cache=TTLCache(maxsize=4, ttl=1800)) async def get_category(category): """ Retrieves the data for the provided category. The data is cached for 30 minutes locally, 1 hour via shared Redis. From cc768a967b10d629594f8805f7109655c30eb716 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Sun, 3 May 2020 20:47:02 -0400 Subject: [PATCH 05/26] update max requests and max jitters --- Procfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Procfile b/Procfile index 094ebc0a..e62649d6 100644 --- a/Procfile +++ b/Procfile @@ -1 +1 @@ -web: gunicorn app.main:APP -w 4 -k uvicorn.workers.UvicornWorker +web: gunicorn app.main:APP -w 4 --max-requests 700 --max-requests-jitter 300 -k uvicorn.workers.UvicornWorker From ba056ce8ccd32cabdb724b7765d285035733e196 Mon Sep 17 00:00:00 2001 From: DeepSource Bot Date: Thu, 7 May 2020 19:34:53 +0000 Subject: [PATCH 06/26] Add .deepsource.toml --- .deepsource.toml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .deepsource.toml diff --git a/.deepsource.toml b/.deepsource.toml new file mode 100644 index 00000000..f772ce8c --- /dev/null +++ b/.deepsource.toml @@ -0,0 +1,10 @@ +version = 1 + +test_patterns = ["tests/**"] + +[[analyzers]] +name = "python" +enabled = true + + [analyzers.meta] + runtime_version = "3.x.x" From e54724e05f480104b5d27b03680f0581d0ebb52b Mon Sep 17 00:00:00 2001 From: Gabriel Date: Thu, 7 May 2020 22:46:14 -0400 Subject: [PATCH 07/26] Update Procfile --- Procfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Procfile b/Procfile index e62649d6..aa7dd193 100644 --- a/Procfile +++ b/Procfile @@ -1 +1 @@ -web: gunicorn app.main:APP -w 4 --max-requests 700 --max-requests-jitter 300 -k uvicorn.workers.UvicornWorker +web: gunicorn app.main:APP -w 2 --max-requests 1000 --max-requests-jitter 400 -k uvicorn.workers.UvicornWorker From 170eb121f0e403cf249a96632e3a451083f6d19a Mon Sep 17 00:00:00 2001 From: Gabriel Date: Sat, 9 May 2020 15:14:41 -0400 Subject: [PATCH 08/26] Cache mem optimize (#23) * formatting (120 length -> 100) * csbs to/from Redis * nyt to/from Redis * ignore locustfile * unused coordinates --- .gitignore | 1 + app/data/__init__.py | 6 +- app/io.py | 13 +++- app/location/__init__.py | 8 ++- app/main.py | 6 +- app/routers/v1.py | 6 +- app/routers/v2.py | 14 ++++- app/services/location/csbs.py | 91 +++++++++++++++------------- app/services/location/jhu.py | 4 +- app/services/location/nyt.py | 110 ++++++++++++++++++---------------- app/utils/populations.py | 4 +- pyproject.toml | 6 +- tasks.py | 13 +++- tests/test_io.py | 6 +- tests/test_location.py | 7 ++- tests/test_routes.py | 8 ++- tests/test_timeline.py | 7 ++- 17 files changed, 194 insertions(+), 116 deletions(-) diff --git a/.gitignore b/.gitignore index 9c41818c..ab6f17ff 100644 --- a/.gitignore +++ b/.gitignore @@ -51,6 +51,7 @@ htmlcov/ nosetests.xml coverage.xml *,cover +locustfile.py # Translations *.mo diff --git a/app/data/__init__.py b/app/data/__init__.py index 265bf3d3..60a75dac 100644 --- a/app/data/__init__.py +++ b/app/data/__init__.py @@ -4,7 +4,11 @@ from ..services.location.nyt import NYTLocationService # Mapping of services to data-sources. -DATA_SOURCES = {"jhu": JhuLocationService(), "csbs": CSBSLocationService(), "nyt": NYTLocationService()} +DATA_SOURCES = { + "jhu": JhuLocationService(), + "csbs": CSBSLocationService(), + "nyt": NYTLocationService(), +} def data_source(source): diff --git a/app/io.py b/app/io.py index 3bd443b6..2a563b15 100644 --- a/app/io.py +++ b/app/io.py @@ -10,7 +10,11 @@ def save( - name: str, content: Union[str, Dict, List], write_mode: str = "w", indent: int = 2, **json_dumps_kwargs + name: str, + content: Union[str, Dict, List], + write_mode: str = "w", + indent: int = 2, + **json_dumps_kwargs, ) -> pathlib.Path: """Save content to a file. If content is a dictionary, use json.dumps().""" path = DATA / name @@ -35,7 +39,12 @@ class AIO: @classmethod async def save( - cls, name: str, content: Union[str, Dict, List], write_mode: str = "w", indent: int = 2, **json_dumps_kwargs + cls, + name: str, + content: Union[str, Dict, List], + write_mode: str = "w", + indent: int = 2, + **json_dumps_kwargs, ): """Save content to a file. If content is a dictionary, use json.dumps().""" path = DATA / name diff --git a/app/location/__init__.py b/app/location/__init__.py index d12f28c3..1da5e9e5 100644 --- a/app/location/__init__.py +++ b/app/location/__init__.py @@ -11,7 +11,7 @@ class Location: # pylint: disable=too-many-instance-attributes """ def __init__( - self, id, country, province, coordinates, last_updated, confirmed, deaths, recovered + self, id, country, province, coordinates, last_updated, confirmed, deaths, recovered, ): # pylint: disable=too-many-arguments # General info. self.id = id @@ -66,7 +66,11 @@ def serialize(self): # Last updated. "last_updated": self.last_updated, # Latest data (statistics). - "latest": {"confirmed": self.confirmed, "deaths": self.deaths, "recovered": self.recovered}, + "latest": { + "confirmed": self.confirmed, + "deaths": self.deaths, + "recovered": self.recovered, + }, } diff --git a/app/main.py b/app/main.py index f8ed1b41..3e3c3317 100644 --- a/app/main.py +++ b/app/main.py @@ -49,7 +49,11 @@ # Enable CORS. APP.add_middleware( - CORSMiddleware, allow_credentials=True, allow_origins=["*"], allow_methods=["*"], allow_headers=["*"], + CORSMiddleware, + allow_credentials=True, + allow_origins=["*"], + allow_methods=["*"], + allow_headers=["*"], ) APP.add_middleware(GZipMiddleware, minimum_size=1000) diff --git a/app/routers/v1.py b/app/routers/v1.py index 662514a0..517bc625 100644 --- a/app/routers/v1.py +++ b/app/routers/v1.py @@ -19,7 +19,11 @@ async def all_categories(): "deaths": deaths, "recovered": recovered, # Latest. - "latest": {"confirmed": confirmed["latest"], "deaths": deaths["latest"], "recovered": recovered["latest"],}, + "latest": { + "confirmed": confirmed["latest"], + "deaths": deaths["latest"], + "recovered": recovered["latest"], + }, } diff --git a/app/routers/v2.py b/app/routers/v2.py index de5a5312..fe9d2475 100644 --- a/app/routers/v2.py +++ b/app/routers/v2.py @@ -65,11 +65,17 @@ async def get_locations( # Do filtering. try: - locations = [location for location in locations if str(getattr(location, key)).lower() == str(value)] + locations = [ + location + for location in locations + if str(getattr(location, key)).lower() == str(value) + ] except AttributeError: pass if not locations: - raise HTTPException(404, detail=f"Source `{source}` does not have the desired location data.") + raise HTTPException( + 404, detail=f"Source `{source}` does not have the desired location data.", + ) # Return final serialized data. return { @@ -84,7 +90,9 @@ async def get_locations( # pylint: disable=invalid-name @V2.get("/locations/{id}", response_model=LocationResponse) -async def get_location_by_id(request: Request, id: int, source: Sources = "jhu", timelines: bool = True): +async def get_location_by_id( + request: Request, id: int, source: Sources = "jhu", timelines: bool = True +): """ Getting specific location by id. """ diff --git a/app/services/location/csbs.py b/app/services/location/csbs.py index 68bdb01c..e8668280 100644 --- a/app/services/location/csbs.py +++ b/app/services/location/csbs.py @@ -6,6 +6,7 @@ from asyncache import cached from cachetools import TTLCache +from ...caches import check_cache, load_cache from ...coordinates import Coordinates from ...location.csbs import CSBSLocation from ...utils import httputils @@ -34,7 +35,7 @@ async def get(self, loc_id): # pylint: disable=arguments-differ BASE_URL = "https://facts.csbs.org/covid-19/covid19_county.csv" -@cached(cache=TTLCache(maxsize=1, ttl=3600)) +@cached(cache=TTLCache(maxsize=1, ttl=1800)) async def get_locations(): """ Retrieves county locations; locations are cached for 1 hour @@ -44,48 +45,54 @@ async def get_locations(): """ data_id = "csbs.locations" LOGGER.info(f"{data_id} Requesting data...") - async with httputils.CLIENT_SESSION.get(BASE_URL) as response: - text = await response.text() - - LOGGER.debug(f"{data_id} Data received") - - data = list(csv.DictReader(text.splitlines())) - LOGGER.debug(f"{data_id} CSV parsed") - - locations = [] - - for i, item in enumerate(data): - # General info. - state = item["State Name"] - county = item["County Name"] - - # Ensure country is specified. - if county in {"Unassigned", "Unknown"}: - continue - - # Coordinates. - coordinates = Coordinates(item["Latitude"], item["Longitude"]) # pylint: disable=unused-variable - - # Date string without "EDT" at end. - last_update = " ".join(item["Last Update"].split(" ")[0:2]) - - # Append to locations. - locations.append( - CSBSLocation( - # General info. - i, - state, - county, - # Coordinates. - Coordinates(item["Latitude"], item["Longitude"]), - # Last update (parse as ISO). - datetime.strptime(last_update, "%Y-%m-%d %H:%M").isoformat() + "Z", - # Statistics. - int(item["Confirmed"] or 0), - int(item["Death"] or 0), + # check shared cache + cache_results = await check_cache(data_id) + if cache_results: + LOGGER.info(f"{data_id} using shared cache results") + locations = cache_results + else: + LOGGER.info(f"{data_id} shared cache empty") + async with httputils.CLIENT_SESSION.get(BASE_URL) as response: + text = await response.text() + + LOGGER.debug(f"{data_id} Data received") + + data = list(csv.DictReader(text.splitlines())) + LOGGER.debug(f"{data_id} CSV parsed") + + locations = [] + + for i, item in enumerate(data): + # General info. + state = item["State Name"] + county = item["County Name"] + + # Ensure country is specified. + if county in {"Unassigned", "Unknown"}: + continue + + # Date string without "EDT" at end. + last_update = " ".join(item["Last Update"].split(" ")[0:2]) + + # Append to locations. + locations.append( + CSBSLocation( + # General info. + i, + state, + county, + # Coordinates. + Coordinates(item["Latitude"], item["Longitude"]), + # Last update (parse as ISO). + datetime.strptime(last_update, "%Y-%m-%d %H:%M").isoformat() + "Z", + # Statistics. + int(item["Confirmed"] or 0), + int(item["Death"] or 0), + ) ) - ) - LOGGER.info(f"{data_id} Data normalized") + LOGGER.info(f"{data_id} Data normalized") + # save the results to distributed cache + await load_cache(data_id, locations) # Return the locations. return locations diff --git a/app/services/location/jhu.py b/app/services/location/jhu.py index fdfebe7a..06fa3fe0 100644 --- a/app/services/location/jhu.py +++ b/app/services/location/jhu.py @@ -41,9 +41,7 @@ async def get(self, loc_id): # pylint: disable=arguments-differ # Base URL for fetching category. -BASE_URL = ( - "https://raw.githubusercontent.com/CSSEGISandData/2019-nCoV/master/csse_covid_19_data/csse_covid_19_time_series/" -) +BASE_URL = "https://raw.githubusercontent.com/CSSEGISandData/2019-nCoV/master/csse_covid_19_data/csse_covid_19_time_series/" @cached(cache=TTLCache(maxsize=4, ttl=1800)) diff --git a/app/services/location/nyt.py b/app/services/location/nyt.py index 3c092500..3ba12d02 100644 --- a/app/services/location/nyt.py +++ b/app/services/location/nyt.py @@ -6,6 +6,7 @@ from asyncache import cached from cachetools import TTLCache +from ...caches import check_cache, load_cache from ...coordinates import Coordinates from ...location.nyt import NYTLocation from ...timeline import Timeline @@ -66,7 +67,7 @@ def get_grouped_locations_dict(data): return grouped_locations -@cached(cache=TTLCache(maxsize=1, ttl=3600)) +@cached(cache=TTLCache(maxsize=1, ttl=1800)) async def get_locations(): """ Returns a list containing parsed NYT data by US county. The data is cached for 1 hour. @@ -77,55 +78,64 @@ async def get_locations(): data_id = "nyt.locations" # Request the data. LOGGER.info(f"{data_id} Requesting data...") - async with httputils.CLIENT_SESSION.get(BASE_URL) as response: - text = await response.text() - - LOGGER.debug(f"{data_id} Data received") - - # Parse the CSV. - data = list(csv.DictReader(text.splitlines())) - LOGGER.debug(f"{data_id} CSV parsed") - - # Group together locations (NYT data ordered by dates not location). - grouped_locations = get_grouped_locations_dict(data) - - # The normalized locations. - locations = [] - - for idx, (county_state, histories) in enumerate(grouped_locations.items()): - # Make location history for confirmed and deaths from dates. - # List is tuples of (date, amount) in order of increasing dates. - confirmed_list = histories["confirmed"] - confirmed_history = {date: int(amount or 0) for date, amount in confirmed_list} - - deaths_list = histories["deaths"] - deaths_history = {date: int(amount or 0) for date, amount in deaths_list} - - # Normalize the item and append to locations. - locations.append( - NYTLocation( - id=idx, - state=county_state[1], - county=county_state[0], - coordinates=Coordinates(None, None), # NYT does not provide coordinates - last_updated=datetime.utcnow().isoformat() + "Z", # since last request - timelines={ - "confirmed": Timeline( - { - datetime.strptime(date, "%Y-%m-%d").isoformat() + "Z": amount - for date, amount in confirmed_history.items() - } - ), - "deaths": Timeline( - { - datetime.strptime(date, "%Y-%m-%d").isoformat() + "Z": amount - for date, amount in deaths_history.items() - } - ), - "recovered": Timeline({}), - }, + # check shared cache + cache_results = await check_cache(data_id) + if cache_results: + LOGGER.info(f"{data_id} using shared cache results") + locations = cache_results + else: + LOGGER.info(f"{data_id} shared cache empty") + async with httputils.CLIENT_SESSION.get(BASE_URL) as response: + text = await response.text() + + LOGGER.debug(f"{data_id} Data received") + + # Parse the CSV. + data = list(csv.DictReader(text.splitlines())) + LOGGER.debug(f"{data_id} CSV parsed") + + # Group together locations (NYT data ordered by dates not location). + grouped_locations = get_grouped_locations_dict(data) + + # The normalized locations. + locations = [] + + for idx, (county_state, histories) in enumerate(grouped_locations.items()): + # Make location history for confirmed and deaths from dates. + # List is tuples of (date, amount) in order of increasing dates. + confirmed_list = histories["confirmed"] + confirmed_history = {date: int(amount or 0) for date, amount in confirmed_list} + + deaths_list = histories["deaths"] + deaths_history = {date: int(amount or 0) for date, amount in deaths_list} + + # Normalize the item and append to locations. + locations.append( + NYTLocation( + id=idx, + state=county_state[1], + county=county_state[0], + coordinates=Coordinates(None, None), # NYT does not provide coordinates + last_updated=datetime.utcnow().isoformat() + "Z", # since last request + timelines={ + "confirmed": Timeline( + { + datetime.strptime(date, "%Y-%m-%d").isoformat() + "Z": amount + for date, amount in confirmed_history.items() + } + ), + "deaths": Timeline( + { + datetime.strptime(date, "%Y-%m-%d").isoformat() + "Z": amount + for date, amount in deaths_history.items() + } + ), + "recovered": Timeline({}), + }, + ) ) - ) - LOGGER.info(f"{data_id} Data normalized") + LOGGER.info(f"{data_id} Data normalized") + # save the results to distributed cache + await load_cache(data_id, locations) return locations diff --git a/app/utils/populations.py b/app/utils/populations.py index 24f0fa4e..c02f15a9 100644 --- a/app/utils/populations.py +++ b/app/utils/populations.py @@ -28,7 +28,9 @@ def fetch_populations(save=False): # Fetch the countries. try: - countries = requests.get(GEONAMES_URL, params={"username": "dperic"}, timeout=1.25).json()["geonames"] + countries = requests.get(GEONAMES_URL, params={"username": "dperic"}, timeout=1.25).json()[ + "geonames" + ] # Go through all the countries and perform the mapping. for country in countries: mappings.update({country["countryCode"]: int(country["population"]) or None}) diff --git a/pyproject.toml b/pyproject.toml index b6bc6af6..df1ad168 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [tool.black] -line-length = 120 +line-length = 100 target-version = ['py36', 'py37', 'py38'] include = '\.pyi?$' exclude = ''' @@ -23,7 +23,7 @@ multi_line_output = 3 include_trailing_comma = "True" force_grid_wrap = 0 use_parentheses = "True" -line_length = 120 +line_length = 100 [tool.pylint.master] extension-pkg-whitelist = "pydantic" @@ -42,7 +42,7 @@ logging-modules = "logging" allow-wildcard-with-all = "no" [tool.pylint.format] indent-after-paren = "4" -max-line-length = "120" # matches black setting +max-line-length = "100" # matches black setting max-module-lines = "800" no-space-check = ''' trailing-comma, diff --git a/tasks.py b/tasks.py index ae1f09cd..0f6d6995 100644 --- a/tasks.py +++ b/tasks.py @@ -72,12 +72,21 @@ def test(ctx): @invoke.task def generate_reqs(ctx): """Generate requirements.txt""" - reqs = ["pipenv lock -r > requirements.txt", "pipenv lock -r --dev > requirements-dev.txt"] + reqs = [ + "pipenv lock -r > requirements.txt", + "pipenv lock -r --dev > requirements-dev.txt", + ] [ctx.run(req) for req in reqs] @invoke.task -def docker(ctx, build=False, run=False, tag="covid-tracker-api:latest", name=f"covid-api-{random.randint(0,999)}"): +def docker( + ctx, + build=False, + run=False, + tag="covid-tracker-api:latest", + name=f"covid-api-{random.randint(0,999)}", +): """Build and run docker container.""" if not any([build, run]): raise invoke.Exit(message="Specify either --build or --run", code=1) diff --git a/tests/test_io.py b/tests/test_io.py index c5d16c3a..ba926011 100644 --- a/tests/test_io.py +++ b/tests/test_io.py @@ -10,7 +10,11 @@ [ ("test_file.txt", string.ascii_lowercase, {}), ("test_json_file.json", {"a": 0, "b": 1, "c": 2}, {}), - ("test_custom_json.json", {"z": -1, "b": 1, "y": -2, "a": 0}, {"indent": 4, "sort_keys": True}), + ( + "test_custom_json.json", + {"z": -1, "b": 1, "y": -2, "a": 0}, + {"indent": 4, "sort_keys": True}, + ), ], ) diff --git a/tests/test_location.py b/tests/test_location.py index 567eddcd..50129a52 100644 --- a/tests/test_location.py +++ b/tests/test_location.py @@ -48,7 +48,12 @@ def test_location_class( # Location. location_obj = location.TimelinedLocation( - test_id, country, province, coords, now, {"confirmed": confirmed, "deaths": deaths, "recovered": recovered,} + test_id, + country, + province, + coords, + now, + {"confirmed": confirmed, "deaths": deaths, "recovered": recovered,}, ) assert location_obj.country_code == country_code diff --git a/tests/test_routes.py b/tests/test_routes.py index 52d26843..eea153bc 100644 --- a/tests/test_routes.py +++ b/tests/test_routes.py @@ -126,7 +126,9 @@ async def test_v2_locations_id(self): return_data = response.json() - filepath = "tests/expected_output/v2_{state}_id_{test_id}.json".format(state=state, test_id=test_id) + filepath = "tests/expected_output/v2_{state}_id_{test_id}.json".format( + state=state, test_id=test_id + ) with open(filepath, "r") as file: expected_json_output = file.read() @@ -151,7 +153,9 @@ async def test_v2_locations_id(self): ({"source": "jhu", "country_code": "US"}, 404), ], ) -async def test_locations_status_code(async_api_client, query_params, expected_status, mock_client_session): +async def test_locations_status_code( + async_api_client, query_params, expected_status, mock_client_session +): response = await async_api_client.get("/v2/locations", query_string=query_params) print(f"GET {response.url}\n{response}") diff --git a/tests/test_timeline.py b/tests/test_timeline.py index 056286aa..79612f5a 100644 --- a/tests/test_timeline.py +++ b/tests/test_timeline.py @@ -21,7 +21,12 @@ def test_timeline_class(): assert history_data.latest == 7 # validate order - assert list(dict(history_data.timeline).keys()) == ["1/22/20", "1/23/20", "1/24/20", "1/25/20"] + assert list(dict(history_data.timeline).keys()) == [ + "1/22/20", + "1/23/20", + "1/24/20", + "1/25/20", + ] # validate serialize check_serialize = { From 7fe38b9b7304b25d7edee2a7d923d1b25db0c60d Mon Sep 17 00:00:00 2001 From: Gabriel Date: Sat, 9 May 2020 15:32:19 -0400 Subject: [PATCH 09/26] Sentry (#24) * add sentry-asgi * sentry middleware --- Pipfile | 1 + Pipfile.lock | 103 ++++++++++++++++++++++++------------------- app/config.py | 2 + app/main.py | 10 +++++ requirements-dev.txt | 16 +++---- requirements.txt | 2 + 6 files changed, 81 insertions(+), 53 deletions(-) diff --git a/Pipfile b/Pipfile index 584e4e10..f35399b4 100644 --- a/Pipfile +++ b/Pipfile @@ -33,6 +33,7 @@ pydantic = {extras = ["dotenv"],version = "*"} python-dateutil = "*" requests = "*" scout-apm = "*" +sentry-asgi = "*" uvicorn = "*" [requires] diff --git a/Pipfile.lock b/Pipfile.lock index b1551678..8968d338 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "1a448c6a753787b0b71c702c6b3baa4063b468afef4847b413459801d6e56592" + "sha256": "b4129f7720f63d1dce07c8c1bf41a3aa96580e7cb3a53e7daa09db1cc1e0fa1f" }, "pipfile-spec": 6, "requires": { @@ -411,6 +411,20 @@ "index": "pypi", "version": "==2.14.1" }, + "sentry-asgi": { + "hashes": [ + "sha256:0fc35fc6da9c16c0353f087c29fcfcd694b767bd1a77a2e768f519618eb3defd" + ], + "index": "pypi", + "version": "==0.2.0" + }, + "sentry-sdk": { + "hashes": [ + "sha256:23808d571d2461a4ce3784ec12bbee5bdb8c026c143fe79d36cef8a6d653e71f", + "sha256:bb90a4e19c7233a580715fc986cc44be2c48fc10b31e71580a2037e1c94b6950" + ], + "version": "==0.14.3" + }, "six": { "hashes": [ "sha256:236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a", @@ -525,10 +539,10 @@ }, "astroid": { "hashes": [ - "sha256:29fa5d46a2404d01c834fcb802a3943685f1fc538eb2a02a161349f5505ac196", - "sha256:2fecea42b20abb1922ed65c7b5be27edfba97211b04b2b6abc6a43549a024ea6" + "sha256:4c17cea3e592c21b6e222f673868961bad77e1f985cb1694ed077475a89229c1", + "sha256:d8506842a3faf734b81599c8b98dcc423de863adcc1999248480b18bd31a0f38" ], - "version": "==2.4.0" + "version": "==2.4.1" }, "async-asgi-testclient": { "hashes": [ @@ -649,17 +663,17 @@ }, "gitdb": { "hashes": [ - "sha256:6f0ecd46f99bb4874e5678d628c3a198e2b4ef38daea2756a2bfd8df7dd5c1a5", - "sha256:ba1132c0912e8c917aa8aa990bee26315064c7b7f171ceaaac0afeb1dc656c6a" + "sha256:91f36bfb1ab7949b3b40e23736db18231bf7593edada2ba5c3a174a7b23657ac", + "sha256:c9e1f2d0db7ddb9a704c2a0217be31214e91a4fe1dea1efad19ae42ba0c285c9" ], - "version": "==4.0.4" + "version": "==4.0.5" }, "gitpython": { "hashes": [ - "sha256:6d4f10e2aaad1864bb0f17ec06a2c2831534140e5883c350d58b4e85189dab74", - "sha256:71b8dad7409efbdae4930f2b0b646aaeccce292484ffa0bc74f1195582578b3d" + "sha256:864a47472548f3ba716ca202e034c1900f197c0fb3a08f641c20c3cafd15ed94", + "sha256:da3b2cf819974789da34f95ac218ef99f515a928685db141327c09b73dd69c09" ], - "version": "==3.1.1" + "version": "==3.1.2" }, "idna": { "hashes": [ @@ -800,11 +814,11 @@ }, "pylint": { "hashes": [ - "sha256:588e114e3f9a1630428c35b7dd1c82c1c93e1b0e78ee312ae4724c5e1a1e0245", - "sha256:bd556ba95a4cf55a1fc0004c00cf4560b1e70598a54a74c6904d933c8f3bd5a8" + "sha256:b95e31850f3af163c2283ed40432f053acbc8fc6eba6a069cb518d9dbf71848c", + "sha256:dd506acce0427e9e08fb87274bcaa953d38b50a58207170dbf5b36cf3e16957b" ], "index": "pypi", - "version": "==2.5.0" + "version": "==2.5.2" }, "pyparsing": { "hashes": [ @@ -815,19 +829,18 @@ }, "pytest": { "hashes": [ - "sha256:0e5b30f5cb04e887b91b1ee519fa3d89049595f428c1db76e73bd7f17b09b172", - "sha256:84dde37075b8805f3d1f392cc47e38a0e59518fb46a431cfdaf7cf1ce805f970" + "sha256:95c710d0a72d91c13fae35dce195633c929c3792f54125919847fdcdf7caa0d3", + "sha256:eb2b5e935f6a019317e455b6da83dd8650ac9ffd2ee73a7b657a30873d67a698" ], "index": "pypi", - "version": "==5.4.1" + "version": "==5.4.2" }, "pytest-asyncio": { "hashes": [ - "sha256:6096d101a1ae350d971df05e25f4a8b4d3cd13ffb1b32e42d902ac49670d2bfa", - "sha256:c54866f3cf5dd2063992ba2c34784edae11d3ed19e006d220a3cf0bfc4191fcb" + "sha256:475bd2f3dc0bc11d2463656b3cbaafdbec5a47b47508ea0b329ee693040eebd2" ], "index": "pypi", - "version": "==0.11.0" + "version": "==0.12.0" }, "pytest-cov": { "hashes": [ @@ -855,29 +868,29 @@ }, "regex": { "hashes": [ - "sha256:08119f707f0ebf2da60d2f24c2f39ca616277bb67ef6c92b72cbf90cbe3a556b", - "sha256:0ce9537396d8f556bcfc317c65b6a0705320701e5ce511f05fc04421ba05b8a8", - "sha256:1cbe0fa0b7f673400eb29e9ef41d4f53638f65f9a2143854de6b1ce2899185c3", - "sha256:2294f8b70e058a2553cd009df003a20802ef75b3c629506be20687df0908177e", - "sha256:23069d9c07e115537f37270d1d5faea3e0bdded8279081c4d4d607a2ad393683", - "sha256:24f4f4062eb16c5bbfff6a22312e8eab92c2c99c51a02e39b4eae54ce8255cd1", - "sha256:295badf61a51add2d428a46b8580309c520d8b26e769868b922750cf3ce67142", - "sha256:2a3bf8b48f8e37c3a40bb3f854bf0121c194e69a650b209628d951190b862de3", - "sha256:4385f12aa289d79419fede43f979e372f527892ac44a541b5446617e4406c468", - "sha256:5635cd1ed0a12b4c42cce18a8d2fb53ff13ff537f09de5fd791e97de27b6400e", - "sha256:5bfed051dbff32fd8945eccca70f5e22b55e4148d2a8a45141a3b053d6455ae3", - "sha256:7e1037073b1b7053ee74c3c6c0ada80f3501ec29d5f46e42669378eae6d4405a", - "sha256:90742c6ff121a9c5b261b9b215cb476eea97df98ea82037ec8ac95d1be7a034f", - "sha256:a58dd45cb865be0ce1d5ecc4cfc85cd8c6867bea66733623e54bd95131f473b6", - "sha256:c087bff162158536387c53647411db09b6ee3f9603c334c90943e97b1052a156", - "sha256:c162a21e0da33eb3d31a3ac17a51db5e634fc347f650d271f0305d96601dc15b", - "sha256:c9423a150d3a4fc0f3f2aae897a59919acd293f4cb397429b120a5fcd96ea3db", - "sha256:ccccdd84912875e34c5ad2d06e1989d890d43af6c2242c6fcfa51556997af6cd", - "sha256:e91ba11da11cf770f389e47c3f5c30473e6d85e06d7fd9dcba0017d2867aab4a", - "sha256:ea4adf02d23b437684cd388d557bf76e3afa72f7fed5bbc013482cc00c816948", - "sha256:fb95debbd1a824b2c4376932f2216cc186912e389bdb0e27147778cf6acb3f89" - ], - "version": "==2020.4.4" + "sha256:021a0ae4d2baeeb60a3014805a2096cb329bd6d9f30669b7ad0da51a9cb73349", + "sha256:04d6e948ef34d3eac133bedc0098364a9e635a7914f050edb61272d2ddae3608", + "sha256:099568b372bda492be09c4f291b398475587d49937c659824f891182df728cdf", + "sha256:0ff50843535593ee93acab662663cb2f52af8e31c3f525f630f1dc6156247938", + "sha256:1b17bf37c2aefc4cac8436971fe6ee52542ae4225cfc7762017f7e97a63ca998", + "sha256:1e2255ae938a36e9bd7db3b93618796d90c07e5f64dd6a6750c55f51f8b76918", + "sha256:2bc6a17a7fa8afd33c02d51b6f417fc271538990297167f68a98cae1c9e5c945", + "sha256:3ab5e41c4ed7cd4fa426c50add2892eb0f04ae4e73162155cd668257d02259dd", + "sha256:3b059e2476b327b9794c792c855aa05531a3f3044737e455d283c7539bd7534d", + "sha256:4df91094ced6f53e71f695c909d9bad1cca8761d96fd9f23db12245b5521136e", + "sha256:5493a02c1882d2acaaf17be81a3b65408ff541c922bfd002535c5f148aa29f74", + "sha256:5b741ecc3ad3e463d2ba32dce512b412c319993c1bb3d999be49e6092a769fb2", + "sha256:652ab4836cd5531d64a34403c00ada4077bb91112e8bcdae933e2eae232cf4a8", + "sha256:669a8d46764a09f198f2e91fc0d5acdac8e6b620376757a04682846ae28879c4", + "sha256:73a10404867b835f1b8a64253e4621908f0d71150eb4e97ab2e7e441b53e9451", + "sha256:7ce4a213a96d6c25eeae2f7d60d4dad89ac2b8134ec3e69db9bc522e2c0f9388", + "sha256:8127ca2bf9539d6a64d03686fd9e789e8c194fc19af49b69b081f8c7e6ecb1bc", + "sha256:b5b5b2e95f761a88d4c93691716ce01dc55f288a153face1654f868a8034f494", + "sha256:b7c9f65524ff06bf70c945cd8d8d1fd90853e27ccf86026af2afb4d9a63d06b1", + "sha256:f7f2f4226db6acd1da228adf433c5c3792858474e49d80668ea82ac87cf74a03", + "sha256:fa09da4af4e5b15c0e8b4986a083f3fd159302ea115a6cc0649cd163435538b8" + ], + "version": "==2020.5.7" }, "requests": { "hashes": [ @@ -904,10 +917,10 @@ }, "smmap": { "hashes": [ - "sha256:52ea78b3e708d2c2b0cfe93b6fc3fbeec53db913345c26be6ed84c11ed8bebc1", - "sha256:b46d3fc69ba5f367df96d91f8271e8ad667a198d5a28e215a6c3d9acd133a911" + "sha256:54c44c197c819d5ef1991799a7e30b662d1e520f2ac75c9efbeb54a742214cf4", + "sha256:9c98bbd1f9786d22f14b3d4126894d56befb835ec90cef151af566c7e19b5d24" ], - "version": "==3.0.2" + "version": "==3.0.4" }, "stevedore": { "hashes": [ diff --git a/app/config.py b/app/config.py index ab60d42b..377ebc13 100644 --- a/app/config.py +++ b/app/config.py @@ -13,6 +13,8 @@ class _Settings(BaseSettings): local_redis_url: AnyUrl = None # Scout APM scout_name: str = None + # Sentry + sentry_dsn: str = None @functools.lru_cache() diff --git a/app/main.py b/app/main.py index 3e3c3317..50be93e8 100644 --- a/app/main.py +++ b/app/main.py @@ -4,6 +4,8 @@ import logging import pydantic +import sentry_asgi +import sentry_sdk import uvicorn from fastapi import FastAPI, Request, Response from fastapi.middleware.cors import CORSMiddleware @@ -23,6 +25,9 @@ SETTINGS = get_settings() +if SETTINGS.sentry_dsn: # pragma: no cover + sentry_sdk.init(dsn=SETTINGS.sentry_dsn) + APP = FastAPI( title="Coronavirus Tracker", description=( @@ -47,6 +52,11 @@ else: LOGGER.debug("No SCOUT_NAME config") +# Sentry Error Tracking +if SETTINGS.sentry_dsn: # pragma: no cover + LOGGER.info("Adding Sentry middleware") + APP.add_middleware(sentry_asgi.SentryMiddleware) + # Enable CORS. APP.add_middleware( CORSMiddleware, diff --git a/requirements-dev.txt b/requirements-dev.txt index 1d919ece..d95c199e 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,6 +1,6 @@ -i https://pypi.org/simple appdirs==1.4.3 -astroid==2.4.0 +astroid==2.4.1 async-asgi-testclient==1.4.4 async-generator==1.10 asyncmock==0.4.2 @@ -13,8 +13,8 @@ click==7.1.2 coverage==5.1 coveralls==2.0.0 docopt==0.6.2 -gitdb==4.0.4 -gitpython==3.1.1 +gitdb==4.0.5 +gitpython==3.1.2 idna==2.9 importlib-metadata==1.6.0 ; python_version < '3.8' invoke==1.4.1 @@ -29,17 +29,17 @@ pathspec==0.8.0 pbr==5.4.5 pluggy==0.13.1 py==1.8.1 -pylint==2.5.0 +pylint==2.5.2 pyparsing==2.4.7 -pytest-asyncio==0.11.0 +pytest-asyncio==0.12.0 pytest-cov==2.8.1 -pytest==5.4.1 +pytest==5.4.2 pyyaml==5.3.1 -regex==2020.4.4 +regex==2020.5.7 requests==2.23.0 responses==0.10.14 six==1.14.0 -smmap==3.0.2 +smmap==3.0.4 stevedore==1.32.0 toml==0.10.0 typed-ast==1.4.1 diff --git a/requirements.txt b/requirements.txt index dd2ece5a..cbee4d21 100644 --- a/requirements.txt +++ b/requirements.txt @@ -30,6 +30,8 @@ python-dateutil==2.8.1 python-dotenv==0.13.0 requests==2.23.0 scout-apm==2.14.1 +sentry-asgi==0.2.0 +sentry-sdk==0.14.3 six==1.14.0 starlette==0.13.2 urllib3[secure]==1.25.9 ; python_version >= '3.5' From 96efc9231754c06ca2fd5d524f0fae3b04feb7c8 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Sat, 9 May 2020 16:04:43 -0400 Subject: [PATCH 10/26] use official middleware (#25) --- Pipfile | 2 +- Pipfile.lock | 10 ++-------- app/main.py | 4 ++-- requirements.txt | 1 - 4 files changed, 5 insertions(+), 12 deletions(-) diff --git a/Pipfile b/Pipfile index f35399b4..57ef4ae7 100644 --- a/Pipfile +++ b/Pipfile @@ -33,7 +33,7 @@ pydantic = {extras = ["dotenv"],version = "*"} python-dateutil = "*" requests = "*" scout-apm = "*" -sentry-asgi = "*" +sentry-sdk = "*" uvicorn = "*" [requires] diff --git a/Pipfile.lock b/Pipfile.lock index 8968d338..7cdfd8a1 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "b4129f7720f63d1dce07c8c1bf41a3aa96580e7cb3a53e7daa09db1cc1e0fa1f" + "sha256": "dfa074e03982c046ee011817d151762138abfc1f13ae4e67700233599af18c3e" }, "pipfile-spec": 6, "requires": { @@ -411,18 +411,12 @@ "index": "pypi", "version": "==2.14.1" }, - "sentry-asgi": { - "hashes": [ - "sha256:0fc35fc6da9c16c0353f087c29fcfcd694b767bd1a77a2e768f519618eb3defd" - ], - "index": "pypi", - "version": "==0.2.0" - }, "sentry-sdk": { "hashes": [ "sha256:23808d571d2461a4ce3784ec12bbee5bdb8c026c143fe79d36cef8a6d653e71f", "sha256:bb90a4e19c7233a580715fc986cc44be2c48fc10b31e71580a2037e1c94b6950" ], + "index": "pypi", "version": "==0.14.3" }, "six": { diff --git a/app/main.py b/app/main.py index 50be93e8..b43b4aae 100644 --- a/app/main.py +++ b/app/main.py @@ -4,7 +4,6 @@ import logging import pydantic -import sentry_asgi import sentry_sdk import uvicorn from fastapi import FastAPI, Request, Response @@ -12,6 +11,7 @@ from fastapi.middleware.gzip import GZipMiddleware from fastapi.responses import JSONResponse from scout_apm.async_.starlette import ScoutMiddleware +from sentry_sdk.integrations.asgi import SentryAsgiMiddleware from .config import get_settings from .data import data_source @@ -55,7 +55,7 @@ # Sentry Error Tracking if SETTINGS.sentry_dsn: # pragma: no cover LOGGER.info("Adding Sentry middleware") - APP.add_middleware(sentry_asgi.SentryMiddleware) + APP.add_middleware(SentryAsgiMiddleware) # Enable CORS. APP.add_middleware( diff --git a/requirements.txt b/requirements.txt index cbee4d21..02ab222e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -30,7 +30,6 @@ python-dateutil==2.8.1 python-dotenv==0.13.0 requests==2.23.0 scout-apm==2.14.1 -sentry-asgi==0.2.0 sentry-sdk==0.14.3 six==1.14.0 starlette==0.13.2 From ecb0a6867b03909fc76220817f7f4951b064c4f8 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Sat, 9 May 2020 18:36:44 -0400 Subject: [PATCH 11/26] cache redis json serialization error --- app/services/location/csbs.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/services/location/csbs.py b/app/services/location/csbs.py index e8668280..ddfe48b7 100644 --- a/app/services/location/csbs.py +++ b/app/services/location/csbs.py @@ -92,7 +92,11 @@ async def get_locations(): ) LOGGER.info(f"{data_id} Data normalized") # save the results to distributed cache - await load_cache(data_id, locations) - + # TODO: fix json serialization + try: + await load_cache(data_id, locations) + except TypeError as type_err: + LOGGER.error(type_err) + # Return the locations. return locations From 464453db2f30d9a9e8042bbc27e75618aeffe9f9 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Sat, 9 May 2020 19:20:02 -0400 Subject: [PATCH 12/26] fix nyt redis serialization error --- app/services/location/nyt.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/services/location/nyt.py b/app/services/location/nyt.py index 3ba12d02..52b565ae 100644 --- a/app/services/location/nyt.py +++ b/app/services/location/nyt.py @@ -136,6 +136,10 @@ async def get_locations(): ) LOGGER.info(f"{data_id} Data normalized") # save the results to distributed cache - await load_cache(data_id, locations) + # TODO: fix json serialization + try: + await load_cache(data_id, locations) + except TypeError as type_err: + LOGGER.error(type_err) return locations From aa8b51dd5917d90c8ee66a70ee9c8798a69ab7d6 Mon Sep 17 00:00:00 2001 From: Thanh Nguyen Date: Wed, 20 May 2020 01:38:13 -0400 Subject: [PATCH 13/26] refactor Timeline class to pydantic model --- app/models.py | 21 ++++++++++++++++-- app/services/location/csbs.py | 2 +- app/services/location/jhu.py | 8 +++---- app/services/location/nyt.py | 8 +++---- app/timeline.py | 42 ----------------------------------- tests/test_location.py | 10 ++++----- tests/test_timeline.py | 4 ++-- 7 files changed, 35 insertions(+), 60 deletions(-) delete mode 100644 app/timeline.py diff --git a/app/models.py b/app/models.py index 8875a92c..497a4b83 100644 --- a/app/models.py +++ b/app/models.py @@ -1,7 +1,7 @@ """app.models.py""" from typing import Dict, List -from pydantic import BaseModel +from pydantic import BaseModel, validator class Latest(BaseModel): @@ -27,9 +27,26 @@ class Timeline(BaseModel): Timeline model. """ - latest: int timeline: Dict[str, int] = {} + @validator("timeline") + @classmethod + def sort_timeline(cls, value): + """Sort the timeline history before inserting into the model""" + return dict(sorted(value.items())) + + @property + def latest(self): + """Get latest available history value.""" + return list(self.timeline.values())[-1] if self.timeline else 0 + + def serialize(self): + """ + Serialize the model into dict + TODO: override dict() instead of using serialize + """ + return {**self.dict(), "latest": self.latest} + class Timelines(BaseModel): """ diff --git a/app/services/location/csbs.py b/app/services/location/csbs.py index ddfe48b7..444ebad6 100644 --- a/app/services/location/csbs.py +++ b/app/services/location/csbs.py @@ -97,6 +97,6 @@ async def get_locations(): await load_cache(data_id, locations) except TypeError as type_err: LOGGER.error(type_err) - + # Return the locations. return locations diff --git a/app/services/location/jhu.py b/app/services/location/jhu.py index 06fa3fe0..fcb1756d 100644 --- a/app/services/location/jhu.py +++ b/app/services/location/jhu.py @@ -11,7 +11,7 @@ from ...caches import check_cache, load_cache from ...coordinates import Coordinates from ...location import TimelinedLocation -from ...timeline import Timeline +from ...models import Timeline from ...utils import countries from ...utils import date as date_util from ...utils import httputils @@ -175,18 +175,18 @@ async def get_locations(): # Timelines (parse dates as ISO). { "confirmed": Timeline( - { + timeline={ datetime.strptime(date, "%m/%d/%y").isoformat() + "Z": amount for date, amount in timelines["confirmed"].items() } ), "deaths": Timeline( - { + timeline={ datetime.strptime(date, "%m/%d/%y").isoformat() + "Z": amount for date, amount in timelines["deaths"].items() } ), - "recovered": Timeline({}), + "recovered": Timeline(), }, ) ) diff --git a/app/services/location/nyt.py b/app/services/location/nyt.py index 52b565ae..1f25ec34 100644 --- a/app/services/location/nyt.py +++ b/app/services/location/nyt.py @@ -9,7 +9,7 @@ from ...caches import check_cache, load_cache from ...coordinates import Coordinates from ...location.nyt import NYTLocation -from ...timeline import Timeline +from ...models import Timeline from ...utils import httputils from . import LocationService @@ -119,18 +119,18 @@ async def get_locations(): last_updated=datetime.utcnow().isoformat() + "Z", # since last request timelines={ "confirmed": Timeline( - { + timeline={ datetime.strptime(date, "%Y-%m-%d").isoformat() + "Z": amount for date, amount in confirmed_history.items() } ), "deaths": Timeline( - { + timeline={ datetime.strptime(date, "%Y-%m-%d").isoformat() + "Z": amount for date, amount in deaths_history.items() } ), - "recovered": Timeline({}), + "recovered": Timeline(), }, ) ) diff --git a/app/timeline.py b/app/timeline.py deleted file mode 100644 index 0b40d496..00000000 --- a/app/timeline.py +++ /dev/null @@ -1,42 +0,0 @@ -"""app.timeline.py""" -from collections import OrderedDict - - -class Timeline: - """ - Timeline with history of data. - """ - - def __init__(self, history=None): - self.__timeline = history if history else {} - - @property - def timeline(self): - """ - Gets the history sorted by date (key). - """ - return OrderedDict(sorted(self.__timeline.items())) - - @property - def latest(self): - """ - Gets the latest available history value. - """ - # Get values in a list. - values = list(self.timeline.values()) - - # Last item is the latest. - if values: - return values[-1] or 0 - - # Fallback value of 0. - return 0 - - def serialize(self): - """ - Serializes the timeline into a dict. - - :returns: The serialized timeline. - :rtype: dict - """ - return {"latest": self.latest, "timeline": self.timeline} diff --git a/tests/test_location.py b/tests/test_location.py index 50129a52..08d9d7c8 100644 --- a/tests/test_location.py +++ b/tests/test_location.py @@ -3,7 +3,7 @@ import pytest -from app import coordinates, location, timeline +from app import coordinates, location, models def mocked_timeline(*args, **kwargs): @@ -22,7 +22,7 @@ def __init__(self, latest): (2, "Cruise Ship", "XX", "", 15, 100, 1000, 1111, 22222), ], ) -@mock.patch("app.timeline.Timeline", side_effect=mocked_timeline) +@mock.patch("app.models.Timeline", side_effect=mocked_timeline) def test_location_class( mocked_timeline, test_id, @@ -39,9 +39,9 @@ def test_location_class( coords = coordinates.Coordinates(latitude=latitude, longitude=longitude) # Timelines - confirmed = timeline.Timeline(confirmed_latest) - deaths = timeline.Timeline(deaths_latest) - recovered = timeline.Timeline(recovered_latest) + confirmed = models.Timeline(confirmed_latest) + deaths = models.Timeline(deaths_latest) + recovered = models.Timeline(recovered_latest) # Date now. now = datetime.utcnow().isoformat() + "Z" diff --git a/tests/test_timeline.py b/tests/test_timeline.py index 79612f5a..18a914ca 100644 --- a/tests/test_timeline.py +++ b/tests/test_timeline.py @@ -3,7 +3,7 @@ import pytest -from app import timeline +from app import models def test_timeline_class(): @@ -15,7 +15,7 @@ def test_timeline_class(): "1/23/20": 3, } - history_data = timeline.Timeline(history=timeseries) + history_data = models.Timeline(timeline=timeseries) # validate last value assert history_data.latest == 7 From f98447e1d63fd713e5fe7c653865915c4803fee5 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Wed, 20 May 2020 17:49:21 -0400 Subject: [PATCH 14/26] partial recovery fix (#31) * :thumbsup: fixing recovery data in api/v2 jhu * :rotating_light: fix linting issue * :white_check_mark: unittest for parse val history Co-authored-by: codedawi --- Procfile | 2 +- app/services/location/jhu.py | 46 ++++++++++++++++++++++++++++++------ tests/test_jhu.py | 24 +++++++++++++++++++ tests/test_routes.py | 8 +++---- 4 files changed, 67 insertions(+), 13 deletions(-) diff --git a/Procfile b/Procfile index aa7dd193..517e2a0c 100644 --- a/Procfile +++ b/Procfile @@ -1 +1 @@ -web: gunicorn app.main:APP -w 2 --max-requests 1000 --max-requests-jitter 400 -k uvicorn.workers.UvicornWorker +web: gunicorn app.main:APP -w 3 -k uvicorn.workers.UvicornWorker diff --git a/app/services/location/jhu.py b/app/services/location/jhu.py index 06fa3fe0..6f488742 100644 --- a/app/services/location/jhu.py +++ b/app/services/location/jhu.py @@ -140,22 +140,31 @@ async def get_locations(): # Get all of the data categories locations. confirmed = await get_category("confirmed") deaths = await get_category("deaths") - # recovered = await get_category("recovered") + recovered = await get_category("recovered") locations_confirmed = confirmed["locations"] locations_deaths = deaths["locations"] - # locations_recovered = recovered["locations"] + locations_recovered = recovered["locations"] # Final locations to return. locations = [] - + # *************************************************************************** + # TODO: This iteration approach assumes the indexes remain the same + # and opens us to a CRITICAL ERROR. The removal of a column in the data source + # would break the API or SHIFT all the data confirmed, deaths, recovery producting + # incorrect data to consumers. + # *************************************************************************** # Go through locations. for index, location in enumerate(locations_confirmed): # Get the timelines. + + # TEMP: Fix for merging recovery data. See TODO above for more details. + key = (location["country"], location["province"]) + timelines = { - "confirmed": locations_confirmed[index]["history"], - "deaths": locations_deaths[index]["history"], - # 'recovered' : locations_recovered[index]['history'], + "confirmed": location["history"], + "deaths": parse_history(key, locations_deaths, index), + "recovered": parse_history(key, locations_recovered, index), } # Grab coordinates. @@ -186,7 +195,12 @@ async def get_locations(): for date, amount in timelines["deaths"].items() } ), - "recovered": Timeline({}), + "recovered": Timeline( + { + datetime.strptime(date, "%m/%d/%y").isoformat() + "Z": amount + for date, amount in timelines["recovered"].items() + } + ), }, ) ) @@ -194,3 +208,21 @@ async def get_locations(): # Finally, return the locations. return locations + + +def parse_history(key: tuple, locations: list, index: int): + """ + Helper for validating and extracting history content from + locations data based on index. Validates with the current country/province + key to make sure no index/column issue. + + TEMP: solution because implement a more efficient and better approach in the refactor. + """ + location_history = {} + try: + if key == (locations[index]["country"], locations[index]["province"]): + location_history = locations[index]["history"] + except (IndexError, KeyError): + LOGGER.debug(f"iteration data merge error: {index} {key}") + + return location_history diff --git a/tests/test_jhu.py b/tests/test_jhu.py index 3790218d..f6af4b9e 100644 --- a/tests/test_jhu.py +++ b/tests/test_jhu.py @@ -22,3 +22,27 @@ async def test_get_locations(mock_client_session): # `jhu.get_locations()` creates id based on confirmed list location_confirmed = await jhu.get_category("confirmed") assert len(output) == len(location_confirmed["locations"]) + + # `jhu.get_locations()` creates id based on deaths list + location_deaths = await jhu.get_category("deaths") + assert len(output) == len(location_deaths["locations"]) + + # `jhu.get_locations()` creates id based on recovered list + location_recovered = await jhu.get_category("recovered") + assert len(output) == len(location_recovered["locations"]) + + +@pytest.mark.parametrize( + "key, locations, index, expected", + [ + (("Thailand", "TH"), [{"country": "Thailand", "province": "TH", "history": {"test": "yes"}}], 0, {"test": "yes"}), # Success + (("Deutschland", "DE"), [{"country": "Deutschland", "province": "DE", "history": {"test": "no"}}], 1, {}), # IndexError + (("US", "NJ"), [{"country": "Deutschland", "province": "DE", "history": {"test": "no"}}], 0, {}), # Invaid Key Merge + ], +) +def test_parse_history(key, locations, index, expected): + """ + Test validating and extracting history content from + locations data based on index. + """ + assert jhu.parse_history(key, locations, index) == expected diff --git a/tests/test_routes.py b/tests/test_routes.py index eea153bc..5c81641b 100644 --- a/tests/test_routes.py +++ b/tests/test_routes.py @@ -112,8 +112,7 @@ async def test_v2_locations(self): with open(filepath, "r") as file: expected_json_output = file.read() - # TODO: Why is this failing? - # assert return_data == json.loads(expected_json_output) + assert return_data == json.loads(expected_json_output) async def test_v2_locations_id(self): state = "locations" @@ -132,8 +131,7 @@ async def test_v2_locations_id(self): with open(filepath, "r") as file: expected_json_output = file.read() - # TODO: Why is this failing? - # assert return_data == expected_json_output + assert return_data == json.loads(expected_json_output) @pytest.mark.asyncio @@ -187,4 +185,4 @@ async def test_latest(async_api_client, query_params, mock_client_session): assert response.status_code == 200 assert response_json["latest"]["confirmed"] - assert response_json["latest"]["deaths"] + assert response_json["latest"]["deaths"] \ No newline at end of file From 4bde047b18b7ec0f60ef06e36286a2af18cbeb09 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Wed, 20 May 2020 17:56:48 -0400 Subject: [PATCH 15/26] Formatting & version (#32) * formatting * increment version --- app/main.py | 2 +- app/services/location/csbs.py | 2 +- tests/test_jhu.py | 21 ++++++++++++++++++--- tests/test_routes.py | 2 +- 4 files changed, 21 insertions(+), 6 deletions(-) diff --git a/app/main.py b/app/main.py index b43b4aae..b9aff949 100644 --- a/app/main.py +++ b/app/main.py @@ -34,7 +34,7 @@ "API for tracking the global coronavirus (COVID-19, SARS-CoV-2) outbreak." " Project page: https://github.com/ExpDev07/coronavirus-tracker-api." ), - version="2.0.3", + version="2.0.4", docs_url="/", redoc_url="/docs", on_startup=[setup_client_session], diff --git a/app/services/location/csbs.py b/app/services/location/csbs.py index ddfe48b7..444ebad6 100644 --- a/app/services/location/csbs.py +++ b/app/services/location/csbs.py @@ -97,6 +97,6 @@ async def get_locations(): await load_cache(data_id, locations) except TypeError as type_err: LOGGER.error(type_err) - + # Return the locations. return locations diff --git a/tests/test_jhu.py b/tests/test_jhu.py index f6af4b9e..65f960db 100644 --- a/tests/test_jhu.py +++ b/tests/test_jhu.py @@ -35,9 +35,24 @@ async def test_get_locations(mock_client_session): @pytest.mark.parametrize( "key, locations, index, expected", [ - (("Thailand", "TH"), [{"country": "Thailand", "province": "TH", "history": {"test": "yes"}}], 0, {"test": "yes"}), # Success - (("Deutschland", "DE"), [{"country": "Deutschland", "province": "DE", "history": {"test": "no"}}], 1, {}), # IndexError - (("US", "NJ"), [{"country": "Deutschland", "province": "DE", "history": {"test": "no"}}], 0, {}), # Invaid Key Merge + ( + ("Thailand", "TH"), + [{"country": "Thailand", "province": "TH", "history": {"test": "yes"}}], + 0, + {"test": "yes"}, + ), # Success + ( + ("Deutschland", "DE"), + [{"country": "Deutschland", "province": "DE", "history": {"test": "no"}}], + 1, + {}, + ), # IndexError + ( + ("US", "NJ"), + [{"country": "Deutschland", "province": "DE", "history": {"test": "no"}}], + 0, + {}, + ), # Invaid Key Merge ], ) def test_parse_history(key, locations, index, expected): diff --git a/tests/test_routes.py b/tests/test_routes.py index 5c81641b..5143ca8a 100644 --- a/tests/test_routes.py +++ b/tests/test_routes.py @@ -185,4 +185,4 @@ async def test_latest(async_api_client, query_params, mock_client_session): assert response.status_code == 200 assert response_json["latest"]["confirmed"] - assert response_json["latest"]["deaths"] \ No newline at end of file + assert response_json["latest"]["deaths"] From a9556701f5056e47082361adbf90524729de7e3d Mon Sep 17 00:00:00 2001 From: Gabriel Date: Tue, 28 Jul 2020 12:07:24 -0400 Subject: [PATCH 16/26] update FastAPI .54.1 -> .64.1 (#34) --- Pipfile.lock | 726 ++++++++++++++++++++++--------------------- requirements-dev.txt | 48 +-- requirements.txt | 41 +-- 3 files changed, 417 insertions(+), 398 deletions(-) diff --git a/Pipfile.lock b/Pipfile.lock index 7cdfd8a1..c68ce3a1 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -62,11 +62,11 @@ }, "asgiref": { "hashes": [ - "sha256:8036f90603c54e93521e5777b2b9a39ba1bad05773fcf2d208f0299d1df58ce5", - "sha256:9ca8b952a0a9afa61d30aa6d3d9b570bb3fd6bafcf7ec9e6bed43b936133db1c" + "sha256:7e51911ee147dd685c3c8b805c0ad0cb58d360987b56953878f8c06d2d1c6f1a", + "sha256:9fc6fb5d39b8af147ba40765234fa822b39818b12cc80b35ad9b0cef3a476aed" ], "markers": "python_version >= '3.5'", - "version": "==3.2.7" + "version": "==3.2.10" }, "async-timeout": { "hashes": [ @@ -91,51 +91,51 @@ }, "cachetools": { "hashes": [ - "sha256:1d057645db16ca7fe1f3bd953558897603d6f0b9c51ed9d11eb4d071ec4e2aab", - "sha256:de5d88f87781602201cde465d3afe837546663b168e8b39df67411b0bf10cefc" + "sha256:513d4ff98dd27f85743a8dc0e92f55ddb1b49e060c2d5961512855cda2c01a98", + "sha256:bbaa39c3dede00175df2dc2b03d0cf18dd2d32a7de7beb68072d13043c9edb20" ], "index": "pypi", - "version": "==4.1.0" + "version": "==4.1.1" }, "certifi": { "hashes": [ - "sha256:1d987a998c75633c40847cc966fcf5904906c920a7f17ef374f5aa4282abd304", - "sha256:51fcb31174be6e6664c5f69e3e1691a2d72a1a12e90f872cbdb1567eb47b6519" + "sha256:5930595817496dd21bb8dc35dad090f1c2cd0adfaf21204bf6732ca5d8ee34d3", + "sha256:8fc0819f1f30ba15bdb34cceffb9ef04d99f420f68eb75d901e9560b8749fc41" ], - "version": "==2020.4.5.1" + "version": "==2020.6.20" }, "cffi": { "hashes": [ - "sha256:001bf3242a1bb04d985d63e138230802c6c8d4db3668fb545fb5005ddf5bb5ff", - "sha256:00789914be39dffba161cfc5be31b55775de5ba2235fe49aa28c148236c4e06b", - "sha256:028a579fc9aed3af38f4892bdcc7390508adabc30c6af4a6e4f611b0c680e6ac", - "sha256:14491a910663bf9f13ddf2bc8f60562d6bc5315c1f09c704937ef17293fb85b0", - "sha256:1cae98a7054b5c9391eb3249b86e0e99ab1e02bb0cc0575da191aedadbdf4384", - "sha256:2089ed025da3919d2e75a4d963d008330c96751127dd6f73c8dc0c65041b4c26", - "sha256:2d384f4a127a15ba701207f7639d94106693b6cd64173d6c8988e2c25f3ac2b6", - "sha256:337d448e5a725bba2d8293c48d9353fc68d0e9e4088d62a9571def317797522b", - "sha256:399aed636c7d3749bbed55bc907c3288cb43c65c4389964ad5ff849b6370603e", - "sha256:3b911c2dbd4f423b4c4fcca138cadde747abdb20d196c4a48708b8a2d32b16dd", - "sha256:3d311bcc4a41408cf5854f06ef2c5cab88f9fded37a3b95936c9879c1640d4c2", - "sha256:62ae9af2d069ea2698bf536dcfe1e4eed9090211dbaafeeedf5cb6c41b352f66", - "sha256:66e41db66b47d0d8672d8ed2708ba91b2f2524ece3dee48b5dfb36be8c2f21dc", - "sha256:675686925a9fb403edba0114db74e741d8181683dcf216be697d208857e04ca8", - "sha256:7e63cbcf2429a8dbfe48dcc2322d5f2220b77b2e17b7ba023d6166d84655da55", - "sha256:8a6c688fefb4e1cd56feb6c511984a6c4f7ec7d2a1ff31a10254f3c817054ae4", - "sha256:8c0ffc886aea5df6a1762d0019e9cb05f825d0eec1f520c51be9d198701daee5", - "sha256:95cd16d3dee553f882540c1ffe331d085c9e629499ceadfbda4d4fde635f4b7d", - "sha256:99f748a7e71ff382613b4e1acc0ac83bf7ad167fb3802e35e90d9763daba4d78", - "sha256:b8c78301cefcf5fd914aad35d3c04c2b21ce8629b5e4f4e45ae6812e461910fa", - "sha256:c420917b188a5582a56d8b93bdd8e0f6eca08c84ff623a4c16e809152cd35793", - "sha256:c43866529f2f06fe0edc6246eb4faa34f03fe88b64a0a9a942561c8e22f4b71f", - "sha256:cab50b8c2250b46fe738c77dbd25ce017d5e6fb35d3407606e7a4180656a5a6a", - "sha256:cef128cb4d5e0b3493f058f10ce32365972c554572ff821e175dbc6f8ff6924f", - "sha256:cf16e3cf6c0a5fdd9bc10c21687e19d29ad1fe863372b5543deaec1039581a30", - "sha256:e56c744aa6ff427a607763346e4170629caf7e48ead6921745986db3692f987f", - "sha256:e577934fc5f8779c554639376beeaa5657d54349096ef24abe8c74c5d9c117c3", - "sha256:f2b0fa0c01d8a0c7483afd9f31d7ecf2d71760ca24499c8697aeb5ca37dc090c" - ], - "version": "==1.14.0" + "sha256:267adcf6e68d77ba154334a3e4fc921b8e63cbb38ca00d33d40655d4228502bc", + "sha256:26f33e8f6a70c255767e3c3f957ccafc7f1f706b966e110b855bfe944511f1f9", + "sha256:3cd2c044517f38d1b577f05927fb9729d3396f1d44d0c659a445599e79519792", + "sha256:4a03416915b82b81af5502459a8a9dd62a3c299b295dcdf470877cb948d655f2", + "sha256:4ce1e995aeecf7cc32380bc11598bfdfa017d592259d5da00fc7ded11e61d022", + "sha256:4f53e4128c81ca3212ff4cf097c797ab44646a40b42ec02a891155cd7a2ba4d8", + "sha256:4fa72a52a906425416f41738728268072d5acfd48cbe7796af07a923236bcf96", + "sha256:66dd45eb9530e3dde8f7c009f84568bc7cac489b93d04ac86e3111fb46e470c2", + "sha256:6923d077d9ae9e8bacbdb1c07ae78405a9306c8fd1af13bfa06ca891095eb995", + "sha256:833401b15de1bb92791d7b6fb353d4af60dc688eaa521bd97203dcd2d124a7c1", + "sha256:8416ed88ddc057bab0526d4e4e9f3660f614ac2394b5e019a628cdfff3733849", + "sha256:892daa86384994fdf4856cb43c93f40cbe80f7f95bb5da94971b39c7f54b3a9c", + "sha256:98be759efdb5e5fa161e46d404f4e0ce388e72fbf7d9baf010aff16689e22abe", + "sha256:a6d28e7f14ecf3b2ad67c4f106841218c8ab12a0683b1528534a6c87d2307af3", + "sha256:b1d6ebc891607e71fd9da71688fcf332a6630b7f5b7f5549e6e631821c0e5d90", + "sha256:b2a2b0d276a136146e012154baefaea2758ef1f56ae9f4e01c612b0831e0bd2f", + "sha256:b87dfa9f10a470eee7f24234a37d1d5f51e5f5fa9eeffda7c282e2b8f5162eb1", + "sha256:bac0d6f7728a9cc3c1e06d4fcbac12aaa70e9379b3025b27ec1226f0e2d404cf", + "sha256:c991112622baee0ae4d55c008380c32ecfd0ad417bcd0417ba432e6ba7328caa", + "sha256:cda422d54ee7905bfc53ee6915ab68fe7b230cacf581110df4272ee10462aadc", + "sha256:d3148b6ba3923c5850ea197a91a42683f946dba7e8eb82dfa211ab7e708de939", + "sha256:d6033b4ffa34ef70f0b8086fd4c3df4bf801fee485a8a7d4519399818351aa8e", + "sha256:ddff0b2bd7edcc8c82d1adde6dbbf5e60d57ce985402541cd2985c27f7bec2a0", + "sha256:e23cb7f1d8e0f93addf0cae3c5b6f00324cccb4a7949ee558d7b6ca973ab8ae9", + "sha256:effd2ba52cee4ceff1a77f20d2a9f9bf8d50353c854a282b8760ac15b9833168", + "sha256:f90c2267101010de42f7273c94a1f026e56cbc043f9330acd8a80e64300aba33", + "sha256:f960375e9823ae6a07072ff7f8a85954e5a6434f97869f50d0e41649a1c8144f", + "sha256:fcf32bf76dc25e30ed793145a57426064520890d7c02866eb93d3e4abe516948" + ], + "version": "==1.14.1" }, "chardet": { "hashes": [ @@ -153,27 +153,27 @@ }, "cryptography": { "hashes": [ - "sha256:091d31c42f444c6f519485ed528d8b451d1a0c7bf30e8ca583a0cac44b8a0df6", - "sha256:18452582a3c85b96014b45686af264563e3e5d99d226589f057ace56196ec78b", - "sha256:1dfa985f62b137909496e7fc182dac687206d8d089dd03eaeb28ae16eec8e7d5", - "sha256:1e4014639d3d73fbc5ceff206049c5a9a849cefd106a49fa7aaaa25cc0ce35cf", - "sha256:22e91636a51170df0ae4dcbd250d318fd28c9f491c4e50b625a49964b24fe46e", - "sha256:3b3eba865ea2754738616f87292b7f29448aec342a7c720956f8083d252bf28b", - "sha256:651448cd2e3a6bc2bb76c3663785133c40d5e1a8c1a9c5429e4354201c6024ae", - "sha256:726086c17f94747cedbee6efa77e99ae170caebeb1116353c6cf0ab67ea6829b", - "sha256:844a76bc04472e5135b909da6aed84360f522ff5dfa47f93e3dd2a0b84a89fa0", - "sha256:88c881dd5a147e08d1bdcf2315c04972381d026cdb803325c03fe2b4a8ed858b", - "sha256:96c080ae7118c10fcbe6229ab43eb8b090fccd31a09ef55f83f690d1ef619a1d", - "sha256:a0c30272fb4ddda5f5ffc1089d7405b7a71b0b0f51993cb4e5dbb4590b2fc229", - "sha256:bb1f0281887d89617b4c68e8db9a2c42b9efebf2702a3c5bf70599421a8623e3", - "sha256:c447cf087cf2dbddc1add6987bbe2f767ed5317adb2d08af940db517dd704365", - "sha256:c4fd17d92e9d55b84707f4fd09992081ba872d1a0c610c109c18e062e06a2e55", - "sha256:d0d5aeaedd29be304848f1c5059074a740fa9f6f26b84c5b63e8b29e73dfc270", - "sha256:daf54a4b07d67ad437ff239c8a4080cfd1cc7213df57d33c97de7b4738048d5e", - "sha256:e993468c859d084d5579e2ebee101de8f5a27ce8e2159959b6673b418fd8c785", - "sha256:f118a95c7480f5be0df8afeb9a11bd199aa20afab7a96bcf20409b411a3a85f0" - ], - "version": "==2.9.2" + "sha256:0c608ff4d4adad9e39b5057de43657515c7da1ccb1807c3a27d4cf31fc923b4b", + "sha256:0cbfed8ea74631fe4de00630f4bb592dad564d57f73150d6f6796a24e76c76cd", + "sha256:124af7255ffc8e964d9ff26971b3a6153e1a8a220b9a685dc407976ecb27a06a", + "sha256:384d7c681b1ab904fff3400a6909261cae1d0939cc483a68bdedab282fb89a07", + "sha256:45741f5499150593178fc98d2c1a9c6722df88b99c821ad6ae298eff0ba1ae71", + "sha256:4b9303507254ccb1181d1803a2080a798910ba89b1a3c9f53639885c90f7a756", + "sha256:4d355f2aee4a29063c10164b032d9fa8a82e2c30768737a2fd56d256146ad559", + "sha256:51e40123083d2f946794f9fe4adeeee2922b581fa3602128ce85ff813d85b81f", + "sha256:8713ddb888119b0d2a1462357d5946b8911be01ddbf31451e1d07eaa5077a261", + "sha256:8e924dbc025206e97756e8903039662aa58aa9ba357d8e1d8fc29e3092322053", + "sha256:8ecef21ac982aa78309bb6f092d1677812927e8b5ef204a10c326fc29f1367e2", + "sha256:8ecf9400d0893836ff41b6f977a33972145a855b6efeb605b49ee273c5e6469f", + "sha256:9367d00e14dee8d02134c6c9524bb4bd39d4c162456343d07191e2a0b5ec8b3b", + "sha256:a09fd9c1cca9a46b6ad4bea0a1f86ab1de3c0c932364dbcf9a6c2a5eeb44fa77", + "sha256:ab49edd5bea8d8b39a44b3db618e4783ef84c19c8b47286bf05dfdb3efb01c83", + "sha256:bea0b0468f89cdea625bb3f692cd7a4222d80a6bdafd6fb923963f2b9da0e15f", + "sha256:bec7568c6970b865f2bcebbe84d547c52bb2abadf74cefce396ba07571109c67", + "sha256:ce82cc06588e5cbc2a7df3c8a9c778f2cb722f56835a23a68b5a7264726bb00c", + "sha256:dea0ba7fe6f9461d244679efa968d215ea1f989b9c1957d7f10c21e5c7c09ad6" + ], + "version": "==3.0" }, "dataclasses": { "hashes": [ @@ -186,11 +186,11 @@ }, "fastapi": { "hashes": [ - "sha256:1ee9a49f28d510b62b3b51a9452b274853bfc9c5d4b947ed054366e2d49f9efa", - "sha256:72f40f47e5235cb5cbbad1d4f97932ede6059290c07e12e9784028dcd1063d28" + "sha256:96f964c3d9da8183f824857ad67c16c00ff3297e7bbca6748f60bd8485ded38c", + "sha256:9a4faa0e2b9c88a3772f7ce15eb4005bbdd27d1230ab4a0cd3517316175014a6" ], "index": "pypi", - "version": "==0.54.1" + "version": "==0.60.1" }, "gunicorn": { "hashes": [ @@ -209,48 +209,54 @@ }, "hiredis": { "hashes": [ - "sha256:01b577f84c20ecc9c07fc4c184231b08e3c3942de096fa99978e053de231c423", - "sha256:01ff0900134166961c9e339df77c33b72f7edc5cb41739f0babcd9faa345926e", - "sha256:03ed34a13316d0c34213c4fd46e0fa3a5299073f4d4f08e93fed8c2108b399b3", - "sha256:040436e91df5143aff9e0debb49530d0b17a6bd52200ce568621c31ef581b10d", - "sha256:091eb38fbf968d1c5b703e412bbbd25f43a7967d8400842cee33a5a07b33c27b", - "sha256:102f9b9dc6ed57feb3a7c9bdf7e71cb7c278fe8df1edfcfe896bc3e0c2be9447", - "sha256:2b4b392c7e3082860c8371fab3ae762139090f9115819e12d9f56060f9ede05d", - "sha256:2c9cc0b986397b833073f466e6b9e9c70d1d4dc2c2c1b3e9cae3a23102ff296c", - "sha256:2fa65a9df683bca72073cd77709ddeb289ea2b114d3775d225fbbcc5faf808c5", - "sha256:38437a681f17c975fd22349e72c29bc643f8e7eb2d6dc5df419eac59afa4d7ce", - "sha256:3b3428fa3cf1ee178807b52c9bee8950ab94cd4eaa9bfae8c1bbae3c49501d34", - "sha256:3dd8c2fae7f5494978facb0e93297dd627b1a3f536f3b070cf0a7d9157a07dcb", - "sha256:4414a96c212e732723b5c3d7c04d386ebbb2ec359e1de646322cbc3f875cbd0d", - "sha256:48c627581ad4ef60adbac980981407939acf13a0e18f093502c7b542223c4f19", - "sha256:4a60e71625a2d78d8ab84dfb2fa2cfd9458c964b6e6c04fea76d9ade153fb371", - "sha256:585ace09f434e43d8a8dbeb366865b1a044d7c06319b3c7372a0a00e63b860f4", - "sha256:74b364b3f06c9cf0a53f7df611045bc9437ed972a283fa1f0b12537236d23ddc", - "sha256:75c65c3850e89e9daa68d1b9bedd5806f177d60aa5a7b0953b4829481cfc1f72", - "sha256:7f052de8bf744730a9120dbdc67bfeb7605a01f69fb8e7ba5c475af33c24e145", - "sha256:8113a7d5e87ecf57cd4ae263cc9e429adb9a3e59f5a7768da5d3312a8d0a051a", - "sha256:84857ce239eb8ed191ac78e77ff65d52902f00f30f4ee83bf80eb71da73b70e6", - "sha256:8644a48ddc4a40b3e3a6b9443f396c2ee353afb2d45656c4fc68d04a82e8e3f7", - "sha256:936aa565e673536e8a211e43ec43197406f24cd1f290138bd143765079c8ba00", - "sha256:9afeb88c67bbc663b9f27385c496da056d06ad87f55df6e393e1516cfecb0461", - "sha256:9d62cc7880110e4f83b0a51d218f465d3095e2751fbddd34e553dbd106a929ff", - "sha256:a1fadd062fc8d647ff39220c57ea2b48c99bb73f18223828ec97f88fc27e7898", - "sha256:a7754a783b1e5d6f627c19d099b178059c62f782ab62b4d8ba165b9fbc2ee34c", - "sha256:aa59dd63bb3f736de4fc2d080114429d5d369dfb3265f771778e8349d67a97a4", - "sha256:ae2ee0992f8de249715435942137843a93db204dd7db1e7cc9bdc5a8436443e8", - "sha256:b36842d7cf32929d568f37ec5b3173b72b2ec6572dec4d6be6ce774762215aee", - "sha256:bcbf9379c553b5facc6c04c1e5569b44b38ff16bcbf354676287698d61ee0c92", - "sha256:cbccbda6f1c62ab460449d9c85fdf24d0d32a6bf45176581151e53cc26a5d910", - "sha256:d0caf98dfb8af395d6732bd16561c0a2458851bea522e39f12f04802dbf6f502", - "sha256:d6456afeddba036def1a36d8a2758eca53202308d83db20ab5d0b66590919627", - "sha256:dbaef9a21a4f10bc281684ee4124f169e62bb533c2a92b55f8c06f64f9af7b8f", - "sha256:dce84916c09aaece006272b37234ae84a8ed13abb3a4d341a23933b8701abfb5", - "sha256:eb8c9c8b9869539d58d60ff4a28373a22514d40495911451343971cb4835b7a9", - "sha256:efc98b14ee3a8595e40b1425e8d42f5fd26f11a7b215a81ef9259068931754f4", - "sha256:fa2dc05b87d97acc1c6ae63f3e0f39eae5246565232484b08db6bf2dc1580678", - "sha256:fe7d6ce9f6a5fbe24f09d95ea93e9c7271abc4e1565da511e1449b107b4d7848" - ], - "version": "==1.0.1" + "sha256:06a039208f83744a702279b894c8cf24c14fd63c59cd917dcde168b79eef0680", + "sha256:0a909bf501459062aa1552be1461456518f367379fdc9fdb1f2ca5e4a1fdd7c0", + "sha256:18402d9e54fb278cb9a8c638df6f1550aca36a009d47ecf5aa263a38600f35b0", + "sha256:1e4cbbc3858ec7e680006e5ca590d89a5e083235988f26a004acf7244389ac01", + "sha256:23344e3c2177baf6975fbfa361ed92eb7d36d08f454636e5054b3faa7c2aff8a", + "sha256:289b31885b4996ce04cadfd5fc03d034dce8e2a8234479f7c9e23b9e245db06b", + "sha256:2c1c570ae7bf1bab304f29427e2475fe1856814312c4a1cf1cd0ee133f07a3c6", + "sha256:2c227c0ed371771ffda256034427320870e8ea2e4fd0c0a618c766e7c49aad73", + "sha256:3bb9b63d319402cead8bbd9dd55dca3b667d2997e9a0d8a1f9b6cc274db4baee", + "sha256:3ef2183de67b59930d2db8b8e8d4d58e00a50fcc5e92f4f678f6eed7a1c72d55", + "sha256:43b8ed3dbfd9171e44c554cb4acf4ee4505caa84c5e341858b50ea27dd2b6e12", + "sha256:47bcf3c5e6c1e87ceb86cdda2ee983fa0fe56a999e6185099b3c93a223f2fa9b", + "sha256:5263db1e2e1e8ae30500cdd75a979ff99dcc184201e6b4b820d0de74834d2323", + "sha256:5b1451727f02e7acbdf6aae4e06d75f66ee82966ff9114550381c3271a90f56c", + "sha256:6996883a8a6ff9117cbb3d6f5b0dcbbae6fb9e31e1a3e4e2f95e0214d9a1c655", + "sha256:6c96f64a54f030366657a54bb90b3093afc9c16c8e0dfa29fc0d6dbe169103a5", + "sha256:7332d5c3e35154cd234fd79573736ddcf7a0ade7a986db35b6196b9171493e75", + "sha256:7885b6f32c4a898e825bb7f56f36a02781ac4a951c63e4169f0afcf9c8c30dfb", + "sha256:7b0f63f10a166583ab744a58baad04e0f52cfea1ac27bfa1b0c21a48d1003c23", + "sha256:819f95d4eba3f9e484dd115ab7ab72845cf766b84286a00d4ecf76d33f1edca1", + "sha256:8968eeaa4d37a38f8ca1f9dbe53526b69628edc9c42229a5b2f56d98bb828c1f", + "sha256:89ebf69cb19a33d625db72d2ac589d26e936b8f7628531269accf4a3196e7872", + "sha256:8daecd778c1da45b8bd54fd41ffcd471a86beed3d8e57a43acf7a8d63bba4058", + "sha256:955ba8ea73cf3ed8bd2f963b4cb9f8f0dcb27becd2f4b3dd536fd24c45533454", + "sha256:964f18a59f5a64c0170f684c417f4fe3e695a536612e13074c4dd5d1c6d7c882", + "sha256:969843fbdfbf56cdb71da6f0bdf50f9985b8b8aeb630102945306cf10a9c6af2", + "sha256:996021ef33e0f50b97ff2d6b5f422a0fe5577de21a8873b58a779a5ddd1c3132", + "sha256:9e9c9078a7ce07e6fce366bd818be89365a35d2e4b163268f0ca9ba7e13bb2f6", + "sha256:a04901757cb0fb0f5602ac11dda48f5510f94372144d06c2563ba56c480b467c", + "sha256:a7bf1492429f18d205f3a818da3ff1f242f60aa59006e53dee00b4ef592a3363", + "sha256:aa0af2deb166a5e26e0d554b824605e660039b161e37ed4f01b8d04beec184f3", + "sha256:abfb15a6a7822f0fae681785cb38860e7a2cb1616a708d53df557b3d76c5bfd4", + "sha256:b253fe4df2afea4dfa6b1fa8c5fef212aff8bcaaeb4207e81eed05cb5e4a7919", + "sha256:b27f082f47d23cffc4cf1388b84fdc45c4ef6015f906cd7e0d988d9e35d36349", + "sha256:b33aea449e7f46738811fbc6f0b3177c6777a572207412bbbf6f525ffed001ae", + "sha256:b44f9421c4505c548435244d74037618f452844c5d3c67719d8a55e2613549da", + "sha256:bcc371151d1512201d0214c36c0c150b1dc64f19c2b1a8c9cb1d7c7c15ebd93f", + "sha256:c2851deeabd96d3f6283e9c6b26e0bfed4de2dc6fb15edf913e78b79fc5909ed", + "sha256:cdfd501c7ac5b198c15df800a3a34c38345f5182e5f80770caf362bccca65628", + "sha256:d2c0caffa47606d6d7c8af94ba42547bd2a441f06c74fd90a1ffe328524a6c64", + "sha256:dcb2db95e629962db5a355047fb8aefb012df6c8ae608930d391619dbd96fd86", + "sha256:e0eeb9c112fec2031927a1745788a181d0eecbacbed941fc5c4f7bc3f7b273bf", + "sha256:e154891263306200260d7f3051982774d7b9ef35af3509d5adbbe539afd2610c", + "sha256:e2e023a42dcbab8ed31f97c2bcdb980b7fbe0ada34037d87ba9d799664b58ded", + "sha256:e64be68255234bb489a574c4f2f8df7029c98c81ec4d160d6cd836e7f0679390", + "sha256:e82d6b930e02e80e5109b678c663a9ed210680ded81c1abaf54635d88d1da298" + ], + "version": "==1.1.0" }, "httptools": { "hashes": [ @@ -272,10 +278,10 @@ }, "idna": { "hashes": [ - "sha256:7588d1c14ae4c77d74036e8c22ff447b26d0fde8f007354fd48a7814db15b7cb", - "sha256:a068a21ceac8a4d63dbfd964670474107f541babbd2250d61922f029858365fa" + "sha256:b307872f855b18632ce0c21c5e45be78c0ea7ae4c15c828c20788b26921eb3f6", + "sha256:b97d804b1e9b523befed77c48dacec60e6dcb0b5391d57af6a65a312a90648c0" ], - "version": "==2.9" + "version": "==2.10" }, "idna-ssl": { "hashes": [ @@ -287,41 +293,41 @@ }, "multidict": { "hashes": [ - "sha256:317f96bc0950d249e96d8d29ab556d01dd38888fbe68324f46fd834b430169f1", - "sha256:42f56542166040b4474c0c608ed051732033cd821126493cf25b6c276df7dd35", - "sha256:4b7df040fb5fe826d689204f9b544af469593fb3ff3a069a6ad3409f742f5928", - "sha256:544fae9261232a97102e27a926019100a9db75bec7b37feedd74b3aa82f29969", - "sha256:620b37c3fea181dab09267cd5a84b0f23fa043beb8bc50d8474dd9694de1fa6e", - "sha256:6e6fef114741c4d7ca46da8449038ec8b1e880bbe68674c01ceeb1ac8a648e78", - "sha256:7774e9f6c9af3f12f296131453f7b81dabb7ebdb948483362f5afcaac8a826f1", - "sha256:85cb26c38c96f76b7ff38b86c9d560dea10cf3459bb5f4caf72fc1bb932c7136", - "sha256:a326f4240123a2ac66bb163eeba99578e9d63a8654a59f4688a79198f9aa10f8", - "sha256:ae402f43604e3b2bc41e8ea8b8526c7fa7139ed76b0d64fc48e28125925275b2", - "sha256:aee283c49601fa4c13adc64c09c978838a7e812f85377ae130a24d7198c0331e", - "sha256:b51249fdd2923739cd3efc95a3d6c363b67bbf779208e9f37fd5e68540d1a4d4", - "sha256:bb519becc46275c594410c6c28a8a0adc66fe24fef154a9addea54c1adb006f5", - "sha256:c2c37185fb0af79d5c117b8d2764f4321eeb12ba8c141a95d0aa8c2c1d0a11dd", - "sha256:dc561313279f9d05a3d0ffa89cd15ae477528ea37aa9795c4654588a3287a9ab", - "sha256:e439c9a10a95cb32abd708bb8be83b2134fa93790a4fb0535ca36db3dda94d20", - "sha256:fc3b4adc2ee8474cb3cd2a155305d5f8eda0a9c91320f83e55748e1fcb68f8e3" - ], - "version": "==4.7.5" + "sha256:1ece5a3369835c20ed57adadc663400b5525904e53bae59ec854a5d36b39b21a", + "sha256:275ca32383bc5d1894b6975bb4ca6a7ff16ab76fa622967625baeebcf8079000", + "sha256:3750f2205b800aac4bb03b5ae48025a64e474d2c6cc79547988ba1d4122a09e2", + "sha256:4538273208e7294b2659b1602490f4ed3ab1c8cf9dbdd817e0e9db8e64be2507", + "sha256:5141c13374e6b25fe6bf092052ab55c0c03d21bd66c94a0e3ae371d3e4d865a5", + "sha256:51a4d210404ac61d32dada00a50ea7ba412e6ea945bbe992e4d7a595276d2ec7", + "sha256:5cf311a0f5ef80fe73e4f4c0f0998ec08f954a6ec72b746f3c179e37de1d210d", + "sha256:6513728873f4326999429a8b00fc7ceddb2509b01d5fd3f3be7881a257b8d463", + "sha256:7388d2ef3c55a8ba80da62ecfafa06a1c097c18032a501ffd4cabbc52d7f2b19", + "sha256:9456e90649005ad40558f4cf51dbb842e32807df75146c6d940b6f5abb4a78f3", + "sha256:c026fe9a05130e44157b98fea3ab12969e5b60691a276150db9eda71710cd10b", + "sha256:d14842362ed4cf63751648e7672f7174c9818459d169231d03c56e84daf90b7c", + "sha256:e0d072ae0f2a179c375f67e3da300b47e1a83293c554450b29c900e50afaae87", + "sha256:f07acae137b71af3bb548bd8da720956a3bc9f9a0b87733e0899226a2317aeb7", + "sha256:fbb77a75e529021e7c4a8d4e823d88ef4d23674a202be4f5addffc72cbb91430", + "sha256:fcfbb44c59af3f8ea984de67ec7c306f618a3ec771c2843804069917a8f2e255", + "sha256:feed85993dbdb1dbc29102f50bca65bdc68f2c0c8d352468c25b54874f23c39d" + ], + "version": "==4.7.6" }, "psutil": { "hashes": [ - "sha256:1413f4158eb50e110777c4f15d7c759521703bd6beb58926f1d562da40180058", - "sha256:298af2f14b635c3c7118fd9183843f4e73e681bb6f01e12284d4d70d48a60953", - "sha256:60b86f327c198561f101a92be1995f9ae0399736b6eced8f24af41ec64fb88d4", - "sha256:685ec16ca14d079455892f25bd124df26ff9137664af445563c1bd36629b5e0e", - "sha256:73f35ab66c6c7a9ce82ba44b1e9b1050be2a80cd4dcc3352cc108656b115c74f", - "sha256:75e22717d4dbc7ca529ec5063000b2b294fc9a367f9c9ede1f65846c7955fd38", - "sha256:a02f4ac50d4a23253b68233b07e7cdb567bd025b982d5cf0ee78296990c22d9e", - "sha256:d008ddc00c6906ec80040d26dc2d3e3962109e40ad07fd8a12d0284ce5e0e4f8", - "sha256:d84029b190c8a66a946e28b4d3934d2ca1528ec94764b180f7d6ea57b0e75e26", - "sha256:e2d0c5b07c6fe5a87fa27b7855017edb0d52ee73b71e6ee368fae268605cc3f5", - "sha256:f344ca230dd8e8d5eee16827596f1c22ec0876127c28e800d7ae20ed44c4b310" + "sha256:0ee3c36428f160d2d8fce3c583a0353e848abb7de9732c50cf3356dd49ad63f8", + "sha256:10512b46c95b02842c225f58fa00385c08fa00c68bac7da2d9a58ebe2c517498", + "sha256:4080869ed93cce662905b029a1770fe89c98787e543fa7347f075ade761b19d6", + "sha256:5e9d0f26d4194479a13d5f4b3798260c20cecf9ac9a461e718eb59ea520a360c", + "sha256:66c18ca7680a31bf16ee22b1d21b6397869dda8059dbdb57d9f27efa6615f195", + "sha256:68d36986ded5dac7c2dcd42f2682af1db80d4bce3faa126a6145c1637e1b559f", + "sha256:90990af1c3c67195c44c9a889184f84f5b2320dce3ee3acbd054e3ba0b4a7beb", + "sha256:a5b120bb3c0c71dfe27551f9da2f3209a8257a178ed6c628a819037a8df487f1", + "sha256:d8a82162f23c53b8525cf5f14a355f5d1eea86fa8edde27287dd3a98399e4fdf", + "sha256:f2018461733b23f308c298653c8903d32aaad7873d25e1d228765e91ae42c3f2", + "sha256:ff1977ba1a5f71f89166d5145c3da1cea89a0fdb044075a12c720ee9123ec818" ], - "version": "==5.7.0" + "version": "==5.7.2" }, "pycparser": { "hashes": [ @@ -335,26 +341,26 @@ "dotenv" ], "hashes": [ - "sha256:0a1cdf24e567d42dc762d3fed399bd211a13db2e8462af9dfa93b34c41648efb", - "sha256:2007eb062ed0e57875ce8ead12760a6e44bf5836e6a1a7ea81d71eeecf3ede0f", - "sha256:20a15a303ce1e4d831b4e79c17a4a29cb6740b12524f5bba3ea363bff65732bc", - "sha256:2a6904e9f18dea58f76f16b95cba6a2f20b72d787abd84ecd67ebc526e61dce6", - "sha256:3714a4056f5bdbecf3a41e0706ec9b228c9513eee2ad884dc2c568c4dfa540e9", - "sha256:473101121b1bd454c8effc9fe66d54812fdc128184d9015c5aaa0d4e58a6d338", - "sha256:68dece67bff2b3a5cc188258e46b49f676a722304f1c6148ae08e9291e284d98", - "sha256:70f27d2f0268f490fe3de0a9b6fca7b7492b8fd6623f9fecd25b221ebee385e3", - "sha256:8433dbb87246c0f562af75d00fa80155b74e4f6924b0db6a2078a3cd2f11c6c4", - "sha256:8be325fc9da897029ee48d1b5e40df817d97fe969f3ac3fd2434ba7e198c55d5", - "sha256:93b9f265329d9827f39f0fca68f5d72cc8321881cdc519a1304fa73b9f8a75bd", - "sha256:9be755919258d5d168aeffbe913ed6e8bd562e018df7724b68cabdee3371e331", - "sha256:ab863853cb502480b118187d670f753be65ec144e1654924bec33d63bc8b3ce2", - "sha256:b96ce81c4b5ca62ab81181212edfd057beaa41411cd9700fbcb48a6ba6564b4e", - "sha256:da8099fca5ee339d5572cfa8af12cf0856ae993406f0b1eb9bb38c8a660e7416", - "sha256:e2c753d355126ddd1eefeb167fa61c7037ecd30b98e7ebecdc0d1da463b4ea09", - "sha256:f0018613c7a0d19df3240c2a913849786f21b6539b9f23d85ce4067489dfacfa" + "sha256:1783c1d927f9e1366e0e0609ae324039b2479a1a282a98ed6a6836c9ed02002c", + "sha256:2dc946b07cf24bee4737ced0ae77e2ea6bc97489ba5a035b603bd1b40ad81f7e", + "sha256:2de562a456c4ecdc80cf1a8c3e70c666625f7d02d89a6174ecf63754c734592e", + "sha256:36dbf6f1be212ab37b5fda07667461a9219c956181aa5570a00edfb0acdfe4a1", + "sha256:3fa799f3cfff3e5f536cbd389368fc96a44bb30308f258c94ee76b73bd60531d", + "sha256:40d765fa2d31d5be8e29c1794657ad46f5ee583a565c83cea56630d3ae5878b9", + "sha256:418b84654b60e44c0cdd5384294b0e4bc1ebf42d6e873819424f3b78b8690614", + "sha256:4900b8820b687c9a3ed753684337979574df20e6ebe4227381d04b3c3c628f99", + "sha256:530d7222a2786a97bc59ee0e0ebbe23728f82974b1f1ad9a11cd966143410633", + "sha256:54122a8ed6b75fe1dd80797f8251ad2063ea348a03b77218d73ea9fe19bd4e73", + "sha256:6c3f162ba175678218629f446a947e3356415b6b09122dcb364e58c442c645a7", + "sha256:b49c86aecde15cde33835d5d6360e55f5e0067bb7143a8303bf03b872935c75b", + "sha256:b5b3489cb303d0f41ad4a7390cf606a5f2c7a94dcba20c051cd1c653694cb14d", + "sha256:cf3933c98cb5e808b62fae509f74f209730b180b1e3c3954ee3f7949e083a7df", + "sha256:eb75dc1809875d5738df14b6566ccf9fd9c0bcde4f36b72870f318f16b9f5c20", + "sha256:f769141ab0abfadf3305d4fcf36660e5cf568a666dd3efab7c3d4782f70946b1", + "sha256:f8af9b840a9074e08c0e6dc93101de84ba95df89b267bf7151d74c553d66833b" ], "index": "pypi", - "version": "==1.5.1" + "version": "==1.6.1" }, "pyopenssl": { "hashes": [ @@ -373,84 +379,92 @@ }, "python-dotenv": { "hashes": [ - "sha256:25c0ff1a3e12f4bde8d592cc254ab075cfe734fc5dd989036716fd17ee7e5ec7", - "sha256:3b9909bc96b0edc6b01586e1eed05e71174ef4e04c71da5786370cebea53ad74" + "sha256:8c10c99a1b25d9a68058a1ad6f90381a62ba68230ca93966882a4dbc3bc9c33d", + "sha256:c10863aee750ad720f4f43436565e4c1698798d763b63234fb5021b6c616e423" ], - "version": "==0.13.0" + "version": "==0.14.0" }, "requests": { "hashes": [ - "sha256:43999036bfa82904b6af1d99e4882b560e5e2c68e5c4b0aa03b655f3d7d73fee", - "sha256:b3f43d496c6daba4493e7c431722aeb7dbc6288f52a6e04e7b6023b0247817e6" + "sha256:b3559a131db72c33ee969480840fff4bb6dd111de7dd27c8ee1f820f4f00231b", + "sha256:fe75cc94a9443b9246fc7049224f75604b113c36acb93f87b80ed42c44cbb898" ], "index": "pypi", - "version": "==2.23.0" + "version": "==2.24.0" }, "scout-apm": { "hashes": [ - "sha256:0c1610f4ab58fc79acfea6e63a5d6769779695f9075ce80c6c1da1042c3f2fae", - "sha256:1290caa22eb307e9061466305deaccd7c8b3b9054ee32c8e4338e395ab346ce9", - "sha256:17e3c5f28809ec460f8bba1c40413345a8604d772dad5839e8ada15da3db2e25", - "sha256:1b16d9f46f10b425cac742db26e8e2157c1bfc314c81f772e94c808b685a52da", - "sha256:28ff9a628368bc00f271c1c25f99c8b62b7b4c030f43a681a6a68612d6fd7434", - "sha256:554faa7c655d0c2c847a8601078b4e6787bb27addc6404bd0a83ef915580fbab", - "sha256:64f9f51c9f937030c84207e19485558c2df3ffbe9774ec06e14ae4e6ec18a2ea", - "sha256:6b02a3a0000ed2f584c69e26391372910b93a78b0b9b99beb74dc0e42e944b31", - "sha256:72addd7a1be4a5630eb703e68a85f6d11216dfb8da4642e68d05737dc8e53384", - "sha256:8d30961b1a317fd5a357046bc9e6fdb170cd052aea8fafaaf3180423ae2bc8fd", - "sha256:9e93deab879fdce257296fba427c36b4e2840c1fc529e640faa19d9fb8a26c30", - "sha256:ab7eb611fa833e82206cb8c23eaf46466b0f29982f708b0d23721e51b133b7d4", - "sha256:c27fab283f55a66f00aafb4d1974d77b4e5d0edbea5c7e70d51bd018aadae8da", - "sha256:cdea8a54a4a8000559fc8abc25c78bc3209eb5fec44eeef73652d22625117522", - "sha256:d28f9261852511b67235014631f99bef220eb94c72a4d5497bcc858b04e94728", - "sha256:dfa2c75f3ecaa512aa4dd56b8aa6c60a1ebd31f578fc825e7d4b5e4d182d0b40", - "sha256:e1daac680081af6653bbc6fdc16ad8fac0bbe8ead834c023df2e291887fbd307", - "sha256:ebd23100982c6c346d1213ffd45c190e99219a3fc5511d353631fa3d34bb121e", - "sha256:f9f7dee5dcd63b7e5e21b86b048ab10c95ce5c3512206d807b8ae47c59ca2d24" + "sha256:1b8d01ec9ee0e80617698b7fccbfcc12f207ec1287a325e2bcf520a784e8b582", + "sha256:292b37c1c855bb78bcd4322320d704a1c4ec88dd1deb8089c59af3ddc638167b", + "sha256:3209b0362212693daa95abc03d92e5c2dd4eae90f2d20d17cfe56e8d9f997d50", + "sha256:34044653f7239f81f4a4282709d32630e82ba6e8cd0d343951a7a1f98f9cb53d", + "sha256:3cb11a32a3f395649af44c6e9d71c0f961652a8b291f8ae3b8bd701bfc6baaaa", + "sha256:54bb9fc339b39f3320521b7b8e988315b9252afd2252065de88a36802f21421c", + "sha256:5db32c5c61e9c916d5284157c3161c464358907ace50f2122af59bc3a02f79e9", + "sha256:6a5b9ea2fb1414cb69ee06d4ede9bcfe6e45bddbffc9a5b8ae50f74c3861ee09", + "sha256:79bb227f4c9268b3441d7f5a2a86d3378c3877df8dab9bb833711bd38a818151", + "sha256:7b9125ee5ed4be19b20d2669d27d80a4fe1a4c461e9b0873f3e04c96889853e8", + "sha256:afae9c349642b8f86eb28722a1fcc24ea0c5d8c980b9ca9f253cfcc8976025a4", + "sha256:bac108329a806a1de4786f7f2eb43ae5646d20813429b76db31a41ae92670c31", + "sha256:bc6ed26a855ada1a32c15aba98518400954f0ce0920a5017a76f2431de8d9093", + "sha256:d1d2e1b0e51f3a337c3c953c4e7fc1fc1ae9d391010bd90a2a8bedd5e58d63d9", + "sha256:d77f2aeb7ba04c5c3e1687c1b29b1a7e17471c817490074e0e9319e43f409664", + "sha256:ebdf82c1048c705cc79181c270e5816e4ddebcad512e312e2c86fdea803904ef", + "sha256:f09c4046a199002296d932a903a693c67f8f76e483b29ad584e2649eea474426", + "sha256:f8108ea738e69ee5ab2ee0b025fb601a7308b8c8e586b9e1bfb44491a018085f", + "sha256:ff6879c247ff073fd75d3f621509262440105bb786cddd0935987a42e78db8b0" ], "index": "pypi", - "version": "==2.14.1" + "version": "==2.15.2" }, "sentry-sdk": { "hashes": [ - "sha256:23808d571d2461a4ce3784ec12bbee5bdb8c026c143fe79d36cef8a6d653e71f", - "sha256:bb90a4e19c7233a580715fc986cc44be2c48fc10b31e71580a2037e1c94b6950" + "sha256:2de15b13836fa3522815a933bd9c887c77f4868071043349f94f1b896c1bcfb8", + "sha256:38bb09d0277117f76507c8728d9a5156f09a47ac5175bb8072513859d19a593b" ], "index": "pypi", - "version": "==0.14.3" + "version": "==0.16.2" }, "six": { "hashes": [ - "sha256:236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a", - "sha256:8f3cd2e254d8f793e7f3d6d9df77b92252b52637291d0f0da013c76ea2724b6c" + "sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259", + "sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced" ], - "version": "==1.14.0" + "version": "==1.15.0" }, "starlette": { "hashes": [ - "sha256:6169ee78ded501095d1dda7b141a1dc9f9934d37ad23196e180150ace2c6449b", - "sha256:a9bb130fa7aa736eda8a814b6ceb85ccf7a209ed53843d0d61e246b380afa10f" + "sha256:bd2ffe5e37fb75d014728511f8e68ebf2c80b0fa3d04ca1479f4dc752ae31ac9", + "sha256:ebe8ee08d9be96a3c9f31b2cb2a24dbdf845247b745664bd8a3f9bd0c977fdbc" + ], + "version": "==0.13.6" + }, + "typing-extensions": { + "hashes": [ + "sha256:6e95524d8a547a91e08f404ae485bbb71962de46967e1b71a0cb89af24e761c5", + "sha256:79ee589a3caca649a9bfd2a8de4709837400dfa00b6cc81962a1e6a1815969ae", + "sha256:f8d2bd89d25bc39dabe7d23df520442fa1d8969b82544370e03d88b5a591c392" ], - "version": "==0.13.2" + "version": "==3.7.4.2" }, "urllib3": { "extras": [ "secure" ], "hashes": [ - "sha256:3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527", - "sha256:88206b0eb87e6d677d424843ac5209e3fb9d0190d0ee169599165ec25e9d9115" + "sha256:91056c15fa70756691db97756772bb1eb9678fa585d9184f24534b100dc60f4a", + "sha256:e7983572181f5e1522d9c98453462384ee92a0be7fac5f1413a1e35c56cc0461" ], "markers": "python_version >= '3.5'", - "version": "==1.25.9" + "version": "==1.25.10" }, "uvicorn": { "hashes": [ - "sha256:50577d599775dac2301bac8bd5b540d19a9560144143c5bdab13cba92783b6e7", - "sha256:596eaa8645b6dbc24d6610e335f8ddf5f925b4c4b86fdc7146abb0bf0da65d17" + "sha256:1d46a22cc55a52f5567e0c66f000ae56f26263e44cef59b7c885bf10f487ce6e", + "sha256:b50f7f4c0c499c9b8d0280924cfbd24b90ba02456e3dc80934b9a786a291f09f" ], "index": "pypi", - "version": "==0.11.5" + "version": "==0.11.7" }, "uvloop": { "hashes": [ @@ -502,41 +516,41 @@ }, "yarl": { "hashes": [ - "sha256:0c2ab325d33f1b824734b3ef51d4d54a54e0e7a23d13b86974507602334c2cce", - "sha256:0ca2f395591bbd85ddd50a82eb1fde9c1066fafe888c5c7cc1d810cf03fd3cc6", - "sha256:2098a4b4b9d75ee352807a95cdf5f10180db903bc5b7270715c6bbe2551f64ce", - "sha256:25e66e5e2007c7a39541ca13b559cd8ebc2ad8fe00ea94a2aad28a9b1e44e5ae", - "sha256:26d7c90cb04dee1665282a5d1a998defc1a9e012fdca0f33396f81508f49696d", - "sha256:308b98b0c8cd1dfef1a0311dc5e38ae8f9b58349226aa0533f15a16717ad702f", - "sha256:3ce3d4f7c6b69c4e4f0704b32eca8123b9c58ae91af740481aa57d7857b5e41b", - "sha256:58cd9c469eced558cd81aa3f484b2924e8897049e06889e8ff2510435b7ef74b", - "sha256:5b10eb0e7f044cf0b035112446b26a3a2946bca9d7d7edb5e54a2ad2f6652abb", - "sha256:6faa19d3824c21bcbfdfce5171e193c8b4ddafdf0ac3f129ccf0cdfcb083e462", - "sha256:944494be42fa630134bf907714d40207e646fd5a94423c90d5b514f7b0713fea", - "sha256:a161de7e50224e8e3de6e184707476b5a989037dcb24292b391a3d66ff158e70", - "sha256:a4844ebb2be14768f7994f2017f70aca39d658a96c786211be5ddbe1c68794c1", - "sha256:c2b509ac3d4b988ae8769901c66345425e361d518aecbe4acbfc2567e416626a", - "sha256:c9959d49a77b0e07559e579f38b2f3711c2b8716b8410b320bf9713013215a1b", - "sha256:d8cdee92bc930d8b09d8bd2043cedd544d9c8bd7436a77678dd602467a993080", - "sha256:e15199cdb423316e15f108f51249e44eb156ae5dba232cb73be555324a1d49c2" - ], - "version": "==1.4.2" + "sha256:1707230e1ea48ea06a3e20acb4ce05a38d2465bd9566c21f48f6212a88e47536", + "sha256:1f269e8e6676193a94635399a77c9059e1826fb6265c9204c9e5a8ccd36006e1", + "sha256:2657716c1fc998f5f2675c0ee6ce91282e0da0ea9e4a94b584bb1917e11c1559", + "sha256:431faa6858f0ea323714d8b7b4a7da1db2eeb9403607f0eaa3800ab2c5a4b627", + "sha256:5bbcb195da7de57f4508b7508c33f7593e9516e27732d08b9aad8586c7b8c384", + "sha256:5c82f5b1499342339f22c83b97dbe2b8a09e47163fab86cd934a8dd46620e0fb", + "sha256:5d410f69b4f92c5e1e2a8ffb73337cd8a274388c6975091735795588a538e605", + "sha256:66b4f345e9573e004b1af184bc00431145cf5e089a4dcc1351505c1f5750192c", + "sha256:875b2a741ce0208f3b818008a859ab5d0f461e98a32bbdc6af82231a9e761c55", + "sha256:9a3266b047d15e78bba38c8455bf68b391c040231ca5965ef867f7cbbc60bde5", + "sha256:9a592c4aa642249e9bdaf76897d90feeb08118626b363a6be8788a9b300274b5", + "sha256:a1772068401d425e803999dada29a6babf041786e08be5e79ef63c9ecc4c9575", + "sha256:b065a5c3e050395ae563019253cc6c769a50fd82d7fa92d07476273521d56b7c", + "sha256:b325fefd574ebef50e391a1072d1712a60348ca29c183e1d546c9d87fec2cd32", + "sha256:cf5eb664910d759bbae0b76d060d6e21f8af5098242d66c448bbebaf2a7bfa70", + "sha256:f058b6541477022c7b54db37229f87dacf3b565de4f901ff5a0a78556a174fea", + "sha256:f5cfed0766837303f688196aa7002730d62c5cc802d98c6395ea1feb87252727" + ], + "version": "==1.5.0" } }, "develop": { "appdirs": { "hashes": [ - "sha256:9e5896d1372858f8dd3344faf4e5014d21849c756c8d5701f78f8a103b372d92", - "sha256:d8b24664561d0d34ddfaec54636d502d7cea6e29c3eaf68f3df6180863e2166e" + "sha256:7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41", + "sha256:a841dacd6b99318a741b166adb07e19ee71a274450e68237b4650ca1055ab128" ], - "version": "==1.4.3" + "version": "==1.4.4" }, "astroid": { "hashes": [ - "sha256:4c17cea3e592c21b6e222f673868961bad77e1f985cb1694ed077475a89229c1", - "sha256:d8506842a3faf734b81599c8b98dcc423de863adcc1999248480b18bd31a0f38" + "sha256:2f4078c2a41bf377eea06d71c9d2ba4eb8f6b1af2135bec27bbbb7d8f12bb703", + "sha256:bc58d83eb610252fd8de6363e39d4f1d0619c894b0ed24603b881c02e64c7386" ], - "version": "==2.4.1" + "version": "==2.4.2" }, "async-asgi-testclient": { "hashes": [ @@ -586,10 +600,10 @@ }, "certifi": { "hashes": [ - "sha256:1d987a998c75633c40847cc966fcf5904906c920a7f17ef374f5aa4282abd304", - "sha256:51fcb31174be6e6664c5f69e3e1691a2d72a1a12e90f872cbdb1567eb47b6519" + "sha256:5930595817496dd21bb8dc35dad090f1c2cd0adfaf21204bf6732ca5d8ee34d3", + "sha256:8fc0819f1f30ba15bdb34cceffb9ef04d99f420f68eb75d901e9560b8749fc41" ], - "version": "==2020.4.5.1" + "version": "==2020.6.20" }, "chardet": { "hashes": [ @@ -607,47 +621,50 @@ }, "coverage": { "hashes": [ - "sha256:00f1d23f4336efc3b311ed0d807feb45098fc86dee1ca13b3d6768cdab187c8a", - "sha256:01333e1bd22c59713ba8a79f088b3955946e293114479bbfc2e37d522be03355", - "sha256:0cb4be7e784dcdc050fc58ef05b71aa8e89b7e6636b99967fadbdba694cf2b65", - "sha256:0e61d9803d5851849c24f78227939c701ced6704f337cad0a91e0972c51c1ee7", - "sha256:1601e480b9b99697a570cea7ef749e88123c04b92d84cedaa01e117436b4a0a9", - "sha256:2742c7515b9eb368718cd091bad1a1b44135cc72468c731302b3d641895b83d1", - "sha256:2d27a3f742c98e5c6b461ee6ef7287400a1956c11421eb574d843d9ec1f772f0", - "sha256:402e1744733df483b93abbf209283898e9f0d67470707e3c7516d84f48524f55", - "sha256:5c542d1e62eece33c306d66fe0a5c4f7f7b3c08fecc46ead86d7916684b36d6c", - "sha256:5f2294dbf7875b991c381e3d5af2bcc3494d836affa52b809c91697449d0eda6", - "sha256:6402bd2fdedabbdb63a316308142597534ea8e1895f4e7d8bf7476c5e8751fef", - "sha256:66460ab1599d3cf894bb6baee8c684788819b71a5dc1e8fa2ecc152e5d752019", - "sha256:782caea581a6e9ff75eccda79287daefd1d2631cc09d642b6ee2d6da21fc0a4e", - "sha256:79a3cfd6346ce6c13145731d39db47b7a7b859c0272f02cdb89a3bdcbae233a0", - "sha256:7a5bdad4edec57b5fb8dae7d3ee58622d626fd3a0be0dfceda162a7035885ecf", - "sha256:8fa0cbc7ecad630e5b0f4f35b0f6ad419246b02bc750de7ac66db92667996d24", - "sha256:a027ef0492ede1e03a8054e3c37b8def89a1e3c471482e9f046906ba4f2aafd2", - "sha256:a3f3654d5734a3ece152636aad89f58afc9213c6520062db3978239db122f03c", - "sha256:a82b92b04a23d3c8a581fc049228bafde988abacba397d57ce95fe95e0338ab4", - "sha256:acf3763ed01af8410fc36afea23707d4ea58ba7e86a8ee915dfb9ceff9ef69d0", - "sha256:adeb4c5b608574a3d647011af36f7586811a2c1197c861aedb548dd2453b41cd", - "sha256:b83835506dfc185a319031cf853fa4bb1b3974b1f913f5bb1a0f3d98bdcded04", - "sha256:bb28a7245de68bf29f6fb199545d072d1036a1917dca17a1e75bbb919e14ee8e", - "sha256:bf9cb9a9fd8891e7efd2d44deb24b86d647394b9705b744ff6f8261e6f29a730", - "sha256:c317eaf5ff46a34305b202e73404f55f7389ef834b8dbf4da09b9b9b37f76dd2", - "sha256:dbe8c6ae7534b5b024296464f387d57c13caa942f6d8e6e0346f27e509f0f768", - "sha256:de807ae933cfb7f0c7d9d981a053772452217df2bf38e7e6267c9cbf9545a796", - "sha256:dead2ddede4c7ba6cb3a721870f5141c97dc7d85a079edb4bd8d88c3ad5b20c7", - "sha256:dec5202bfe6f672d4511086e125db035a52b00f1648d6407cc8e526912c0353a", - "sha256:e1ea316102ea1e1770724db01998d1603ed921c54a86a2efcb03428d5417e489", - "sha256:f90bfc4ad18450c80b024036eaf91e4a246ae287701aaa88eaebebf150868052" - ], - "version": "==5.1" + "sha256:098a703d913be6fbd146a8c50cc76513d726b022d170e5e98dc56d958fd592fb", + "sha256:16042dc7f8e632e0dcd5206a5095ebd18cb1d005f4c89694f7f8aafd96dd43a3", + "sha256:1adb6be0dcef0cf9434619d3b892772fdb48e793300f9d762e480e043bd8e716", + "sha256:27ca5a2bc04d68f0776f2cdcb8bbd508bbe430a7bf9c02315cd05fb1d86d0034", + "sha256:28f42dc5172ebdc32622a2c3f7ead1b836cdbf253569ae5673f499e35db0bac3", + "sha256:2fcc8b58953d74d199a1a4d633df8146f0ac36c4e720b4a1997e9b6327af43a8", + "sha256:304fbe451698373dc6653772c72c5d5e883a4aadaf20343592a7abb2e643dae0", + "sha256:30bc103587e0d3df9e52cd9da1dd915265a22fad0b72afe54daf840c984b564f", + "sha256:40f70f81be4d34f8d491e55936904db5c527b0711b2a46513641a5729783c2e4", + "sha256:4186fc95c9febeab5681bc3248553d5ec8c2999b8424d4fc3a39c9cba5796962", + "sha256:46794c815e56f1431c66d81943fa90721bb858375fb36e5903697d5eef88627d", + "sha256:4869ab1c1ed33953bb2433ce7b894a28d724b7aa76c19b11e2878034a4e4680b", + "sha256:4f6428b55d2916a69f8d6453e48a505c07b2245653b0aa9f0dee38785939f5e4", + "sha256:52f185ffd3291196dc1aae506b42e178a592b0b60a8610b108e6ad892cfc1bb3", + "sha256:538f2fd5eb64366f37c97fdb3077d665fa946d2b6d95447622292f38407f9258", + "sha256:64c4f340338c68c463f1b56e3f2f0423f7b17ba6c3febae80b81f0e093077f59", + "sha256:675192fca634f0df69af3493a48224f211f8db4e84452b08d5fcebb9167adb01", + "sha256:700997b77cfab016533b3e7dbc03b71d33ee4df1d79f2463a318ca0263fc29dd", + "sha256:8505e614c983834239f865da2dd336dcf9d72776b951d5dfa5ac36b987726e1b", + "sha256:962c44070c281d86398aeb8f64e1bf37816a4dfc6f4c0f114756b14fc575621d", + "sha256:9e536783a5acee79a9b308be97d3952b662748c4037b6a24cbb339dc7ed8eb89", + "sha256:9ea749fd447ce7fb1ac71f7616371f04054d969d412d37611716721931e36efd", + "sha256:a34cb28e0747ea15e82d13e14de606747e9e484fb28d63c999483f5d5188e89b", + "sha256:a3ee9c793ffefe2944d3a2bd928a0e436cd0ac2d9e3723152d6fd5398838ce7d", + "sha256:aab75d99f3f2874733946a7648ce87a50019eb90baef931698f96b76b6769a46", + "sha256:b1ed2bdb27b4c9fc87058a1cb751c4df8752002143ed393899edb82b131e0546", + "sha256:b360d8fd88d2bad01cb953d81fd2edd4be539df7bfec41e8753fe9f4456a5082", + "sha256:b8f58c7db64d8f27078cbf2a4391af6aa4e4767cc08b37555c4ae064b8558d9b", + "sha256:c1bbb628ed5192124889b51204de27c575b3ffc05a5a91307e7640eff1d48da4", + "sha256:c2ff24df02a125b7b346c4c9078c8936da06964cc2d276292c357d64378158f8", + "sha256:c890728a93fffd0407d7d37c1e6083ff3f9f211c83b4316fae3778417eab9811", + "sha256:c96472b8ca5dc135fb0aa62f79b033f02aa434fb03a8b190600a5ae4102df1fd", + "sha256:ce7866f29d3025b5b34c2e944e66ebef0d92e4a4f2463f7266daa03a1332a651", + "sha256:e26c993bd4b220429d4ec8c1468eca445a4064a61c74ca08da7429af9bc53bb0" + ], + "version": "==5.2.1" }, "coveralls": { "hashes": [ - "sha256:41bd57b60321dfd5b56e990ab3f7ed876090691c21a9e3b005e1f6e42e6ba4b9", - "sha256:d213f5edd49053d03f0db316ccabfe17725f2758147afc9a37eaca9d8e8602b5" + "sha256:3726d35c0f93a28631a003880e2aa6cc93c401d62bc6919c5cb497217ba30c55", + "sha256:afe359cd5b350e1b3895372bda32af8f0260638c7c4a31a5c0f15aa6a96f40d9" ], "index": "pypi", - "version": "==2.0.0" + "version": "==2.1.1" }, "docopt": { "hashes": [ @@ -664,26 +681,26 @@ }, "gitpython": { "hashes": [ - "sha256:864a47472548f3ba716ca202e034c1900f197c0fb3a08f641c20c3cafd15ed94", - "sha256:da3b2cf819974789da34f95ac218ef99f515a928685db141327c09b73dd69c09" + "sha256:2db287d71a284e22e5c2846042d0602465c7434d910406990d5b74df4afb0858", + "sha256:fa3b92da728a457dd75d62bb5f3eb2816d99a7fe6c67398e260637a40e3fafb5" ], - "version": "==3.1.2" + "version": "==3.1.7" }, "idna": { "hashes": [ - "sha256:7588d1c14ae4c77d74036e8c22ff447b26d0fde8f007354fd48a7814db15b7cb", - "sha256:a068a21ceac8a4d63dbfd964670474107f541babbd2250d61922f029858365fa" + "sha256:b307872f855b18632ce0c21c5e45be78c0ea7ae4c15c828c20788b26921eb3f6", + "sha256:b97d804b1e9b523befed77c48dacec60e6dcb0b5391d57af6a65a312a90648c0" ], - "version": "==2.9" + "version": "==2.10" }, "importlib-metadata": { "hashes": [ - "sha256:2a688cbaa90e0cc587f1df48bdc97a6eadccdcd9c35fb3f976a09e3b5016d90f", - "sha256:34513a8a0c4962bc66d35b359558fd8a5e10cd472d37aec5f66858addef32c1e" + "sha256:90bb658cdbbf6d1735b6341ce708fc7024a3e14e99ffdc5783edea9f9b077f83", + "sha256:dc15b2969b4ce36305c51eebe62d418ac7791e9a157911d58bfb1f9ccd8e2070" ], "index": "pypi", "markers": "python_version < '3.8'", - "version": "==1.6.0" + "version": "==1.7.0" }, "invoke": { "hashes": [ @@ -744,39 +761,39 @@ }, "more-itertools": { "hashes": [ - "sha256:5dd8bcf33e5f9513ffa06d5ad33d78f31e1931ac9a18f33d37e77a180d393a7c", - "sha256:b1ddb932186d8a6ac451e1d95844b382f55e12686d51ca0c68b6f61f2ab7a507" + "sha256:68c70cc7167bdf5c7c9d8f6954a7837089c6a36bf565383919bb595efb8a17e5", + "sha256:b78134b2063dd214000685165d81c154522c3ee0a1c0d4d113c80361c234c5a2" ], - "version": "==8.2.0" + "version": "==8.4.0" }, "multidict": { "hashes": [ - "sha256:317f96bc0950d249e96d8d29ab556d01dd38888fbe68324f46fd834b430169f1", - "sha256:42f56542166040b4474c0c608ed051732033cd821126493cf25b6c276df7dd35", - "sha256:4b7df040fb5fe826d689204f9b544af469593fb3ff3a069a6ad3409f742f5928", - "sha256:544fae9261232a97102e27a926019100a9db75bec7b37feedd74b3aa82f29969", - "sha256:620b37c3fea181dab09267cd5a84b0f23fa043beb8bc50d8474dd9694de1fa6e", - "sha256:6e6fef114741c4d7ca46da8449038ec8b1e880bbe68674c01ceeb1ac8a648e78", - "sha256:7774e9f6c9af3f12f296131453f7b81dabb7ebdb948483362f5afcaac8a826f1", - "sha256:85cb26c38c96f76b7ff38b86c9d560dea10cf3459bb5f4caf72fc1bb932c7136", - "sha256:a326f4240123a2ac66bb163eeba99578e9d63a8654a59f4688a79198f9aa10f8", - "sha256:ae402f43604e3b2bc41e8ea8b8526c7fa7139ed76b0d64fc48e28125925275b2", - "sha256:aee283c49601fa4c13adc64c09c978838a7e812f85377ae130a24d7198c0331e", - "sha256:b51249fdd2923739cd3efc95a3d6c363b67bbf779208e9f37fd5e68540d1a4d4", - "sha256:bb519becc46275c594410c6c28a8a0adc66fe24fef154a9addea54c1adb006f5", - "sha256:c2c37185fb0af79d5c117b8d2764f4321eeb12ba8c141a95d0aa8c2c1d0a11dd", - "sha256:dc561313279f9d05a3d0ffa89cd15ae477528ea37aa9795c4654588a3287a9ab", - "sha256:e439c9a10a95cb32abd708bb8be83b2134fa93790a4fb0535ca36db3dda94d20", - "sha256:fc3b4adc2ee8474cb3cd2a155305d5f8eda0a9c91320f83e55748e1fcb68f8e3" - ], - "version": "==4.7.5" + "sha256:1ece5a3369835c20ed57adadc663400b5525904e53bae59ec854a5d36b39b21a", + "sha256:275ca32383bc5d1894b6975bb4ca6a7ff16ab76fa622967625baeebcf8079000", + "sha256:3750f2205b800aac4bb03b5ae48025a64e474d2c6cc79547988ba1d4122a09e2", + "sha256:4538273208e7294b2659b1602490f4ed3ab1c8cf9dbdd817e0e9db8e64be2507", + "sha256:5141c13374e6b25fe6bf092052ab55c0c03d21bd66c94a0e3ae371d3e4d865a5", + "sha256:51a4d210404ac61d32dada00a50ea7ba412e6ea945bbe992e4d7a595276d2ec7", + "sha256:5cf311a0f5ef80fe73e4f4c0f0998ec08f954a6ec72b746f3c179e37de1d210d", + "sha256:6513728873f4326999429a8b00fc7ceddb2509b01d5fd3f3be7881a257b8d463", + "sha256:7388d2ef3c55a8ba80da62ecfafa06a1c097c18032a501ffd4cabbc52d7f2b19", + "sha256:9456e90649005ad40558f4cf51dbb842e32807df75146c6d940b6f5abb4a78f3", + "sha256:c026fe9a05130e44157b98fea3ab12969e5b60691a276150db9eda71710cd10b", + "sha256:d14842362ed4cf63751648e7672f7174c9818459d169231d03c56e84daf90b7c", + "sha256:e0d072ae0f2a179c375f67e3da300b47e1a83293c554450b29c900e50afaae87", + "sha256:f07acae137b71af3bb548bd8da720956a3bc9f9a0b87733e0899226a2317aeb7", + "sha256:fbb77a75e529021e7c4a8d4e823d88ef4d23674a202be4f5addffc72cbb91430", + "sha256:fcfbb44c59af3f8ea984de67ec7c306f618a3ec771c2843804069917a8f2e255", + "sha256:feed85993dbdb1dbc29102f50bca65bdc68f2c0c8d352468c25b54874f23c39d" + ], + "version": "==4.7.6" }, "packaging": { "hashes": [ - "sha256:3c292b474fda1671ec57d46d739d072bfd495a4f51ad01a055121d81e952b7a3", - "sha256:82f77b9bee21c1bafbf35a84905d604d5d1223801d639cf3ed140bd651c08752" + "sha256:4357f74f47b9c12db93624a82154e9b120fa8293699949152b22065d556079f8", + "sha256:998416ba6962ae7fbd6596850b80e17859a5753ba17c32284f67bfff33784181" ], - "version": "==20.3" + "version": "==20.4" }, "pathspec": { "hashes": [ @@ -801,18 +818,18 @@ }, "py": { "hashes": [ - "sha256:5e27081401262157467ad6e7f851b7aa402c5852dbcb3dae06768434de5752aa", - "sha256:c20fdd83a5dbc0af9efd622bee9a5564e278f6380fffcacc43ba6f43db2813b0" + "sha256:366389d1db726cd2fcfc79732e75410e5fe4d31db13692115529d34069a043c2", + "sha256:9ca6883ce56b4e8da7e79ac18787889fa5206c79dcc67fb065376cd2fe03f342" ], - "version": "==1.8.1" + "version": "==1.9.0" }, "pylint": { "hashes": [ - "sha256:b95e31850f3af163c2283ed40432f053acbc8fc6eba6a069cb518d9dbf71848c", - "sha256:dd506acce0427e9e08fb87274bcaa953d38b50a58207170dbf5b36cf3e16957b" + "sha256:7dd78437f2d8d019717dbf287772d0b2dbdfd13fc016aa7faa08d67bccc46adc", + "sha256:d0ece7d223fe422088b0e8f13fa0a1e8eb745ebffcb8ed53d3e95394b6101a1c" ], "index": "pypi", - "version": "==2.5.2" + "version": "==2.5.3" }, "pyparsing": { "hashes": [ @@ -823,26 +840,27 @@ }, "pytest": { "hashes": [ - "sha256:95c710d0a72d91c13fae35dce195633c929c3792f54125919847fdcdf7caa0d3", - "sha256:eb2b5e935f6a019317e455b6da83dd8650ac9ffd2ee73a7b657a30873d67a698" + "sha256:5c0db86b698e8f170ba4582a492248919255fcd4c79b1ee64ace34301fb589a1", + "sha256:7979331bfcba207414f5e1263b5a0f8f521d0f457318836a7355531ed1a4c7d8" ], "index": "pypi", - "version": "==5.4.2" + "version": "==5.4.3" }, "pytest-asyncio": { "hashes": [ - "sha256:475bd2f3dc0bc11d2463656b3cbaafdbec5a47b47508ea0b329ee693040eebd2" + "sha256:2eae1e34f6c68fc0a9dc12d4bea190483843ff4708d24277c41568d6b6044f1d", + "sha256:9882c0c6b24429449f5f969a5158b528f39bde47dc32e85b9f0403965017e700" ], "index": "pypi", - "version": "==0.12.0" + "version": "==0.14.0" }, "pytest-cov": { "hashes": [ - "sha256:cc6742d8bac45070217169f5f72ceee1e0e55b0221f54bcf24845972d3a47f2b", - "sha256:cdbdef4f870408ebdbfeb44e63e07eb18bb4619fae852f6e760645fa36172626" + "sha256:1a629dc9f48e53512fcbfda6b07de490c374b0c83c55ff7a1720b3fccff0ac87", + "sha256:6e6d18092dce6fad667cd7020deed816f858ad3b49d5b5e2b1cc1c97a4dba65c" ], "index": "pypi", - "version": "==2.8.1" + "version": "==2.10.0" }, "pyyaml": { "hashes": [ @@ -862,52 +880,52 @@ }, "regex": { "hashes": [ - "sha256:021a0ae4d2baeeb60a3014805a2096cb329bd6d9f30669b7ad0da51a9cb73349", - "sha256:04d6e948ef34d3eac133bedc0098364a9e635a7914f050edb61272d2ddae3608", - "sha256:099568b372bda492be09c4f291b398475587d49937c659824f891182df728cdf", - "sha256:0ff50843535593ee93acab662663cb2f52af8e31c3f525f630f1dc6156247938", - "sha256:1b17bf37c2aefc4cac8436971fe6ee52542ae4225cfc7762017f7e97a63ca998", - "sha256:1e2255ae938a36e9bd7db3b93618796d90c07e5f64dd6a6750c55f51f8b76918", - "sha256:2bc6a17a7fa8afd33c02d51b6f417fc271538990297167f68a98cae1c9e5c945", - "sha256:3ab5e41c4ed7cd4fa426c50add2892eb0f04ae4e73162155cd668257d02259dd", - "sha256:3b059e2476b327b9794c792c855aa05531a3f3044737e455d283c7539bd7534d", - "sha256:4df91094ced6f53e71f695c909d9bad1cca8761d96fd9f23db12245b5521136e", - "sha256:5493a02c1882d2acaaf17be81a3b65408ff541c922bfd002535c5f148aa29f74", - "sha256:5b741ecc3ad3e463d2ba32dce512b412c319993c1bb3d999be49e6092a769fb2", - "sha256:652ab4836cd5531d64a34403c00ada4077bb91112e8bcdae933e2eae232cf4a8", - "sha256:669a8d46764a09f198f2e91fc0d5acdac8e6b620376757a04682846ae28879c4", - "sha256:73a10404867b835f1b8a64253e4621908f0d71150eb4e97ab2e7e441b53e9451", - "sha256:7ce4a213a96d6c25eeae2f7d60d4dad89ac2b8134ec3e69db9bc522e2c0f9388", - "sha256:8127ca2bf9539d6a64d03686fd9e789e8c194fc19af49b69b081f8c7e6ecb1bc", - "sha256:b5b5b2e95f761a88d4c93691716ce01dc55f288a153face1654f868a8034f494", - "sha256:b7c9f65524ff06bf70c945cd8d8d1fd90853e27ccf86026af2afb4d9a63d06b1", - "sha256:f7f2f4226db6acd1da228adf433c5c3792858474e49d80668ea82ac87cf74a03", - "sha256:fa09da4af4e5b15c0e8b4986a083f3fd159302ea115a6cc0649cd163435538b8" - ], - "version": "==2020.5.7" + "sha256:0dc64ee3f33cd7899f79a8d788abfbec168410be356ed9bd30bbd3f0a23a7204", + "sha256:1269fef3167bb52631ad4fa7dd27bf635d5a0790b8e6222065d42e91bede4162", + "sha256:14a53646369157baa0499513f96091eb70382eb50b2c82393d17d7ec81b7b85f", + "sha256:3a3af27a8d23143c49a3420efe5b3f8cf1a48c6fc8bc6856b03f638abc1833bb", + "sha256:46bac5ca10fb748d6c55843a931855e2727a7a22584f302dd9bb1506e69f83f6", + "sha256:4c037fd14c5f4e308b8370b447b469ca10e69427966527edcab07f52d88388f7", + "sha256:51178c738d559a2d1071ce0b0f56e57eb315bcf8f7d4cf127674b533e3101f88", + "sha256:5ea81ea3dbd6767873c611687141ec7b06ed8bab43f68fad5b7be184a920dc99", + "sha256:6961548bba529cac7c07af2fd4d527c5b91bb8fe18995fed6044ac22b3d14644", + "sha256:75aaa27aa521a182824d89e5ab0a1d16ca207318a6b65042b046053cfc8ed07a", + "sha256:7a2dd66d2d4df34fa82c9dc85657c5e019b87932019947faece7983f2089a840", + "sha256:8a51f2c6d1f884e98846a0a9021ff6861bdb98457879f412fdc2b42d14494067", + "sha256:9c568495e35599625f7b999774e29e8d6b01a6fb684d77dee1f56d41b11b40cd", + "sha256:9eddaafb3c48e0900690c1727fba226c4804b8e6127ea409689c3bb492d06de4", + "sha256:bbb332d45b32df41200380fff14712cb6093b61bd142272a10b16778c418e98e", + "sha256:bc3d98f621898b4a9bc7fecc00513eec8f40b5b83913d74ccb445f037d58cd89", + "sha256:c11d6033115dc4887c456565303f540c44197f4fc1a2bfb192224a301534888e", + "sha256:c50a724d136ec10d920661f1442e4a8b010a4fe5aebd65e0c2241ea41dbe93dc", + "sha256:d0a5095d52b90ff38592bbdc2644f17c6d495762edf47d876049cfd2968fbccf", + "sha256:d6cff2276e502b86a25fd10c2a96973fdb45c7a977dca2138d661417f3728341", + "sha256:e46d13f38cfcbb79bfdb2964b0fe12561fe633caf964a77a5f8d4e45fe5d2ef7" + ], + "version": "==2020.7.14" }, "requests": { "hashes": [ - "sha256:43999036bfa82904b6af1d99e4882b560e5e2c68e5c4b0aa03b655f3d7d73fee", - "sha256:b3f43d496c6daba4493e7c431722aeb7dbc6288f52a6e04e7b6023b0247817e6" + "sha256:b3559a131db72c33ee969480840fff4bb6dd111de7dd27c8ee1f820f4f00231b", + "sha256:fe75cc94a9443b9246fc7049224f75604b113c36acb93f87b80ed42c44cbb898" ], "index": "pypi", - "version": "==2.23.0" + "version": "==2.24.0" }, "responses": { "hashes": [ - "sha256:1a78bc010b20a5022a2c0cb76b8ee6dc1e34d887972615ebd725ab9a166a4960", - "sha256:3d596d0be06151330cb230a2d630717ab20f7a81f205019481e206eb5db79915" + "sha256:7bb697a5fedeb41d81e8b87f152d453d5cab42dcd1691b6a7d6097e94d33f373", + "sha256:af94d28cdfb48ded0ad82a5216616631543650f440334a693479b8991a6594a2" ], "index": "pypi", - "version": "==0.10.14" + "version": "==0.10.15" }, "six": { "hashes": [ - "sha256:236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a", - "sha256:8f3cd2e254d8f793e7f3d6d9df77b92252b52637291d0f0da013c76ea2724b6c" + "sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259", + "sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced" ], - "version": "==1.14.0" + "version": "==1.15.0" }, "smmap": { "hashes": [ @@ -918,17 +936,17 @@ }, "stevedore": { "hashes": [ - "sha256:18afaf1d623af5950cc0f7e75e70f917784c73b652a34a12d90b309451b5500b", - "sha256:a4e7dc759fb0f2e3e2f7d8ffe2358c19d45b9b8297f393ef1256858d82f69c9b" + "sha256:38791aa5bed922b0a844513c5f9ed37774b68edc609e5ab8ab8d8fe0ce4315e5", + "sha256:c8f4f0ebbc394e52ddf49de8bcc3cf8ad2b4425ebac494106bbc5e3661ac7633" ], - "version": "==1.32.0" + "version": "==3.2.0" }, "toml": { "hashes": [ - "sha256:229f81c57791a41d65e399fc06bf0848bab550a9dfd5ed66df18ce5f05e73d5c", - "sha256:235682dd292d5899d361a811df37e04a8828a5b1da3115886b73cf81ebc9100e" + "sha256:926b612be1e5ce0634a2ca03470f95169cf16f939018233a670519cb4ac58b0f", + "sha256:bda89d5935c2eac546d648028b9901107a595863cb36bae0c73ac804a9b4ce88" ], - "version": "==0.10.0" + "version": "==0.10.1" }, "typed-ast": { "hashes": [ @@ -961,18 +979,18 @@ "secure" ], "hashes": [ - "sha256:3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527", - "sha256:88206b0eb87e6d677d424843ac5209e3fb9d0190d0ee169599165ec25e9d9115" + "sha256:91056c15fa70756691db97756772bb1eb9678fa585d9184f24534b100dc60f4a", + "sha256:e7983572181f5e1522d9c98453462384ee92a0be7fac5f1413a1e35c56cc0461" ], "markers": "python_version >= '3.5'", - "version": "==1.25.9" + "version": "==1.25.10" }, "wcwidth": { "hashes": [ - "sha256:cafe2186b3c009a04067022ce1dcd79cb38d8d65ee4f4791b8888d6599d1bbe1", - "sha256:ee73862862a156bf77ff92b09034fc4825dd3af9cf81bc5b360668d425f3c5f1" + "sha256:beb4802a9cebb9144e99086eff703a642a13d6a0052920003a230f3294bbe784", + "sha256:c4d647b99872929fdb7bdcaa4fbe7f01413ed3d98077df798530e5b04f116c83" ], - "version": "==0.1.9" + "version": "==0.2.5" }, "wrapt": { "hashes": [ diff --git a/requirements-dev.txt b/requirements-dev.txt index d95c199e..84619bec 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,49 +1,49 @@ -i https://pypi.org/simple -appdirs==1.4.3 -astroid==2.4.1 +appdirs==1.4.4 +astroid==2.4.2 async-asgi-testclient==1.4.4 async-generator==1.10 asyncmock==0.4.2 attrs==19.3.0 bandit==1.6.2 black==19.10b0 -certifi==2020.4.5.1 +certifi==2020.6.20 chardet==3.0.4 click==7.1.2 -coverage==5.1 -coveralls==2.0.0 +coverage==5.2.1 +coveralls==2.1.1 docopt==0.6.2 gitdb==4.0.5 -gitpython==3.1.2 -idna==2.9 -importlib-metadata==1.6.0 ; python_version < '3.8' +gitpython==3.1.7 +idna==2.10 +importlib-metadata==1.7.0 ; python_version < '3.8' invoke==1.4.1 isort==4.3.21 lazy-object-proxy==1.4.3 mccabe==0.6.1 mock==4.0.2 -more-itertools==8.2.0 -multidict==4.7.5 -packaging==20.3 +more-itertools==8.4.0 +multidict==4.7.6 +packaging==20.4 pathspec==0.8.0 pbr==5.4.5 pluggy==0.13.1 -py==1.8.1 -pylint==2.5.2 +py==1.9.0 +pylint==2.5.3 pyparsing==2.4.7 -pytest-asyncio==0.12.0 -pytest-cov==2.8.1 -pytest==5.4.2 +pytest-asyncio==0.14.0 +pytest-cov==2.10.0 +pytest==5.4.3 pyyaml==5.3.1 -regex==2020.5.7 -requests==2.23.0 -responses==0.10.14 -six==1.14.0 +regex==2020.7.14 +requests==2.24.0 +responses==0.10.15 +six==1.15.0 smmap==3.0.4 -stevedore==1.32.0 -toml==0.10.0 +stevedore==3.2.0 +toml==0.10.1 typed-ast==1.4.1 -urllib3[secure]==1.25.9 ; python_version >= '3.5' -wcwidth==0.1.9 +urllib3[secure]==1.25.10 ; python_version >= '3.5' +wcwidth==0.2.5 wrapt==1.12.1 zipp==3.1.0 diff --git a/requirements.txt b/requirements.txt index 02ab222e..415ef5d7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,39 +3,40 @@ aiocache[redis]==0.11.1 aiofiles==0.5.0 aiohttp==3.6.2 aioredis==1.3.1 -asgiref==3.2.7 ; python_version >= '3.5' +asgiref==3.2.10 ; python_version >= '3.5' async-timeout==3.0.1 asyncache==0.1.1 attrs==19.3.0 -cachetools==4.1.0 -certifi==2020.4.5.1 -cffi==1.14.0 +cachetools==4.1.1 +certifi==2020.6.20 +cffi==1.14.1 chardet==3.0.4 click==7.1.2 -cryptography==2.9.2 +cryptography==3.0 dataclasses==0.6 ; python_version < '3.7' -fastapi==0.54.1 +fastapi==0.60.1 gunicorn==20.0.4 h11==0.9.0 -hiredis==1.0.1 +hiredis==1.1.0 httptools==0.1.1 ; sys_platform != 'win32' and sys_platform != 'cygwin' and platform_python_implementation != 'PyPy' idna-ssl==1.1.0 ; python_version < '3.7' -idna==2.9 -multidict==4.7.5 -psutil==5.7.0 +idna==2.10 +multidict==4.7.6 +psutil==5.7.2 pycparser==2.20 -pydantic[dotenv]==1.5.1 +pydantic[dotenv]==1.6.1 pyopenssl==19.1.0 python-dateutil==2.8.1 -python-dotenv==0.13.0 -requests==2.23.0 -scout-apm==2.14.1 -sentry-sdk==0.14.3 -six==1.14.0 -starlette==0.13.2 -urllib3[secure]==1.25.9 ; python_version >= '3.5' -uvicorn==0.11.5 +python-dotenv==0.14.0 +requests==2.24.0 +scout-apm==2.15.2 +sentry-sdk==0.16.2 +six==1.15.0 +starlette==0.13.6 +typing-extensions==3.7.4.2 +urllib3[secure]==1.25.10 ; python_version >= '3.5' +uvicorn==0.11.7 uvloop==0.14.0 ; sys_platform != 'win32' and sys_platform != 'cygwin' and platform_python_implementation != 'PyPy' websockets==8.1 wrapt==1.12.1 -yarl==1.4.2 +yarl==1.5.0 From eaebf760400240edf348f0758c58413f0cbf5265 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Sat, 1 Aug 2020 11:54:03 -0400 Subject: [PATCH 17/26] update uvicorn --- Pipfile.lock | 72 ++++++++++++++++++++------------------------ requirements-dev.txt | 4 +-- requirements.txt | 5 ++- 3 files changed, 36 insertions(+), 45 deletions(-) diff --git a/Pipfile.lock b/Pipfile.lock index c68ce3a1..b59b1df1 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -439,14 +439,6 @@ ], "version": "==0.13.6" }, - "typing-extensions": { - "hashes": [ - "sha256:6e95524d8a547a91e08f404ae485bbb71962de46967e1b71a0cb89af24e761c5", - "sha256:79ee589a3caca649a9bfd2a8de4709837400dfa00b6cc81962a1e6a1815969ae", - "sha256:f8d2bd89d25bc39dabe7d23df520442fa1d8969b82544370e03d88b5a591c392" - ], - "version": "==3.7.4.2" - }, "urllib3": { "extras": [ "secure" @@ -460,11 +452,11 @@ }, "uvicorn": { "hashes": [ - "sha256:1d46a22cc55a52f5567e0c66f000ae56f26263e44cef59b7c885bf10f487ce6e", - "sha256:b50f7f4c0c499c9b8d0280924cfbd24b90ba02456e3dc80934b9a786a291f09f" + "sha256:46a83e371f37ea7ff29577d00015f02c942410288fb57def6440f2653fff1d26", + "sha256:4b70ddb4c1946e39db9f3082d53e323dfd50634b95fd83625d778729ef1730ef" ], "index": "pypi", - "version": "==0.11.7" + "version": "==0.11.8" }, "uvloop": { "hashes": [ @@ -516,25 +508,25 @@ }, "yarl": { "hashes": [ - "sha256:1707230e1ea48ea06a3e20acb4ce05a38d2465bd9566c21f48f6212a88e47536", - "sha256:1f269e8e6676193a94635399a77c9059e1826fb6265c9204c9e5a8ccd36006e1", - "sha256:2657716c1fc998f5f2675c0ee6ce91282e0da0ea9e4a94b584bb1917e11c1559", - "sha256:431faa6858f0ea323714d8b7b4a7da1db2eeb9403607f0eaa3800ab2c5a4b627", - "sha256:5bbcb195da7de57f4508b7508c33f7593e9516e27732d08b9aad8586c7b8c384", - "sha256:5c82f5b1499342339f22c83b97dbe2b8a09e47163fab86cd934a8dd46620e0fb", - "sha256:5d410f69b4f92c5e1e2a8ffb73337cd8a274388c6975091735795588a538e605", - "sha256:66b4f345e9573e004b1af184bc00431145cf5e089a4dcc1351505c1f5750192c", - "sha256:875b2a741ce0208f3b818008a859ab5d0f461e98a32bbdc6af82231a9e761c55", - "sha256:9a3266b047d15e78bba38c8455bf68b391c040231ca5965ef867f7cbbc60bde5", - "sha256:9a592c4aa642249e9bdaf76897d90feeb08118626b363a6be8788a9b300274b5", - "sha256:a1772068401d425e803999dada29a6babf041786e08be5e79ef63c9ecc4c9575", - "sha256:b065a5c3e050395ae563019253cc6c769a50fd82d7fa92d07476273521d56b7c", - "sha256:b325fefd574ebef50e391a1072d1712a60348ca29c183e1d546c9d87fec2cd32", - "sha256:cf5eb664910d759bbae0b76d060d6e21f8af5098242d66c448bbebaf2a7bfa70", - "sha256:f058b6541477022c7b54db37229f87dacf3b565de4f901ff5a0a78556a174fea", - "sha256:f5cfed0766837303f688196aa7002730d62c5cc802d98c6395ea1feb87252727" - ], - "version": "==1.5.0" + "sha256:040b237f58ff7d800e6e0fd89c8439b841f777dd99b4a9cca04d6935564b9409", + "sha256:17668ec6722b1b7a3a05cc0167659f6c95b436d25a36c2d52db0eca7d3f72593", + "sha256:3a584b28086bc93c888a6c2aa5c92ed1ae20932f078c46509a66dce9ea5533f2", + "sha256:4439be27e4eee76c7632c2427ca5e73703151b22cae23e64adb243a9c2f565d8", + "sha256:48e918b05850fffb070a496d2b5f97fc31d15d94ca33d3d08a4f86e26d4e7c5d", + "sha256:9102b59e8337f9874638fcfc9ac3734a0cfadb100e47d55c20d0dc6087fb4692", + "sha256:9b930776c0ae0c691776f4d2891ebc5362af86f152dd0da463a6614074cb1b02", + "sha256:b3b9ad80f8b68519cc3372a6ca85ae02cc5a8807723ac366b53c0f089db19e4a", + "sha256:bc2f976c0e918659f723401c4f834deb8a8e7798a71be4382e024bcc3f7e23a8", + "sha256:c22c75b5f394f3d47105045ea551e08a3e804dc7e01b37800ca35b58f856c3d6", + "sha256:c52ce2883dc193824989a9b97a76ca86ecd1fa7955b14f87bf367a61b6232511", + "sha256:ce584af5de8830d8701b8979b18fcf450cef9a382b1a3c8ef189bedc408faf1e", + "sha256:da456eeec17fa8aa4594d9a9f27c0b1060b6a75f2419fe0c00609587b2695f4a", + "sha256:db6db0f45d2c63ddb1a9d18d1b9b22f308e52c83638c26b422d520a815c4b3fb", + "sha256:df89642981b94e7db5596818499c4b2219028f2a528c9c37cc1de45bf2fd3a3f", + "sha256:f18d68f2be6bf0e89f1521af2b1bb46e66ab0018faafa81d70f358153170a317", + "sha256:f379b7f83f23fe12823085cd6b906edc49df969eb99757f58ff382349a3303c6" + ], + "version": "==1.5.1" } }, "develop": { @@ -702,6 +694,13 @@ "markers": "python_version < '3.8'", "version": "==1.7.0" }, + "iniconfig": { + "hashes": [ + "sha256:80cf40c597eb564e86346103f609d74efce0f6b4d4f30ec8ce9e2c26411ba437", + "sha256:e5f92f89355a67de0595932a6c6c02ab4afddc6fcdc0bfc5becd0d60884d3f69" + ], + "version": "==1.0.1" + }, "invoke": { "hashes": [ "sha256:87b3ef9d72a1667e104f89b159eaf8a514dbf2f3576885b2bbdefe74c3fb2132", @@ -840,11 +839,11 @@ }, "pytest": { "hashes": [ - "sha256:5c0db86b698e8f170ba4582a492248919255fcd4c79b1ee64ace34301fb589a1", - "sha256:7979331bfcba207414f5e1263b5a0f8f521d0f457318836a7355531ed1a4c7d8" + "sha256:85228d75db9f45e06e57ef9bf4429267f81ac7c0d742cc9ed63d09886a9fe6f4", + "sha256:8b6007800c53fdacd5a5c192203f4e531eb2a1540ad9c752e052ec0f7143dbad" ], "index": "pypi", - "version": "==5.4.3" + "version": "==6.0.1" }, "pytest-asyncio": { "hashes": [ @@ -985,13 +984,6 @@ "markers": "python_version >= '3.5'", "version": "==1.25.10" }, - "wcwidth": { - "hashes": [ - "sha256:beb4802a9cebb9144e99086eff703a642a13d6a0052920003a230f3294bbe784", - "sha256:c4d647b99872929fdb7bdcaa4fbe7f01413ed3d98077df798530e5b04f116c83" - ], - "version": "==0.2.5" - }, "wrapt": { "hashes": [ "sha256:b62ffa81fb85f4332a4f609cab4ac40709470da05643a082ec1eb88e6d9b97d7" diff --git a/requirements-dev.txt b/requirements-dev.txt index 84619bec..e97c7dbc 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -17,6 +17,7 @@ gitdb==4.0.5 gitpython==3.1.7 idna==2.10 importlib-metadata==1.7.0 ; python_version < '3.8' +iniconfig==1.0.1 invoke==1.4.1 isort==4.3.21 lazy-object-proxy==1.4.3 @@ -33,7 +34,7 @@ pylint==2.5.3 pyparsing==2.4.7 pytest-asyncio==0.14.0 pytest-cov==2.10.0 -pytest==5.4.3 +pytest==6.0.1 pyyaml==5.3.1 regex==2020.7.14 requests==2.24.0 @@ -44,6 +45,5 @@ stevedore==3.2.0 toml==0.10.1 typed-ast==1.4.1 urllib3[secure]==1.25.10 ; python_version >= '3.5' -wcwidth==0.2.5 wrapt==1.12.1 zipp==3.1.0 diff --git a/requirements.txt b/requirements.txt index 415ef5d7..6ad59401 100644 --- a/requirements.txt +++ b/requirements.txt @@ -33,10 +33,9 @@ scout-apm==2.15.2 sentry-sdk==0.16.2 six==1.15.0 starlette==0.13.6 -typing-extensions==3.7.4.2 urllib3[secure]==1.25.10 ; python_version >= '3.5' -uvicorn==0.11.7 +uvicorn==0.11.8 uvloop==0.14.0 ; sys_platform != 'win32' and sys_platform != 'cygwin' and platform_python_implementation != 'PyPy' websockets==8.1 wrapt==1.12.1 -yarl==1.5.0 +yarl==1.5.1 From 3a2975f3422331cfd83e7255cacabca61e86598f Mon Sep 17 00:00:00 2001 From: Gabriel Date: Sat, 1 Aug 2020 12:03:45 -0400 Subject: [PATCH 18/26] 2 workers --- Procfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Procfile b/Procfile index 517e2a0c..dab8203d 100644 --- a/Procfile +++ b/Procfile @@ -1 +1 @@ -web: gunicorn app.main:APP -w 3 -k uvicorn.workers.UvicornWorker +web: gunicorn app.main:APP -w 2 -k uvicorn.workers.UvicornWorker From f53e6610e734b65da538cc54e489fb9eaa0d6268 Mon Sep 17 00:00:00 2001 From: "sourcery-ai[bot]" <58596630+sourcery-ai[bot]@users.noreply.github.com> Date: Mon, 10 Aug 2020 16:02:33 -0400 Subject: [PATCH 19/26] 'Refactored by Sourcery' (#35) Co-authored-by: Sourcery AI <> --- tests/test_location.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_location.py b/tests/test_location.py index 08d9d7c8..36abeeab 100644 --- a/tests/test_location.py +++ b/tests/test_location.py @@ -57,4 +57,4 @@ def test_location_class( ) assert location_obj.country_code == country_code - assert not location_obj.serialize() == None + assert location_obj.serialize() is not None From ba5050ea57e1ab546ac9be2c2090180baa3e52a4 Mon Sep 17 00:00:00 2001 From: "sourcery-ai[bot]" <58596630+sourcery-ai[bot]@users.noreply.github.com> Date: Mon, 10 Aug 2020 16:11:49 -0400 Subject: [PATCH 20/26] Refactored by Sourcery (#33) Co-authored-by: Sourcery AI --- tests/test_location.py | 2 +- tests/test_routes.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_location.py b/tests/test_location.py index 50129a52..3a78468d 100644 --- a/tests/test_location.py +++ b/tests/test_location.py @@ -57,4 +57,4 @@ def test_location_class( ) assert location_obj.country_code == country_code - assert not location_obj.serialize() == None + assert location_obj.serialize() is not None diff --git a/tests/test_routes.py b/tests/test_routes.py index 5143ca8a..63b39998 100644 --- a/tests/test_routes.py +++ b/tests/test_routes.py @@ -87,11 +87,11 @@ async def test_v1_all(self): assert return_data == json.loads(expected_json_output) async def test_v2_latest(self): - state = "latest" - with mock.patch("app.services.location.jhu.datetime") as mock_datetime: mock_datetime.utcnow.return_value.isoformat.return_value = DATETIME_STRING mock_datetime.strptime.side_effect = mocked_strptime_isoformat + state = "latest" + response = await self.asgi_client.get(f"/v2/{state}") return_data = response.json() From a4fd67b302b066a268294608f3e3550ff729dae5 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Sun, 13 Sep 2020 22:05:08 -0400 Subject: [PATCH 21/26] fix Coordinates import --- app/services/location/jhu.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/services/location/jhu.py b/app/services/location/jhu.py index 541b0aad..ac978ece 100644 --- a/app/services/location/jhu.py +++ b/app/services/location/jhu.py @@ -9,8 +9,9 @@ from cachetools import TTLCache from ...caches import check_cache, load_cache +from ...coordinates import Coordinates from ...location import TimelinedLocation -from ...models import Coordinates, Timeline +from ...models import Timeline from ...utils import countries from ...utils import date as date_util from ...utils import httputils From 76014f7d273633090117fdd3b1f1348dd973dbbd Mon Sep 17 00:00:00 2001 From: Gabriel Date: Sun, 13 Sep 2020 22:12:10 -0400 Subject: [PATCH 22/26] fix jhu timeline init call --- app/services/location/jhu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/location/jhu.py b/app/services/location/jhu.py index ac978ece..f252bf80 100644 --- a/app/services/location/jhu.py +++ b/app/services/location/jhu.py @@ -196,7 +196,7 @@ async def get_locations(): } ), "recovered": Timeline( - { + timeline={ datetime.strptime(date, "%m/%d/%y").isoformat() + "Z": amount for date, amount in timelines["recovered"].items() } From cf65e6ecc0334efa241730b6e1f7cd4ed1bf716b Mon Sep 17 00:00:00 2001 From: Gabriel Date: Sun, 13 Sep 2020 22:25:35 -0400 Subject: [PATCH 23/26] update requirements update isort usage --- Pipfile.lock | 301 ++++++++++++++++++++-------------------- requirements-dev.txt | 24 ++-- requirements.txt | 12 +- tasks.py | 4 +- tests/test_countries.py | 1 - 5 files changed, 172 insertions(+), 170 deletions(-) diff --git a/Pipfile.lock b/Pipfile.lock index b59b1df1..2a45eb4b 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -84,10 +84,10 @@ }, "attrs": { "hashes": [ - "sha256:08a96c641c3a74e44eb59afb61a24f2cb9f4d7188748e76ba4bb5edfa3cb7d1c", - "sha256:f7b7ce16570fe9965acd6d30101a28f62fb4a7f9e926b3bbc9b61f8b04247e72" + "sha256:26b54ddbbb9ee1d34d5d3668dd37d6cf74990ab23c828c2888dccdceee395594", + "sha256:fce7fc47dfc976152e82d53ff92fa0407700c21acd20886a13777a0d20e655dc" ], - "version": "==19.3.0" + "version": "==20.2.0" }, "cachetools": { "hashes": [ @@ -106,36 +106,36 @@ }, "cffi": { "hashes": [ - "sha256:267adcf6e68d77ba154334a3e4fc921b8e63cbb38ca00d33d40655d4228502bc", - "sha256:26f33e8f6a70c255767e3c3f957ccafc7f1f706b966e110b855bfe944511f1f9", - "sha256:3cd2c044517f38d1b577f05927fb9729d3396f1d44d0c659a445599e79519792", - "sha256:4a03416915b82b81af5502459a8a9dd62a3c299b295dcdf470877cb948d655f2", - "sha256:4ce1e995aeecf7cc32380bc11598bfdfa017d592259d5da00fc7ded11e61d022", - "sha256:4f53e4128c81ca3212ff4cf097c797ab44646a40b42ec02a891155cd7a2ba4d8", - "sha256:4fa72a52a906425416f41738728268072d5acfd48cbe7796af07a923236bcf96", - "sha256:66dd45eb9530e3dde8f7c009f84568bc7cac489b93d04ac86e3111fb46e470c2", - "sha256:6923d077d9ae9e8bacbdb1c07ae78405a9306c8fd1af13bfa06ca891095eb995", - "sha256:833401b15de1bb92791d7b6fb353d4af60dc688eaa521bd97203dcd2d124a7c1", - "sha256:8416ed88ddc057bab0526d4e4e9f3660f614ac2394b5e019a628cdfff3733849", - "sha256:892daa86384994fdf4856cb43c93f40cbe80f7f95bb5da94971b39c7f54b3a9c", - "sha256:98be759efdb5e5fa161e46d404f4e0ce388e72fbf7d9baf010aff16689e22abe", - "sha256:a6d28e7f14ecf3b2ad67c4f106841218c8ab12a0683b1528534a6c87d2307af3", - "sha256:b1d6ebc891607e71fd9da71688fcf332a6630b7f5b7f5549e6e631821c0e5d90", - "sha256:b2a2b0d276a136146e012154baefaea2758ef1f56ae9f4e01c612b0831e0bd2f", - "sha256:b87dfa9f10a470eee7f24234a37d1d5f51e5f5fa9eeffda7c282e2b8f5162eb1", - "sha256:bac0d6f7728a9cc3c1e06d4fcbac12aaa70e9379b3025b27ec1226f0e2d404cf", - "sha256:c991112622baee0ae4d55c008380c32ecfd0ad417bcd0417ba432e6ba7328caa", - "sha256:cda422d54ee7905bfc53ee6915ab68fe7b230cacf581110df4272ee10462aadc", - "sha256:d3148b6ba3923c5850ea197a91a42683f946dba7e8eb82dfa211ab7e708de939", - "sha256:d6033b4ffa34ef70f0b8086fd4c3df4bf801fee485a8a7d4519399818351aa8e", - "sha256:ddff0b2bd7edcc8c82d1adde6dbbf5e60d57ce985402541cd2985c27f7bec2a0", - "sha256:e23cb7f1d8e0f93addf0cae3c5b6f00324cccb4a7949ee558d7b6ca973ab8ae9", - "sha256:effd2ba52cee4ceff1a77f20d2a9f9bf8d50353c854a282b8760ac15b9833168", - "sha256:f90c2267101010de42f7273c94a1f026e56cbc043f9330acd8a80e64300aba33", - "sha256:f960375e9823ae6a07072ff7f8a85954e5a6434f97869f50d0e41649a1c8144f", - "sha256:fcf32bf76dc25e30ed793145a57426064520890d7c02866eb93d3e4abe516948" - ], - "version": "==1.14.1" + "sha256:0da50dcbccd7cb7e6c741ab7912b2eff48e85af217d72b57f80ebc616257125e", + "sha256:12a453e03124069b6896107ee133ae3ab04c624bb10683e1ed1c1663df17c13c", + "sha256:15419020b0e812b40d96ec9d369b2bc8109cc3295eac6e013d3261343580cc7e", + "sha256:15a5f59a4808f82d8ec7364cbace851df591c2d43bc76bcbe5c4543a7ddd1bf1", + "sha256:23e44937d7695c27c66a54d793dd4b45889a81b35c0751ba91040fe825ec59c4", + "sha256:29c4688ace466a365b85a51dcc5e3c853c1d283f293dfcc12f7a77e498f160d2", + "sha256:57214fa5430399dffd54f4be37b56fe22cedb2b98862550d43cc085fb698dc2c", + "sha256:577791f948d34d569acb2d1add5831731c59d5a0c50a6d9f629ae1cefd9ca4a0", + "sha256:6539314d84c4d36f28d73adc1b45e9f4ee2a89cdc7e5d2b0a6dbacba31906798", + "sha256:65867d63f0fd1b500fa343d7798fa64e9e681b594e0a07dc934c13e76ee28fb1", + "sha256:672b539db20fef6b03d6f7a14b5825d57c98e4026401fce838849f8de73fe4d4", + "sha256:6843db0343e12e3f52cc58430ad559d850a53684f5b352540ca3f1bc56df0731", + "sha256:7057613efefd36cacabbdbcef010e0a9c20a88fc07eb3e616019ea1692fa5df4", + "sha256:76ada88d62eb24de7051c5157a1a78fd853cca9b91c0713c2e973e4196271d0c", + "sha256:837398c2ec00228679513802e3744d1e8e3cb1204aa6ad408b6aff081e99a487", + "sha256:8662aabfeab00cea149a3d1c2999b0731e70c6b5bac596d95d13f643e76d3d4e", + "sha256:95e9094162fa712f18b4f60896e34b621df99147c2cee216cfa8f022294e8e9f", + "sha256:99cc66b33c418cd579c0f03b77b94263c305c389cb0c6972dac420f24b3bf123", + "sha256:9b219511d8b64d3fa14261963933be34028ea0e57455baf6781fe399c2c3206c", + "sha256:ae8f34d50af2c2154035984b8b5fc5d9ed63f32fe615646ab435b05b132ca91b", + "sha256:b9aa9d8818c2e917fa2c105ad538e222a5bce59777133840b93134022a7ce650", + "sha256:bf44a9a0141a082e89c90e8d785b212a872db793a0080c20f6ae6e2a0ebf82ad", + "sha256:c0b48b98d79cf795b0916c57bebbc6d16bb43b9fc9b8c9f57f4cf05881904c75", + "sha256:da9d3c506f43e220336433dffe643fbfa40096d408cb9b7f2477892f369d5f82", + "sha256:e4082d832e36e7f9b2278bc774886ca8207346b99f278e54c9de4834f17232f7", + "sha256:e4b9b7af398c32e408c00eb4e0d33ced2f9121fd9fb978e6c1b57edd014a7d15", + "sha256:e613514a82539fc48291d01933951a13ae93b6b444a88782480be32245ed4afa", + "sha256:f5033952def24172e60493b68717792e3aebb387a8d186c43c020d9363ee7281" + ], + "version": "==1.14.2" }, "chardet": { "hashes": [ @@ -153,27 +153,30 @@ }, "cryptography": { "hashes": [ - "sha256:0c608ff4d4adad9e39b5057de43657515c7da1ccb1807c3a27d4cf31fc923b4b", - "sha256:0cbfed8ea74631fe4de00630f4bb592dad564d57f73150d6f6796a24e76c76cd", - "sha256:124af7255ffc8e964d9ff26971b3a6153e1a8a220b9a685dc407976ecb27a06a", - "sha256:384d7c681b1ab904fff3400a6909261cae1d0939cc483a68bdedab282fb89a07", - "sha256:45741f5499150593178fc98d2c1a9c6722df88b99c821ad6ae298eff0ba1ae71", - "sha256:4b9303507254ccb1181d1803a2080a798910ba89b1a3c9f53639885c90f7a756", - "sha256:4d355f2aee4a29063c10164b032d9fa8a82e2c30768737a2fd56d256146ad559", - "sha256:51e40123083d2f946794f9fe4adeeee2922b581fa3602128ce85ff813d85b81f", - "sha256:8713ddb888119b0d2a1462357d5946b8911be01ddbf31451e1d07eaa5077a261", - "sha256:8e924dbc025206e97756e8903039662aa58aa9ba357d8e1d8fc29e3092322053", - "sha256:8ecef21ac982aa78309bb6f092d1677812927e8b5ef204a10c326fc29f1367e2", - "sha256:8ecf9400d0893836ff41b6f977a33972145a855b6efeb605b49ee273c5e6469f", - "sha256:9367d00e14dee8d02134c6c9524bb4bd39d4c162456343d07191e2a0b5ec8b3b", - "sha256:a09fd9c1cca9a46b6ad4bea0a1f86ab1de3c0c932364dbcf9a6c2a5eeb44fa77", - "sha256:ab49edd5bea8d8b39a44b3db618e4783ef84c19c8b47286bf05dfdb3efb01c83", - "sha256:bea0b0468f89cdea625bb3f692cd7a4222d80a6bdafd6fb923963f2b9da0e15f", - "sha256:bec7568c6970b865f2bcebbe84d547c52bb2abadf74cefce396ba07571109c67", - "sha256:ce82cc06588e5cbc2a7df3c8a9c778f2cb722f56835a23a68b5a7264726bb00c", - "sha256:dea0ba7fe6f9461d244679efa968d215ea1f989b9c1957d7f10c21e5c7c09ad6" - ], - "version": "==3.0" + "sha256:10c9775a3f31610cf6b694d1fe598f2183441de81cedcf1814451ae53d71b13a", + "sha256:180c9f855a8ea280e72a5d61cf05681b230c2dce804c48e9b2983f491ecc44ed", + "sha256:247df238bc05c7d2e934a761243bfdc67db03f339948b1e2e80c75d41fc7cc36", + "sha256:26409a473cc6278e4c90f782cd5968ebad04d3911ed1c402fc86908c17633e08", + "sha256:2a27615c965173c4c88f2961cf18115c08fedfb8bdc121347f26e8458dc6d237", + "sha256:2e26223ac636ca216e855748e7d435a1bf846809ed12ed898179587d0cf74618", + "sha256:321761d55fb7cb256b771ee4ed78e69486a7336be9143b90c52be59d7657f50f", + "sha256:4005b38cd86fc51c955db40b0f0e52ff65340874495af72efabb1bb8ca881695", + "sha256:4b9e96543d0784acebb70991ebc2dbd99aa287f6217546bb993df22dd361d41c", + "sha256:548b0818e88792318dc137d8b1ec82a0ab0af96c7f0603a00bb94f896fbf5e10", + "sha256:725875681afe50b41aee7fdd629cedbc4720bab350142b12c55c0a4d17c7416c", + "sha256:7a63e97355f3cd77c94bd98c59cb85fe0efd76ea7ef904c9b0316b5bbfde6ed1", + "sha256:94191501e4b4009642be21dde2a78bd3c2701a81ee57d3d3d02f1d99f8b64a9e", + "sha256:969ae512a250f869c1738ca63be843488ff5cc031987d302c1f59c7dbe1b225f", + "sha256:9f734423eb9c2ea85000aa2476e0d7a58e021bc34f0a373ac52a5454cd52f791", + "sha256:b45ab1c6ece7c471f01c56f5d19818ca797c34541f0b2351635a5c9fe09ac2e0", + "sha256:cc6096c86ec0de26e2263c228fb25ee01c3ff1346d3cfc219d67d49f303585af", + "sha256:dc3f437ca6353979aace181f1b790f0fc79e446235b14306241633ab7d61b8f8", + "sha256:e7563eb7bc5c7e75a213281715155248cceba88b11cb4b22957ad45b85903761", + "sha256:e7dad66a9e5684a40f270bd4aee1906878193ae50a4831922e454a2a457f1716", + "sha256:eb80a288e3cfc08f679f95da72d2ef90cb74f6d8a8ba69d2f215c5e110b2ca32", + "sha256:fa7fbcc40e2210aca26c7ac8a39467eae444d90a2c346cbcffd9133a166bcc67" + ], + "version": "==3.1" }, "dataclasses": { "hashes": [ @@ -186,11 +189,11 @@ }, "fastapi": { "hashes": [ - "sha256:96f964c3d9da8183f824857ad67c16c00ff3297e7bbca6748f60bd8485ded38c", - "sha256:9a4faa0e2b9c88a3772f7ce15eb4005bbdd27d1230ab4a0cd3517316175014a6" + "sha256:61ed73b4304413a2ea618d1b95ea866ee386e0e62dd8659c4f5059286f4a39c2", + "sha256:6cc31bb555dd8ca956d1d227477d661e4ac012337242a41d36214ffbda78bfe9" ], "index": "pypi", - "version": "==0.60.1" + "version": "==0.61.1" }, "gunicorn": { "hashes": [ @@ -394,36 +397,36 @@ }, "scout-apm": { "hashes": [ - "sha256:1b8d01ec9ee0e80617698b7fccbfcc12f207ec1287a325e2bcf520a784e8b582", - "sha256:292b37c1c855bb78bcd4322320d704a1c4ec88dd1deb8089c59af3ddc638167b", - "sha256:3209b0362212693daa95abc03d92e5c2dd4eae90f2d20d17cfe56e8d9f997d50", - "sha256:34044653f7239f81f4a4282709d32630e82ba6e8cd0d343951a7a1f98f9cb53d", - "sha256:3cb11a32a3f395649af44c6e9d71c0f961652a8b291f8ae3b8bd701bfc6baaaa", - "sha256:54bb9fc339b39f3320521b7b8e988315b9252afd2252065de88a36802f21421c", - "sha256:5db32c5c61e9c916d5284157c3161c464358907ace50f2122af59bc3a02f79e9", - "sha256:6a5b9ea2fb1414cb69ee06d4ede9bcfe6e45bddbffc9a5b8ae50f74c3861ee09", - "sha256:79bb227f4c9268b3441d7f5a2a86d3378c3877df8dab9bb833711bd38a818151", - "sha256:7b9125ee5ed4be19b20d2669d27d80a4fe1a4c461e9b0873f3e04c96889853e8", - "sha256:afae9c349642b8f86eb28722a1fcc24ea0c5d8c980b9ca9f253cfcc8976025a4", - "sha256:bac108329a806a1de4786f7f2eb43ae5646d20813429b76db31a41ae92670c31", - "sha256:bc6ed26a855ada1a32c15aba98518400954f0ce0920a5017a76f2431de8d9093", - "sha256:d1d2e1b0e51f3a337c3c953c4e7fc1fc1ae9d391010bd90a2a8bedd5e58d63d9", - "sha256:d77f2aeb7ba04c5c3e1687c1b29b1a7e17471c817490074e0e9319e43f409664", - "sha256:ebdf82c1048c705cc79181c270e5816e4ddebcad512e312e2c86fdea803904ef", - "sha256:f09c4046a199002296d932a903a693c67f8f76e483b29ad584e2649eea474426", - "sha256:f8108ea738e69ee5ab2ee0b025fb601a7308b8c8e586b9e1bfb44491a018085f", - "sha256:ff6879c247ff073fd75d3f621509262440105bb786cddd0935987a42e78db8b0" + "sha256:1fd5e6526f345a3b13bbf0171a367c00c3adfdde1fcee3b02223b8935cc907cf", + "sha256:21c3d356a8c0449d0cc364dbe2d52ff0139c57d427a0cb9bed5177d3526207e3", + "sha256:230de861482f8efd9a55050c4b12cb66a010c0826f21bca530275e7fcc2f5268", + "sha256:3bd3f6b8008ad829fda3a8cc406c53470aa7a770fdbf9db87ef02955c4d5d47e", + "sha256:49e4f718ae3201409e48c48e6ce6ee109d1348b15a2745b5405ab258e8a2e874", + "sha256:52bb6ad86ca13459cba6cb5b6085923dfcd1015b6fb28da70934ecbf27b83688", + "sha256:5cc1ffb00d3e38a46939cedf3187df29a514eae95b726aef8eba8cb401d4758f", + "sha256:a15f271ccf25dbed8fe4e419064eafbb4b90b687e7f1458541f14d3d2022b782", + "sha256:bbb2bf5c3d94267001862f463cd759a023e3aaf47ccd4b244a9b5775c8bd75cb", + "sha256:bda6374fdaa81e7409b823a80613b072b28e2c98fca9637e0635705ec1824589", + "sha256:c16c83293288a93ad638fd452d3a2289bfbfb29b65772ae6876711fd2c13edb4", + "sha256:c8d5c58a08df9bba1b6734b033210731b8d2d6083fa81174fb79033e9ddc86e4", + "sha256:d51dfe698915815755e75655b40e6abc530df76afc6e188671b99d15442c681c", + "sha256:e501d1eb6e58979ec1cee4922c7321f5c4ea1d9daf4e5d19f85fc6aa96e0c13c", + "sha256:ecd22480217203fd1e3f5dd752d1bb93db93859159510ac4e599297c488c4173", + "sha256:ede0cd338827b49291a9158be63726cc16f77e6bc1d08deb277ccb9a4feebe08", + "sha256:f5d46cd89f6ef109df2257177342adb9b0a19be73a054aacd8157e85cbaf2a60", + "sha256:f835071ff0b6c41a227e2b06999ec9c4a07b806f6ab5cec0eae15a8d166478dd", + "sha256:f9b204bf90c6af4c0a7ee2f659239ababb4015d91134db2dbf9ab9578c1fd43d" ], "index": "pypi", - "version": "==2.15.2" + "version": "==2.16.1" }, "sentry-sdk": { "hashes": [ - "sha256:2de15b13836fa3522815a933bd9c887c77f4868071043349f94f1b896c1bcfb8", - "sha256:38bb09d0277117f76507c8728d9a5156f09a47ac5175bb8072513859d19a593b" + "sha256:97bff68e57402ad39674e6fe2545df0d5eea41c3d51e280c170761705c8c20ff", + "sha256:a16caf9ce892623081cbb9a95f6c1f892778bb123909b0ed7afdfb52ce7a58a1" ], "index": "pypi", - "version": "==0.16.2" + "version": "==0.17.4" }, "six": { "hashes": [ @@ -569,10 +572,10 @@ }, "attrs": { "hashes": [ - "sha256:08a96c641c3a74e44eb59afb61a24f2cb9f4d7188748e76ba4bb5edfa3cb7d1c", - "sha256:f7b7ce16570fe9965acd6d30101a28f62fb4a7f9e926b3bbc9b61f8b04247e72" + "sha256:26b54ddbbb9ee1d34d5d3668dd37d6cf74990ab23c828c2888dccdceee395594", + "sha256:fce7fc47dfc976152e82d53ff92fa0407700c21acd20886a13777a0d20e655dc" ], - "version": "==19.3.0" + "version": "==20.2.0" }, "bandit": { "hashes": [ @@ -613,50 +616,50 @@ }, "coverage": { "hashes": [ - "sha256:098a703d913be6fbd146a8c50cc76513d726b022d170e5e98dc56d958fd592fb", - "sha256:16042dc7f8e632e0dcd5206a5095ebd18cb1d005f4c89694f7f8aafd96dd43a3", - "sha256:1adb6be0dcef0cf9434619d3b892772fdb48e793300f9d762e480e043bd8e716", - "sha256:27ca5a2bc04d68f0776f2cdcb8bbd508bbe430a7bf9c02315cd05fb1d86d0034", - "sha256:28f42dc5172ebdc32622a2c3f7ead1b836cdbf253569ae5673f499e35db0bac3", - "sha256:2fcc8b58953d74d199a1a4d633df8146f0ac36c4e720b4a1997e9b6327af43a8", - "sha256:304fbe451698373dc6653772c72c5d5e883a4aadaf20343592a7abb2e643dae0", - "sha256:30bc103587e0d3df9e52cd9da1dd915265a22fad0b72afe54daf840c984b564f", - "sha256:40f70f81be4d34f8d491e55936904db5c527b0711b2a46513641a5729783c2e4", - "sha256:4186fc95c9febeab5681bc3248553d5ec8c2999b8424d4fc3a39c9cba5796962", - "sha256:46794c815e56f1431c66d81943fa90721bb858375fb36e5903697d5eef88627d", - "sha256:4869ab1c1ed33953bb2433ce7b894a28d724b7aa76c19b11e2878034a4e4680b", - "sha256:4f6428b55d2916a69f8d6453e48a505c07b2245653b0aa9f0dee38785939f5e4", - "sha256:52f185ffd3291196dc1aae506b42e178a592b0b60a8610b108e6ad892cfc1bb3", - "sha256:538f2fd5eb64366f37c97fdb3077d665fa946d2b6d95447622292f38407f9258", - "sha256:64c4f340338c68c463f1b56e3f2f0423f7b17ba6c3febae80b81f0e093077f59", - "sha256:675192fca634f0df69af3493a48224f211f8db4e84452b08d5fcebb9167adb01", - "sha256:700997b77cfab016533b3e7dbc03b71d33ee4df1d79f2463a318ca0263fc29dd", - "sha256:8505e614c983834239f865da2dd336dcf9d72776b951d5dfa5ac36b987726e1b", - "sha256:962c44070c281d86398aeb8f64e1bf37816a4dfc6f4c0f114756b14fc575621d", - "sha256:9e536783a5acee79a9b308be97d3952b662748c4037b6a24cbb339dc7ed8eb89", - "sha256:9ea749fd447ce7fb1ac71f7616371f04054d969d412d37611716721931e36efd", - "sha256:a34cb28e0747ea15e82d13e14de606747e9e484fb28d63c999483f5d5188e89b", - "sha256:a3ee9c793ffefe2944d3a2bd928a0e436cd0ac2d9e3723152d6fd5398838ce7d", - "sha256:aab75d99f3f2874733946a7648ce87a50019eb90baef931698f96b76b6769a46", - "sha256:b1ed2bdb27b4c9fc87058a1cb751c4df8752002143ed393899edb82b131e0546", - "sha256:b360d8fd88d2bad01cb953d81fd2edd4be539df7bfec41e8753fe9f4456a5082", - "sha256:b8f58c7db64d8f27078cbf2a4391af6aa4e4767cc08b37555c4ae064b8558d9b", - "sha256:c1bbb628ed5192124889b51204de27c575b3ffc05a5a91307e7640eff1d48da4", - "sha256:c2ff24df02a125b7b346c4c9078c8936da06964cc2d276292c357d64378158f8", - "sha256:c890728a93fffd0407d7d37c1e6083ff3f9f211c83b4316fae3778417eab9811", - "sha256:c96472b8ca5dc135fb0aa62f79b033f02aa434fb03a8b190600a5ae4102df1fd", - "sha256:ce7866f29d3025b5b34c2e944e66ebef0d92e4a4f2463f7266daa03a1332a651", - "sha256:e26c993bd4b220429d4ec8c1468eca445a4064a61c74ca08da7429af9bc53bb0" - ], - "version": "==5.2.1" + "sha256:0203acd33d2298e19b57451ebb0bed0ab0c602e5cf5a818591b4918b1f97d516", + "sha256:0f313707cdecd5cd3e217fc68c78a960b616604b559e9ea60cc16795c4304259", + "sha256:1c6703094c81fa55b816f5ae542c6ffc625fec769f22b053adb42ad712d086c9", + "sha256:1d44bb3a652fed01f1f2c10d5477956116e9b391320c94d36c6bf13b088a1097", + "sha256:280baa8ec489c4f542f8940f9c4c2181f0306a8ee1a54eceba071a449fb870a0", + "sha256:29a6272fec10623fcbe158fdf9abc7a5fa032048ac1d8631f14b50fbfc10d17f", + "sha256:2b31f46bf7b31e6aa690d4c7a3d51bb262438c6dcb0d528adde446531d0d3bb7", + "sha256:2d43af2be93ffbad25dd959899b5b809618a496926146ce98ee0b23683f8c51c", + "sha256:381ead10b9b9af5f64646cd27107fb27b614ee7040bb1226f9c07ba96625cbb5", + "sha256:47a11bdbd8ada9b7ee628596f9d97fbd3851bd9999d398e9436bd67376dbece7", + "sha256:4d6a42744139a7fa5b46a264874a781e8694bb32f1d76d8137b68138686f1729", + "sha256:50691e744714856f03a86df3e2bff847c2acede4c191f9a1da38f088df342978", + "sha256:530cc8aaf11cc2ac7430f3614b04645662ef20c348dce4167c22d99bec3480e9", + "sha256:582ddfbe712025448206a5bc45855d16c2e491c2dd102ee9a2841418ac1c629f", + "sha256:63808c30b41f3bbf65e29f7280bf793c79f54fb807057de7e5238ffc7cc4d7b9", + "sha256:71b69bd716698fa62cd97137d6f2fdf49f534decb23a2c6fc80813e8b7be6822", + "sha256:7858847f2d84bf6e64c7f66498e851c54de8ea06a6f96a32a1d192d846734418", + "sha256:78e93cc3571fd928a39c0b26767c986188a4118edc67bc0695bc7a284da22e82", + "sha256:7f43286f13d91a34fadf61ae252a51a130223c52bfefb50310d5b2deb062cf0f", + "sha256:86e9f8cd4b0cdd57b4ae71a9c186717daa4c5a99f3238a8723f416256e0b064d", + "sha256:8f264ba2701b8c9f815b272ad568d555ef98dfe1576802ab3149c3629a9f2221", + "sha256:9342dd70a1e151684727c9c91ea003b2fb33523bf19385d4554f7897ca0141d4", + "sha256:9361de40701666b034c59ad9e317bae95c973b9ff92513dd0eced11c6adf2e21", + "sha256:9669179786254a2e7e57f0ecf224e978471491d660aaca833f845b72a2df3709", + "sha256:aac1ba0a253e17889550ddb1b60a2063f7474155465577caa2a3b131224cfd54", + "sha256:aef72eae10b5e3116bac6957de1df4d75909fc76d1499a53fb6387434b6bcd8d", + "sha256:bd3166bb3b111e76a4f8e2980fa1addf2920a4ca9b2b8ca36a3bc3dedc618270", + "sha256:c1b78fb9700fc961f53386ad2fd86d87091e06ede5d118b8a50dea285a071c24", + "sha256:c3888a051226e676e383de03bf49eb633cd39fc829516e5334e69b8d81aae751", + "sha256:c5f17ad25d2c1286436761b462e22b5020d83316f8e8fcb5deb2b3151f8f1d3a", + "sha256:c851b35fc078389bc16b915a0a7c1d5923e12e2c5aeec58c52f4aa8085ac8237", + "sha256:cb7df71de0af56000115eafd000b867d1261f786b5eebd88a0ca6360cccfaca7", + "sha256:cedb2f9e1f990918ea061f28a0f0077a07702e3819602d3507e2ff98c8d20636", + "sha256:e8caf961e1b1a945db76f1b5fa9c91498d15f545ac0ababbe575cfab185d3bd8" + ], + "version": "==5.3" }, "coveralls": { "hashes": [ - "sha256:3726d35c0f93a28631a003880e2aa6cc93c401d62bc6919c5cb497217ba30c55", - "sha256:afe359cd5b350e1b3895372bda32af8f0260638c7c4a31a5c0f15aa6a96f40d9" + "sha256:4430b862baabb3cf090d36d84d331966615e4288d8a8c5957e0fd456d0dd8bd6", + "sha256:b3b60c17b03a0dee61952a91aed6f131e0b2ac8bd5da909389c53137811409e1" ], "index": "pypi", - "version": "==2.1.1" + "version": "==2.1.2" }, "docopt": { "hashes": [ @@ -673,10 +676,10 @@ }, "gitpython": { "hashes": [ - "sha256:2db287d71a284e22e5c2846042d0602465c7434d910406990d5b74df4afb0858", - "sha256:fa3b92da728a457dd75d62bb5f3eb2816d99a7fe6c67398e260637a40e3fafb5" + "sha256:080bf8e2cf1a2b907634761c2eaefbe83b69930c94c66ad11b65a8252959f912", + "sha256:1858f4fd089abe92ae465f01d5aaaf55e937eca565fb2c1fce35a51b5f85c910" ], - "version": "==3.1.7" + "version": "==3.1.8" }, "idna": { "hashes": [ @@ -712,11 +715,11 @@ }, "isort": { "hashes": [ - "sha256:54da7e92468955c4fceacd0c86bd0ec997b0e1ee80d97f67c35a78b719dccab1", - "sha256:6e811fcb295968434526407adb8796944f1988c5b65e8139058f2014cbe100fd" + "sha256:171c5f365791073426b5ed3a156c2081a47f88c329161fd28228ff2da4c97ddb", + "sha256:ba91218eee31f1e300ecc079ef0c524cea3fc41bfbb979cbdf5fd3a889e3cfed" ], "index": "pypi", - "version": "==4.3.21" + "version": "==5.5.2" }, "lazy-object-proxy": { "hashes": [ @@ -760,10 +763,10 @@ }, "more-itertools": { "hashes": [ - "sha256:68c70cc7167bdf5c7c9d8f6954a7837089c6a36bf565383919bb595efb8a17e5", - "sha256:b78134b2063dd214000685165d81c154522c3ee0a1c0d4d113c80361c234c5a2" + "sha256:6f83822ae94818eae2612063a5101a7311e68ae8002005b5e05f03fd74a86a20", + "sha256:9b30f12df9393f0d28af9210ff8efe48d10c94f73e5daf886f10c4b0b0b4f03c" ], - "version": "==8.4.0" + "version": "==8.5.0" }, "multidict": { "hashes": [ @@ -803,10 +806,10 @@ }, "pbr": { "hashes": [ - "sha256:07f558fece33b05caf857474a366dfcc00562bca13dd8b47b2b3e22d9f9bf55c", - "sha256:579170e23f8e0c2f24b0de612f71f648eccb79fb1322c814ae6b3c07b5ba23e8" + "sha256:14bfd98f51c78a3dd22a1ef45cf194ad79eee4a19e8e1a0d5c7f8e81ffe182ea", + "sha256:5adc0f9fc64319d8df5ca1e4e06eea674c26b80e6f00c530b18ce6a6592ead15" ], - "version": "==5.4.5" + "version": "==5.5.0" }, "pluggy": { "hashes": [ @@ -824,11 +827,11 @@ }, "pylint": { "hashes": [ - "sha256:7dd78437f2d8d019717dbf287772d0b2dbdfd13fc016aa7faa08d67bccc46adc", - "sha256:d0ece7d223fe422088b0e8f13fa0a1e8eb745ebffcb8ed53d3e95394b6101a1c" + "sha256:bb4a908c9dadbc3aac18860550e870f58e1a02c9f2c204fdf5693d73be061210", + "sha256:bfe68f020f8a0fece830a22dd4d5dddb4ecc6137db04face4c3420a46a52239f" ], "index": "pypi", - "version": "==2.5.3" + "version": "==2.6.0" }, "pyparsing": { "hashes": [ @@ -839,11 +842,11 @@ }, "pytest": { "hashes": [ - "sha256:85228d75db9f45e06e57ef9bf4429267f81ac7c0d742cc9ed63d09886a9fe6f4", - "sha256:8b6007800c53fdacd5a5c192203f4e531eb2a1540ad9c752e052ec0f7143dbad" + "sha256:0e37f61339c4578776e090c3b8f6b16ce4db333889d65d0efb305243ec544b40", + "sha256:c8f57c2a30983f469bf03e68cdfa74dc474ce56b8f280ddcb080dfd91df01043" ], "index": "pypi", - "version": "==6.0.1" + "version": "==6.0.2" }, "pytest-asyncio": { "hashes": [ @@ -855,11 +858,11 @@ }, "pytest-cov": { "hashes": [ - "sha256:1a629dc9f48e53512fcbfda6b07de490c374b0c83c55ff7a1720b3fccff0ac87", - "sha256:6e6d18092dce6fad667cd7020deed816f858ad3b49d5b5e2b1cc1c97a4dba65c" + "sha256:45ec2d5182f89a81fc3eb29e3d1ed3113b9e9a873bcddb2a71faaab066110191", + "sha256:47bd0ce14056fdd79f93e1713f88fad7bdcc583dcd7783da86ef2f085a0bb88e" ], "index": "pypi", - "version": "==2.10.0" + "version": "==2.10.1" }, "pyyaml": { "hashes": [ @@ -913,11 +916,11 @@ }, "responses": { "hashes": [ - "sha256:7bb697a5fedeb41d81e8b87f152d453d5cab42dcd1691b6a7d6097e94d33f373", - "sha256:af94d28cdfb48ded0ad82a5216616631543650f440334a693479b8991a6594a2" + "sha256:0de50fbf600adf5ef9f0821b85cc537acca98d66bc7776755924476775c1989c", + "sha256:e80d5276011a4b79ecb62c5f82ba07aa23fb31ecbc95ee7cad6de250a3c97444" ], "index": "pypi", - "version": "==0.10.15" + "version": "==0.12.0" }, "six": { "hashes": [ @@ -935,10 +938,10 @@ }, "stevedore": { "hashes": [ - "sha256:38791aa5bed922b0a844513c5f9ed37774b68edc609e5ab8ab8d8fe0ce4315e5", - "sha256:c8f4f0ebbc394e52ddf49de8bcc3cf8ad2b4425ebac494106bbc5e3661ac7633" + "sha256:5e1ab03eaae06ef6ce23859402de785f08d97780ed774948ef16c4652c41bc62", + "sha256:f845868b3a3a77a2489d226568abe7328b5c2d4f6a011cc759dfa99144a521f0" ], - "version": "==3.2.0" + "version": "==3.2.2" }, "toml": { "hashes": [ diff --git a/requirements-dev.txt b/requirements-dev.txt index e97c7dbc..81de83a1 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -4,44 +4,44 @@ astroid==2.4.2 async-asgi-testclient==1.4.4 async-generator==1.10 asyncmock==0.4.2 -attrs==19.3.0 +attrs==20.2.0 bandit==1.6.2 black==19.10b0 certifi==2020.6.20 chardet==3.0.4 click==7.1.2 -coverage==5.2.1 -coveralls==2.1.1 +coverage==5.3 +coveralls==2.1.2 docopt==0.6.2 gitdb==4.0.5 -gitpython==3.1.7 +gitpython==3.1.8 idna==2.10 importlib-metadata==1.7.0 ; python_version < '3.8' iniconfig==1.0.1 invoke==1.4.1 -isort==4.3.21 +isort==5.5.2 lazy-object-proxy==1.4.3 mccabe==0.6.1 mock==4.0.2 -more-itertools==8.4.0 +more-itertools==8.5.0 multidict==4.7.6 packaging==20.4 pathspec==0.8.0 -pbr==5.4.5 +pbr==5.5.0 pluggy==0.13.1 py==1.9.0 -pylint==2.5.3 +pylint==2.6.0 pyparsing==2.4.7 pytest-asyncio==0.14.0 -pytest-cov==2.10.0 -pytest==6.0.1 +pytest-cov==2.10.1 +pytest==6.0.2 pyyaml==5.3.1 regex==2020.7.14 requests==2.24.0 -responses==0.10.15 +responses==0.12.0 six==1.15.0 smmap==3.0.4 -stevedore==3.2.0 +stevedore==3.2.2 toml==0.10.1 typed-ast==1.4.1 urllib3[secure]==1.25.10 ; python_version >= '3.5' diff --git a/requirements.txt b/requirements.txt index 6ad59401..14706151 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,15 +6,15 @@ aioredis==1.3.1 asgiref==3.2.10 ; python_version >= '3.5' async-timeout==3.0.1 asyncache==0.1.1 -attrs==19.3.0 +attrs==20.2.0 cachetools==4.1.1 certifi==2020.6.20 -cffi==1.14.1 +cffi==1.14.2 chardet==3.0.4 click==7.1.2 -cryptography==3.0 +cryptography==3.1 dataclasses==0.6 ; python_version < '3.7' -fastapi==0.60.1 +fastapi==0.61.1 gunicorn==20.0.4 h11==0.9.0 hiredis==1.1.0 @@ -29,8 +29,8 @@ pyopenssl==19.1.0 python-dateutil==2.8.1 python-dotenv==0.14.0 requests==2.24.0 -scout-apm==2.15.2 -sentry-sdk==0.16.2 +scout-apm==2.16.1 +sentry-sdk==0.17.4 six==1.15.0 starlette==0.13.6 urllib3[secure]==1.25.10 ; python_version >= '3.5' diff --git a/tasks.py b/tasks.py index 0f6d6995..0aba7b92 100644 --- a/tasks.py +++ b/tasks.py @@ -20,7 +20,7 @@ def sort(ctx, targets="."): """Sort module imports.""" print("sorting imports ...") - args = ["isort", "-rc", "--atomic", targets] + args = ["isort", "--atomic", targets] ctx.run(" ".join(args)) @@ -40,7 +40,7 @@ def check(ctx, fmt=False, sort=False, diff=False): # pylint: disable=redefined- sort = True fmt_args = ["black", "--check", "."] - sort_args = ["isort", "-rc", "--check", "."] + sort_args = ["isort", "--check", "."] if diff: fmt_args.append("--diff") diff --git a/tests/test_countries.py b/tests/test_countries.py index e28fb469..a9ce9c19 100644 --- a/tests/test_countries.py +++ b/tests/test_countries.py @@ -2,7 +2,6 @@ from app.utils import countries - """ Todo: * Test cases for capturing of stdout/stderr From 239c3bfe7516768e24d31a693d54edb39720a536 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Thu, 29 Oct 2020 08:44:42 -0400 Subject: [PATCH 24/26] fix ValueError --- app/services/location/jhu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/location/jhu.py b/app/services/location/jhu.py index f252bf80..ebed3960 100644 --- a/app/services/location/jhu.py +++ b/app/services/location/jhu.py @@ -85,7 +85,7 @@ async def get_category(category): dates = dict(filter(lambda element: date_util.is_date(element[0]), item.items())) # Make location history from dates. - history = {date: int(amount or 0) for date, amount in dates.items()} + history = {date: int(float(amount or 0)) for date, amount in dates.items()} # Country for this location. country = item["Country/Region"] From a9816e996653ebd8a676d26385f0bc1e36113c41 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Sat, 13 Mar 2021 18:44:40 -0500 Subject: [PATCH 25/26] add StatusCake uptime monitoring --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 7355d0af..2efd7f02 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ Coronavirus Tracker API + Provides up-to-date data about Coronavirus outbreak. Includes numbers about confirmed cases, deaths and recovered. Support multiple data-sources. @@ -18,6 +19,8 @@ Support multiple data-sources. [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![Tweet](https://img.shields.io/twitter/url?url=https%3A%2F%2Fgithub.com%2FExpDev07%2Fcoronavirus-tracker-api)](https://twitter.com/intent/tweet?text=COVID19%20Live%20Tracking%20API:%20&url=https%3A%2F%2Fgithub.com%2FExpDev07%2Fcoronavirus-tracker-api) + + **Live global stats (provided by [fight-covid19/bagdes](https://github.com/fight-covid19/bagdes)) from this API:** ![Covid-19 Confirmed](https://covid19-badges.herokuapp.com/confirmed/latest) From 578b60ed1de2197aa86a3bf5339ebd2e5d5d0688 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Sat, 20 Mar 2021 22:45:58 -0400 Subject: [PATCH 26/26] revert to 1 hour cache --- app/services/location/csbs.py | 2 +- app/services/location/jhu.py | 4 ++-- app/services/location/nyt.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/services/location/csbs.py b/app/services/location/csbs.py index 444ebad6..1d313065 100644 --- a/app/services/location/csbs.py +++ b/app/services/location/csbs.py @@ -35,7 +35,7 @@ async def get(self, loc_id): # pylint: disable=arguments-differ BASE_URL = "https://facts.csbs.org/covid-19/covid19_county.csv" -@cached(cache=TTLCache(maxsize=1, ttl=1800)) +@cached(cache=TTLCache(maxsize=1, ttl=3600)) async def get_locations(): """ Retrieves county locations; locations are cached for 1 hour diff --git a/app/services/location/jhu.py b/app/services/location/jhu.py index ebed3960..5709a8d5 100644 --- a/app/services/location/jhu.py +++ b/app/services/location/jhu.py @@ -44,7 +44,7 @@ async def get(self, loc_id): # pylint: disable=arguments-differ BASE_URL = "https://raw.githubusercontent.com/CSSEGISandData/2019-nCoV/master/csse_covid_19_data/csse_covid_19_time_series/" -@cached(cache=TTLCache(maxsize=4, ttl=1800)) +@cached(cache=TTLCache(maxsize=4, ttl=3600)) async def get_category(category): """ Retrieves the data for the provided category. The data is cached for 30 minutes locally, 1 hour via shared Redis. @@ -127,7 +127,7 @@ async def get_category(category): return results -@cached(cache=TTLCache(maxsize=1, ttl=1800)) +@cached(cache=TTLCache(maxsize=1, ttl=3600)) async def get_locations(): """ Retrieves the locations from the categories. The locations are cached for 1 hour. diff --git a/app/services/location/nyt.py b/app/services/location/nyt.py index 1f25ec34..ace66d06 100644 --- a/app/services/location/nyt.py +++ b/app/services/location/nyt.py @@ -67,7 +67,7 @@ def get_grouped_locations_dict(data): return grouped_locations -@cached(cache=TTLCache(maxsize=1, ttl=1800)) +@cached(cache=TTLCache(maxsize=1, ttl=3600)) async def get_locations(): """ Returns a list containing parsed NYT data by US county. The data is cached for 1 hour.