From 91ba8b399f2e5c1369476f1b1bb4746edd76c47b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 18 Dec 2023 17:10:28 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- observer/ioc/fs.py | 5 +- observer/ioc/scraper.py | 8 +- observer/notify.py | 1 - requirements/requirements-dev.txt | 306 +++++++++++++++--------------- requirements/requirements.txt | 233 ++++++++++++----------- tests/cli_test.py | 1 + tests/test_ioc.py | 19 +- 7 files changed, 295 insertions(+), 278 deletions(-) diff --git a/observer/ioc/fs.py b/observer/ioc/fs.py index 0a32603..0d1ad17 100644 --- a/observer/ioc/fs.py +++ b/observer/ioc/fs.py @@ -108,5 +108,8 @@ def list_ioc_stations( credential: CredentialAIO | None = None, ) -> list[str]: fs = get_obs_fs(credential=credential) - existing = [parquet.split("/")[-1].split(".")[0] for parquet in fs.ls(f"{get_settings().container_name}/ioc/stations")] + existing = [ + parquet.split("/")[-1].split(".")[0] + for parquet in fs.ls(f"{get_settings().container_name}/ioc/stations") + ] return existing diff --git a/observer/ioc/scraper.py b/observer/ioc/scraper.py index 19419f8..a4358a4 100644 --- a/observer/ioc/scraper.py +++ b/observer/ioc/scraper.py @@ -130,7 +130,7 @@ def retrieve_ioc_data( url=url, client=http_client, rate_limit=rate_limit, - ) + ), ) with http_client: logger.debug("Starting data retrieval") @@ -138,7 +138,7 @@ def retrieve_ioc_data( func=fetch_url, func_kwargs=kwargs, check=False, - n_workers=n_threads + n_workers=n_threads, ) logger.debug("Finished data retrieval") multifutures.check_results(results) @@ -197,7 +197,7 @@ def group_results( logger.debug("%s: Unique timestamps: %d", ioc_code, len(df)) else: logger.warning("%s: No data. Creating a dummy dataframe", ioc_code) - df = pd.DataFrame(columns=["time"], dtype='datetime64[ns]').set_index("time") + df = pd.DataFrame(columns=["time"], dtype="datetime64[ns]").set_index("time") dataframes[ioc_code] = df logger.debug("%s: Finished conversion to pandas", ioc_code) @@ -233,7 +233,7 @@ def scrape_ioc( # This is a CPU heavy process, so we are using multiprocessing here parsed_responses: list[multifutures.FutureResult] = parse_ioc_responses( ioc_responses=ioc_responses, - n_processes=n_processes + n_processes=n_processes, ) # OK, now we have a list of dataframes. We need to group them per ioc_code, concatenate them and remove duplicates diff --git a/observer/notify.py b/observer/notify.py index 6f33e3e..cc7976b 100644 --- a/observer/notify.py +++ b/observer/notify.py @@ -1,6 +1,5 @@ from __future__ import annotations - import functools import logging diff --git a/requirements/requirements-dev.txt b/requirements/requirements-dev.txt index 4bccf7b..ccf76b0 100644 --- a/requirements/requirements-dev.txt +++ b/requirements/requirements-dev.txt @@ -1,149 +1,157 @@ -adlfs==2023.10.0 ; python_version >= "3.10" and python_version < "4.0" -aiohttp==3.9.1 ; python_version >= "3.10" and python_version < "4.0" -aiosignal==1.3.1 ; python_version >= "3.10" and python_version < "4.0" -annotated-types==0.6.0 ; python_version >= "3.10" and python_version < "4.0" -anyio==4.1.0 ; python_version >= "3.10" and python_version < "4.0" -appnope==0.1.3 ; python_version >= "3.10" and python_version < "4.0" and platform_system == "Darwin" -asciitree==0.3.3 ; python_version >= "3.10" and python_version < "4.0" -asttokens==2.4.1 ; python_version >= "3.10" and python_version < "4.0" -async-timeout==4.0.3 ; python_version >= "3.10" and python_version < "3.11" -attrs==23.1.0 ; python_version >= "3.10" and python_version < "4.0" -azure-common==1.1.28 ; python_version >= "3.10" and python_version < "4.0" -azure-core==1.29.5 ; python_version >= "3.10" and python_version < "4.0" -azure-datalake-store==0.0.53 ; python_version >= "3.10" and python_version < "4.0" -azure-identity==1.15.0 ; python_version >= "3.10" and python_version < "4.0" -azure-keyvault-certificates==4.7.0 ; python_version >= "3.10" and python_version < "4.0" -azure-keyvault-keys==4.8.0 ; python_version >= "3.10" and python_version < "4.0" -azure-keyvault-secrets==4.7.0 ; python_version >= "3.10" and python_version < "4.0" -azure-keyvault==4.2.0 ; python_version >= "3.10" and python_version < "4.0" -azure-storage-blob==12.19.0 ; python_version >= "3.10" and python_version < "4.0" -beautifulsoup4==4.12.2 ; python_version >= "3.10" and python_version < "4.0" -bottleneck==1.3.7 ; python_version >= "3.10" and python_version < "4.0" -certifi==2023.11.17 ; python_version >= "3.10" and python_version < "4.0" -cffi==1.16.0 ; python_version >= "3.10" and python_version < "4.0" -cftime==1.6.3 ; python_version >= "3.10" and python_version < "4.0" -charset-normalizer==3.3.2 ; python_version >= "3.10" and python_version < "4.0" -click-plugins==1.1.1 ; python_version >= "3.10" and python_version < "4.0" -click==8.1.7 ; python_version >= "3.10" and python_version < "4.0" -cligj==0.7.2 ; python_version >= "3.10" and python_version < "4" -cloudpickle==3.0.0 ; python_version >= "3.10" and python_version < "4.0" -colorama==0.4.6 ; python_version >= "3.10" and python_version < "4.0" -comm==0.2.0 ; python_version >= "3.10" and python_version < "4.0" -coverage[toml]==7.3.2 ; python_version >= "3.10" and python_version < "4.0" -cramjam==2.7.0 ; python_version >= "3.10" and python_version < "4.0" -cryptography==41.0.7 ; python_version >= "3.10" and python_version < "4.0" -dask[complete]==2023.12.0 ; python_version >= "3.10" and python_version < "4.0" -dataretrieval==1.0.6 ; python_version >= "3.10" and python_version < "4.0" -debugpy==1.8.0 ; python_version >= "3.10" and python_version < "4.0" -decorator==5.1.1 ; python_version >= "3.10" and python_version < "4.0" -deprecated==1.2.14 ; python_version >= "3.10" and python_version < "4.0" -erddapy==2.2.0 ; python_version >= "3.10" and python_version < "4.0" -exceptiongroup==1.2.0 ; python_version >= "3.10" and python_version < "3.11" -executing==2.0.1 ; python_version >= "3.10" and python_version < "4.0" -fasteners==0.19 ; python_version >= "3.10" and python_version < "4.0" -fastparquet==2023.10.1 ; python_version >= "3.10" and python_version < "4.0" -fiona==1.9.5 ; python_version >= "3.10" and python_version < "4.0" -flox==0.8.5 ; python_version >= "3.10" and python_version < "4.0" -frozenlist==1.4.0 ; python_version >= "3.10" and python_version < "4.0" -fsspec==2023.12.1 ; python_version >= "3.10" and python_version < "4.0" -geopandas==0.14.1 ; python_version >= "3.10" and python_version < "4.0" -h11==0.14.0 ; python_version >= "3.10" and python_version < "4.0" -h5netcdf==1.3.0 ; python_version >= "3.10" and python_version < "4.0" -h5py==3.10.0 ; python_version >= "3.10" and python_version < "4.0" -html5lib==1.1 ; python_version >= "3.10" and python_version < "4.0" -httpcore==1.0.2 ; python_version >= "3.10" and python_version < "4.0" -httpx==0.25.2 ; python_version >= "3.10" and python_version < "4.0" -idna==3.6 ; python_version >= "3.10" and python_version < "4.0" -importlib-metadata==7.0.0 ; python_version >= "3.10" and python_version < "4.0" -importlib-resources==6.1.1 ; python_version >= "3.10" and python_version < "4.0" -iniconfig==2.0.0 ; python_version >= "3.10" and python_version < "4.0" -ipdb==0.13.13 ; python_version >= "3.10" and python_version < "4.0" -ipykernel==6.27.1 ; python_version >= "3.10" and python_version < "4.0" -ipython==8.18.1 ; python_version >= "3.10" and python_version < "4.0" -isodate==0.6.1 ; python_version >= "3.10" and python_version < "4.0" -jedi==0.19.1 ; python_version >= "3.10" and python_version < "4.0" -jupyter-client==8.6.0 ; python_version >= "3.10" and python_version < "4.0" -jupyter-core==5.5.0 ; python_version >= "3.10" and python_version < "4.0" -limits==3.7.0 ; python_version >= "3.10" and python_version < "4.0" -llvmlite==0.41.1 ; python_version >= "3.10" and python_version < "4.0" -locket==1.0.0 ; python_version >= "3.10" and python_version < "4.0" -lxml==4.9.3 ; python_version >= "3.10" and python_version < "4.0" -lz4==4.3.2 ; python_version >= "3.10" and python_version < "4.0" -markdown-it-py==3.0.0 ; python_version >= "3.10" and python_version < "4.0" -matplotlib-inline==0.1.6 ; python_version >= "3.10" and python_version < "4.0" -mdurl==0.1.2 ; python_version >= "3.10" and python_version < "4.0" -msal-extensions==1.1.0 ; python_version >= "3.10" and python_version < "4.0" -msal==1.26.0 ; python_version >= "3.10" and python_version < "4.0" -multidict==6.0.4 ; python_version >= "3.10" and python_version < "4.0" -multifutures==0.1.2 ; python_version >= "3.10" and python_version < "4.0" -mypy-extensions==1.0.0 ; python_version >= "3.10" and python_version < "4.0" -mypy==1.7.1 ; python_version >= "3.10" and python_version < "4.0" -nest-asyncio==1.5.8 ; python_version >= "3.10" and python_version < "4.0" -netcdf4==1.6.5 ; python_version >= "3.10" and python_version < "4.0" -numba==0.58.1 ; python_version >= "3.10" and python_version < "4.0" -numbagg==0.6.7 ; python_version >= "3.10" and python_version < "4.0" -numcodecs==0.12.1 ; python_version >= "3.10" and python_version < "4.0" -numpy-groupies==0.10.2 ; python_version >= "3.10" and python_version < "4.0" -numpy==1.26.2 ; python_version >= "3.10" and python_version < "4.0" -opt-einsum==3.3.0 ; python_version >= "3.10" and python_version < "4.0" -packaging==23.2 ; python_version >= "3.10" and python_version < "4.0" -pandas-stubs==2.1.1.230928 ; python_version >= "3.10" and python_version < "4.0" -pandas==2.1.4 ; python_version >= "3.10" and python_version < "4.0" -parso==0.8.3 ; python_version >= "3.10" and python_version < "4.0" -partd==1.4.1 ; python_version >= "3.10" and python_version < "4.0" -pexpect==4.9.0 ; python_version >= "3.10" and python_version < "4.0" and sys_platform != "win32" -platformdirs==4.1.0 ; python_version >= "3.10" and python_version < "4.0" -pluggy==1.3.0 ; python_version >= "3.10" and python_version < "4.0" -pooch==1.8.0 ; python_version >= "3.10" and python_version < "4.0" -portalocker==2.8.2 ; python_version >= "3.10" and python_version < "4.0" -prompt-toolkit==3.0.41 ; python_version >= "3.10" and python_version < "4.0" -psutil==5.9.6 ; python_version >= "3.10" and python_version < "4.0" -ptyprocess==0.7.0 ; python_version >= "3.10" and python_version < "4.0" and sys_platform != "win32" -pure-eval==0.2.2 ; python_version >= "3.10" and python_version < "4.0" -pyarrow-hotfix==0.6 ; python_version >= "3.10" and python_version < "4.0" -pyarrow==14.0.1 ; python_version >= "3.10" and python_version < "4.0" -pycparser==2.21 ; python_version >= "3.10" and python_version < "4.0" -pydantic-core==2.14.5 ; python_version >= "3.10" and python_version < "4.0" -pydantic-settings==2.1.0 ; python_version >= "3.10" and python_version < "4.0" -pydantic==2.5.2 ; python_version >= "3.10" and python_version < "4.0" -pygments==2.17.2 ; python_version >= "3.10" and python_version < "4.0" -pyjwt[crypto]==2.8.0 ; python_version >= "3.10" and python_version < "4.0" -pyproj==3.6.1 ; python_version >= "3.10" and python_version < "4.0" -pytest-cov==4.1.0 ; python_version >= "3.10" and python_version < "4.0" -pytest==7.4.3 ; python_version >= "3.10" and python_version < "4.0" -python-dateutil==2.8.2 ; python_version >= "3.10" and python_version < "4.0" -python-dotenv==1.0.0 ; python_version >= "3.10" and python_version < "4.0" -pytz==2023.3.post1 ; python_version >= "3.10" and python_version < "4.0" -pywin32==306 ; python_version >= "3.10" and python_version < "4.0" and (sys_platform == "win32" or platform_system == "Windows") and (platform_python_implementation != "PyPy" or platform_system == "Windows") -pyyaml==6.0.1 ; python_version >= "3.10" and python_version < "4.0" -pyzmq==25.1.2 ; python_version >= "3.10" and python_version < "4.0" -requests==2.31.0 ; python_version >= "3.10" and python_version < "4.0" -rich==13.7.0 ; python_version >= "3.10" and python_version < "4.0" -scipy==1.11.4 ; python_version >= "3.10" and python_version < "4.0" -searvey==0.3.1 ; python_version >= "3.10" and python_version < "4.0" -setuptools==69.0.2 ; python_version >= "3.10" and python_version < "4.0" -shapely==2.0.2 ; python_version >= "3.10" and python_version < "4.0" -shellingham==1.5.4 ; python_version >= "3.10" and python_version < "4.0" -six==1.16.0 ; python_version >= "3.10" and python_version < "4.0" -sniffio==1.3.0 ; python_version >= "3.10" and python_version < "4.0" -soupsieve==2.5 ; python_version >= "3.10" and python_version < "4.0" -stack-data==0.6.3 ; python_version >= "3.10" and python_version < "4.0" -tenacity==8.2.3 ; python_version >= "3.10" and python_version < "4.0" -tomli==2.0.1 ; python_version >= "3.10" and python_full_version <= "3.11.0a6" -toolz==0.12.0 ; python_version >= "3.10" and python_version < "4.0" -tornado==6.4 ; python_version >= "3.10" and python_version < "4.0" -tqdm==4.66.1 ; python_version >= "3.10" and python_version < "4.0" -traitlets==5.14.0 ; python_version >= "3.10" and python_version < "4.0" -typer[all]==0.9.0 ; python_version >= "3.10" and python_version < "4.0" -types-pytz==2023.3.1.1 ; python_version >= "3.10" and python_version < "4.0" -typing-extensions==4.8.0 ; python_version >= "3.10" and python_version < "4.0" -tzdata==2023.3 ; python_version >= "3.10" and python_version < "4.0" -urllib3==2.1.0 ; python_version >= "3.10" and python_version < "4.0" -wcwidth==0.2.12 ; python_version >= "3.10" and python_version < "4.0" -webencodings==0.5.1 ; python_version >= "3.10" and python_version < "4.0" -wrapt==1.16.0 ; python_version >= "3.10" and python_version < "4.0" -xarray==2023.12.0 ; python_version >= "3.10" and python_version < "4.0" -xarray[accel,io,parallel]==2023.12.0 ; python_version >= "3.10" and python_version < "4.0" -yarl==1.9.4 ; python_version >= "3.10" and python_version < "4.0" -zarr==2.16.1 ; python_version >= "3.10" and python_version < "4.0" -zipp==3.17.0 ; python_version >= "3.10" and python_version < "4.0" +adlfs==2023.10.0 ; python_version >= "3.9" and python_version < "4" +aiohttp==3.9.1 ; python_version >= "3.9" and python_version < "4" +aiosignal==1.3.1 ; python_version >= "3.9" and python_version < "4" +annotated-types==0.6.0 ; python_version >= "3.9" and python_version < "4.0" +anyio==4.1.0 ; python_version >= "3.9" and python_version < "4" +appnope==0.1.3 ; python_version >= "3.9" and python_version < "4" and platform_system == "Darwin" +asciitree==0.3.3 ; python_version >= "3.9" and python_version < "4" +asttokens==2.4.1 ; python_version >= "3.9" and python_version < "4" +async-timeout==4.0.3 ; python_version >= "3.9" and python_version < "3.11" +attrs==23.1.0 ; python_version >= "3.9" and python_version < "4" +azure-common==1.1.28 ; python_version >= "3.9" and python_version < "4" +azure-core==1.29.5 ; python_version >= "3.9" and python_version < "4" +azure-datalake-store==0.0.53 ; python_version >= "3.9" and python_version < "4" +azure-identity==1.15.0 ; python_version >= "3.9" and python_version < "4" +azure-keyvault-certificates==4.7.0 ; python_version >= "3.9" and python_version < "4" +azure-keyvault-keys==4.8.0 ; python_version >= "3.9" and python_version < "4" +azure-keyvault-secrets==4.7.0 ; python_version >= "3.9" and python_version < "4" +azure-keyvault==4.2.0 ; python_version >= "3.9" and python_version < "4" +azure-storage-blob==12.19.0 ; python_version >= "3.9" and python_version < "4" +beautifulsoup4==4.12.2 ; python_version >= "3.9" and python_version < "4.0" +bottleneck==1.3.7 ; python_version >= "3.9" and python_version < "4" +certifi==2023.11.17 ; python_version >= "3.9" and python_version < "4" +cffi==1.16.0 ; python_version >= "3.9" and python_version < "4" +cftime==1.6.3 ; python_version >= "3.9" and python_version < "4" +charset-normalizer==3.3.2 ; python_version >= "3.9" and python_version < "4.0" +click-plugins==1.1.1 ; python_version >= "3.9" and python_version < "4.0" +click==8.1.7 ; python_version >= "3.9" and python_version < "4" +cligj==0.7.2 ; python_version >= "3.9" and python_version < "4" +cloudpickle==3.0.0 ; python_version >= "3.9" and python_version < "4" +colorama==0.4.6 ; python_version >= "3.9" and python_version < "4" +comm==0.2.0 ; python_version >= "3.9" and python_version < "4" +covdefaults==2.3.0 ; python_version >= "3.9" and python_version < "4" +coverage==7.3.2 ; python_version >= "3.9" and python_version < "4" +coverage[toml]==7.3.2 ; python_version >= "3.9" and python_version < "4" +cramjam==2.7.0 ; python_version >= "3.9" and python_version < "4" +cryptography==41.0.7 ; python_version >= "3.9" and python_version < "4" +dask[complete]==2023.12.0 ; python_version >= "3.9" and python_version < "4" +dataretrieval==1.0.6 ; python_version >= "3.9" and python_version < "4.0" +debugpy==1.8.0 ; python_version >= "3.9" and python_version < "4" +decorator==5.1.1 ; python_version >= "3.9" and python_version < "4" +deprecated==1.2.14 ; python_version >= "3.9" and python_version < "4.0" +devtools==0.12.2 ; python_version >= "3.9" and python_version < "4" +docopt==0.6.2 ; python_version < "3.10" and python_version >= "3.9" +erddapy==2.2.0 ; python_version >= "3.9" and python_version < "4.0" +exceptiongroup==1.2.0 ; python_version >= "3.9" and python_version < "3.11" +executing==2.0.1 ; python_version >= "3.9" and python_version < "4" +fasteners==0.19 ; python_version >= "3.9" and python_version < "4" +fastparquet==2023.10.1 ; python_version >= "3.9" and python_version < "4" +fiona==1.9.5 ; python_version >= "3.9" and python_version < "4.0" +flox==0.8.5 ; python_version >= "3.9" and python_version < "4" +frozenlist==1.4.0 ; python_version >= "3.9" and python_version < "4" +fsspec==2023.12.2 ; python_version >= "3.9" and python_version < "4" +geopandas==0.14.1 ; python_version >= "3.9" and python_version < "4.0" +h11==0.14.0 ; python_version >= "3.9" and python_version < "4" +h5netcdf==1.3.0 ; python_version >= "3.9" and python_version < "4" +h5py==3.10.0 ; python_version >= "3.9" and python_version < "4" +html5lib==1.1 ; python_version >= "3.9" and python_version < "4.0" +httpcore==1.0.2 ; python_version >= "3.9" and python_version < "4" +httpx==0.25.2 ; python_version >= "3.9" and python_version < "4" +idna==3.6 ; python_version >= "3.9" and python_version < "4" +importlib-metadata==7.0.0 ; python_version >= "3.9" and python_version < "4" +importlib-resources==6.1.1 ; python_version >= "3.9" and python_version < "4.0" +iniconfig==2.0.0 ; python_version >= "3.9" and python_version < "4" +ipdb==0.13.13 ; python_version >= "3.9" and python_version < "4" +ipykernel==6.27.1 ; python_version >= "3.9" and python_version < "4" +ipython==8.18.1 ; python_version >= "3.9" and python_version < "4" +isodate==0.6.1 ; python_version >= "3.9" and python_version < "4" +jedi==0.19.1 ; python_version >= "3.9" and python_version < "4" +jinja2==3.1.2 ; python_version < "3.10" and python_version >= "3.9" +jupyter-client==8.6.0 ; python_version >= "3.9" and python_version < "4" +jupyter-core==5.5.0 ; python_version >= "3.9" and python_version < "4" +limits==3.7.0 ; python_version >= "3.9" and python_version < "4.0" +llvmlite==0.41.1 ; python_version >= "3.9" and python_version < "4" +locket==1.0.0 ; python_version >= "3.9" and python_version < "4" +lxml==4.9.3 ; python_version >= "3.9" and python_version < "4.0" +lz4==4.3.2 ; python_version >= "3.9" and python_version < "4" +markdown-it-py==3.0.0 ; python_version >= "3.9" and python_version < "4" +markupsafe==2.1.3 ; python_version < "3.10" and python_version >= "3.9" +matplotlib-inline==0.1.6 ; python_version >= "3.9" and python_version < "4" +mdurl==0.1.2 ; python_version >= "3.9" and python_version < "4" +msal-extensions==1.1.0 ; python_version >= "3.9" and python_version < "4" +msal==1.26.0 ; python_version >= "3.9" and python_version < "4" +multidict==6.0.4 ; python_version >= "3.9" and python_version < "4" +multifutures==0.2.0 ; python_version >= "3.9" and python_version < "4.0" +mypy-extensions==1.0.0 ; python_version >= "3.9" and python_version < "4" +mypy==1.7.1 ; python_version >= "3.9" and python_version < "4" +nest-asyncio==1.5.8 ; python_version >= "3.9" and python_version < "4" +netcdf4==1.6.5 ; python_version >= "3.9" and python_version < "4" +numba==0.58.1 ; python_version >= "3.9" and python_version < "4" +numbagg==0.6.7 ; python_version >= "3.9" and python_version < "4" +numcodecs==0.12.1 ; python_version >= "3.9" and python_version < "4" +numpy-groupies==0.10.2 ; python_version >= "3.9" and python_version < "4" +numpy==1.26.2 ; python_version >= "3.9" and python_version < "4" +opt-einsum==3.3.0 ; python_version >= "3.9" and python_version < "4" +packaging==23.2 ; python_version >= "3.9" and python_version < "4" +pandas-stubs==2.1.1.230928 ; python_version >= "3.9" and python_version < "4" +pandas==2.1.4 ; python_version >= "3.9" and python_version < "4" +parso==0.8.3 ; python_version >= "3.9" and python_version < "4" +partd==1.4.1 ; python_version >= "3.9" and python_version < "4" +pexpect==4.9.0 ; python_version >= "3.9" and python_version < "4" and sys_platform != "win32" +platformdirs==4.1.0 ; python_version >= "3.9" and python_version < "4" +pluggy==1.3.0 ; python_version >= "3.9" and python_version < "4" +pooch==1.8.0 ; python_version >= "3.9" and python_version < "4" +portalocker==2.8.2 ; python_version >= "3.9" and python_version < "4" +prompt-toolkit==3.0.43 ; python_version >= "3.9" and python_version < "4" +psutil==5.9.6 ; python_version >= "3.9" and python_version < "4" +ptyprocess==0.7.0 ; python_version >= "3.9" and python_version < "4" and sys_platform != "win32" +pure-eval==0.2.2 ; python_version >= "3.9" and python_version < "4" +pyarrow-hotfix==0.6 ; python_version >= "3.9" and python_version < "4" +pyarrow==14.0.1 ; python_version >= "3.9" and python_version < "4" +pycparser==2.21 ; python_version >= "3.9" and python_version < "4" +pydantic-core==2.14.5 ; python_version >= "3.9" and python_version < "4.0" +pydantic-settings==2.1.0 ; python_version >= "3.9" and python_version < "4" +pydantic==2.5.2 ; python_version >= "3.9" and python_version < "4.0" +pydap==3.4.1 ; python_version < "3.10" and python_version >= "3.9" +pygments==2.17.2 ; python_version >= "3.9" and python_version < "4" +pyjwt[crypto]==2.8.0 ; python_version >= "3.9" and python_version < "4" +pyproj==3.6.1 ; python_version >= "3.9" and python_version < "4.0" +pytest-cov==4.1.0 ; python_version >= "3.9" and python_version < "4" +pytest==7.4.3 ; python_version >= "3.9" and python_version < "4" +python-dateutil==2.8.2 ; python_version >= "3.9" and python_version < "4" +python-dotenv==1.0.0 ; python_version >= "3.9" and python_version < "4" +pytz==2023.3.post1 ; python_version >= "3.9" and python_version < "4" +pywin32==306 ; python_version >= "3.9" and python_version < "4" and (sys_platform == "win32" or platform_system == "Windows") and (platform_python_implementation != "PyPy" or platform_system == "Windows") +pyyaml==6.0.1 ; python_version >= "3.9" and python_version < "4" +pyzmq==25.1.2 ; python_version >= "3.9" and python_version < "4" +requests==2.31.0 ; python_version >= "3.9" and python_version < "4.0" +rich==13.7.0 ; python_version >= "3.9" and python_version < "4" +scipy==1.11.4 ; python_version >= "3.9" and python_version < "4" +searvey==0.3.1 ; python_version >= "3.9" and python_version < "4.0" +setuptools==69.0.2 ; python_version >= "3.9" and python_version < "4.0" +shapely==2.0.2 ; python_version >= "3.9" and python_version < "4.0" +shellingham==1.5.4 ; python_version >= "3.9" and python_version < "4" +six==1.16.0 ; python_version >= "3.9" and python_version < "4" +sniffio==1.3.0 ; python_version >= "3.9" and python_version < "4" +soupsieve==2.5 ; python_version >= "3.9" and python_version < "4.0" +stack-data==0.6.3 ; python_version >= "3.9" and python_version < "4" +tenacity==8.2.3 ; python_version >= "3.9" and python_version < "4" +tomli==2.0.1 ; python_full_version <= "3.11.0a6" and python_version >= "3.9" +toolz==0.12.0 ; python_version >= "3.9" and python_version < "4" +tornado==6.4 ; python_version >= "3.9" and python_version < "4" +tqdm==4.66.1 ; python_version >= "3.9" and python_version < "4.0" +traitlets==5.14.0 ; python_version >= "3.9" and python_version < "4" +typer[all]==0.9.0 ; python_version >= "3.9" and python_version < "4" +types-pytz==2023.3.1.1 ; python_version >= "3.9" and python_version < "4" +typing-extensions==4.9.0 ; python_version >= "3.9" and python_version < "4" +tzdata==2023.3 ; python_version >= "3.9" and python_version < "4" +urllib3==2.1.0 ; python_version >= "3.9" and python_version < "4.0" +wcwidth==0.2.12 ; python_version >= "3.9" and python_version < "4" +webencodings==0.5.1 ; python_version >= "3.9" and python_version < "4.0" +webob==1.8.7 ; python_version >= "3.9" and python_version < "3.10" +wrapt==1.16.0 ; python_version >= "3.9" and python_version < "4.0" +xarray==2023.12.0 ; python_version >= "3.9" and python_version < "4.0" +xarray[accel,io,parallel]==2023.12.0 ; python_version >= "3.9" and python_version < "4" +yarl==1.9.4 ; python_version >= "3.9" and python_version < "4" +zarr==2.16.1 ; python_version >= "3.9" and python_version < "4" +zipp==3.17.0 ; python_version >= "3.9" and python_version < "4" diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 76c80ae..a6674ad 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -1,114 +1,119 @@ -adlfs==2023.10.0 ; python_version >= "3.10" and python_version < "4.0" -aiohttp==3.9.1 ; python_version >= "3.10" and python_version < "4.0" -aiosignal==1.3.1 ; python_version >= "3.10" and python_version < "4.0" -annotated-types==0.6.0 ; python_version >= "3.10" and python_version < "4.0" -anyio==4.1.0 ; python_version >= "3.10" and python_version < "4.0" -asciitree==0.3.3 ; python_version >= "3.10" and python_version < "4.0" -async-timeout==4.0.3 ; python_version >= "3.10" and python_version < "3.11" -attrs==23.1.0 ; python_version >= "3.10" and python_version < "4.0" -azure-common==1.1.28 ; python_version >= "3.10" and python_version < "4.0" -azure-core==1.29.5 ; python_version >= "3.10" and python_version < "4.0" -azure-datalake-store==0.0.53 ; python_version >= "3.10" and python_version < "4.0" -azure-identity==1.15.0 ; python_version >= "3.10" and python_version < "4.0" -azure-keyvault-certificates==4.7.0 ; python_version >= "3.10" and python_version < "4.0" -azure-keyvault-keys==4.8.0 ; python_version >= "3.10" and python_version < "4.0" -azure-keyvault-secrets==4.7.0 ; python_version >= "3.10" and python_version < "4.0" -azure-keyvault==4.2.0 ; python_version >= "3.10" and python_version < "4.0" -azure-storage-blob==12.19.0 ; python_version >= "3.10" and python_version < "4.0" -beautifulsoup4==4.12.2 ; python_version >= "3.10" and python_version < "4.0" -bottleneck==1.3.7 ; python_version >= "3.10" and python_version < "4.0" -certifi==2023.11.17 ; python_version >= "3.10" and python_version < "4.0" -cffi==1.16.0 ; python_version >= "3.10" and python_version < "4.0" -cftime==1.6.3 ; python_version >= "3.10" and python_version < "4.0" -charset-normalizer==3.3.2 ; python_version >= "3.10" and python_version < "4.0" -click-plugins==1.1.1 ; python_version >= "3.10" and python_version < "4.0" -click==8.1.7 ; python_version >= "3.10" and python_version < "4.0" -cligj==0.7.2 ; python_version >= "3.10" and python_version < "4" -cloudpickle==3.0.0 ; python_version >= "3.10" and python_version < "4.0" -colorama==0.4.6 ; python_version >= "3.10" and python_version < "4.0" -cramjam==2.7.0 ; python_version >= "3.10" and python_version < "4.0" -cryptography==41.0.7 ; python_version >= "3.10" and python_version < "4.0" -dask[complete]==2023.12.0 ; python_version >= "3.10" and python_version < "4.0" -dataretrieval==1.0.6 ; python_version >= "3.10" and python_version < "4.0" -deprecated==1.2.14 ; python_version >= "3.10" and python_version < "4.0" -erddapy==2.2.0 ; python_version >= "3.10" and python_version < "4.0" -exceptiongroup==1.2.0 ; python_version >= "3.10" and python_version < "3.11" -fasteners==0.19 ; python_version >= "3.10" and python_version < "4.0" -fastparquet==2023.10.1 ; python_version >= "3.10" and python_version < "4.0" -fiona==1.9.5 ; python_version >= "3.10" and python_version < "4.0" -flox==0.8.5 ; python_version >= "3.10" and python_version < "4.0" -frozenlist==1.4.0 ; python_version >= "3.10" and python_version < "4.0" -fsspec==2023.12.1 ; python_version >= "3.10" and python_version < "4.0" -geopandas==0.14.1 ; python_version >= "3.10" and python_version < "4.0" -h11==0.14.0 ; python_version >= "3.10" and python_version < "4.0" -h5netcdf==1.3.0 ; python_version >= "3.10" and python_version < "4.0" -h5py==3.10.0 ; python_version >= "3.10" and python_version < "4.0" -html5lib==1.1 ; python_version >= "3.10" and python_version < "4.0" -httpcore==1.0.2 ; python_version >= "3.10" and python_version < "4.0" -httpx==0.25.2 ; python_version >= "3.10" and python_version < "4.0" -idna==3.6 ; python_version >= "3.10" and python_version < "4.0" -importlib-metadata==7.0.0 ; python_version >= "3.10" and python_version < "4.0" -importlib-resources==6.1.1 ; python_version >= "3.10" and python_version < "4.0" -isodate==0.6.1 ; python_version >= "3.10" and python_version < "4.0" -limits==3.7.0 ; python_version >= "3.10" and python_version < "4.0" -llvmlite==0.41.1 ; python_version >= "3.10" and python_version < "4.0" -locket==1.0.0 ; python_version >= "3.10" and python_version < "4.0" -lxml==4.9.3 ; python_version >= "3.10" and python_version < "4.0" -lz4==4.3.2 ; python_version >= "3.10" and python_version < "4.0" -markdown-it-py==3.0.0 ; python_version >= "3.10" and python_version < "4.0" -mdurl==0.1.2 ; python_version >= "3.10" and python_version < "4.0" -msal-extensions==1.1.0 ; python_version >= "3.10" and python_version < "4.0" -msal==1.26.0 ; python_version >= "3.10" and python_version < "4.0" -multidict==6.0.4 ; python_version >= "3.10" and python_version < "4.0" -multifutures==0.1.2 ; python_version >= "3.10" and python_version < "4.0" -netcdf4==1.6.5 ; python_version >= "3.10" and python_version < "4.0" -numba==0.58.1 ; python_version >= "3.10" and python_version < "4.0" -numbagg==0.6.7 ; python_version >= "3.10" and python_version < "4.0" -numcodecs==0.12.1 ; python_version >= "3.10" and python_version < "4.0" -numpy-groupies==0.10.2 ; python_version >= "3.10" and python_version < "4.0" -numpy==1.26.2 ; python_version >= "3.10" and python_version < "4.0" -opt-einsum==3.3.0 ; python_version >= "3.10" and python_version < "4.0" -packaging==23.2 ; python_version >= "3.10" and python_version < "4.0" -pandas==2.1.4 ; python_version >= "3.10" and python_version < "4.0" -partd==1.4.1 ; python_version >= "3.10" and python_version < "4.0" -platformdirs==4.1.0 ; python_version >= "3.10" and python_version < "4.0" -pooch==1.8.0 ; python_version >= "3.10" and python_version < "4.0" -portalocker==2.8.2 ; python_version >= "3.10" and python_version < "4.0" -pyarrow-hotfix==0.6 ; python_version >= "3.10" and python_version < "4.0" -pyarrow==14.0.1 ; python_version >= "3.10" and python_version < "4.0" -pycparser==2.21 ; python_version >= "3.10" and python_version < "4.0" -pydantic-core==2.14.5 ; python_version >= "3.10" and python_version < "4.0" -pydantic-settings==2.1.0 ; python_version >= "3.10" and python_version < "4.0" -pydantic==2.5.2 ; python_version >= "3.10" and python_version < "4.0" -pygments==2.17.2 ; python_version >= "3.10" and python_version < "4.0" -pyjwt[crypto]==2.8.0 ; python_version >= "3.10" and python_version < "4.0" -pyproj==3.6.1 ; python_version >= "3.10" and python_version < "4.0" -python-dateutil==2.8.2 ; python_version >= "3.10" and python_version < "4.0" -python-dotenv==1.0.0 ; python_version >= "3.10" and python_version < "4.0" -pytz==2023.3.post1 ; python_version >= "3.10" and python_version < "4.0" -pywin32==306 ; python_version >= "3.10" and python_version < "4.0" and platform_system == "Windows" -pyyaml==6.0.1 ; python_version >= "3.10" and python_version < "4.0" -requests==2.31.0 ; python_version >= "3.10" and python_version < "4.0" -rich==13.7.0 ; python_version >= "3.10" and python_version < "4.0" -scipy==1.11.4 ; python_version >= "3.10" and python_version < "4.0" -searvey==0.3.1 ; python_version >= "3.10" and python_version < "4.0" -setuptools==69.0.2 ; python_version >= "3.10" and python_version < "4.0" -shapely==2.0.2 ; python_version >= "3.10" and python_version < "4.0" -shellingham==1.5.4 ; python_version >= "3.10" and python_version < "4.0" -six==1.16.0 ; python_version >= "3.10" and python_version < "4.0" -sniffio==1.3.0 ; python_version >= "3.10" and python_version < "4.0" -soupsieve==2.5 ; python_version >= "3.10" and python_version < "4.0" -tenacity==8.2.3 ; python_version >= "3.10" and python_version < "4.0" -toolz==0.12.0 ; python_version >= "3.10" and python_version < "4.0" -tqdm==4.66.1 ; python_version >= "3.10" and python_version < "4.0" -typer[all]==0.9.0 ; python_version >= "3.10" and python_version < "4.0" -typing-extensions==4.8.0 ; python_version >= "3.10" and python_version < "4.0" -tzdata==2023.3 ; python_version >= "3.10" and python_version < "4.0" -urllib3==2.1.0 ; python_version >= "3.10" and python_version < "4.0" -webencodings==0.5.1 ; python_version >= "3.10" and python_version < "4.0" -wrapt==1.16.0 ; python_version >= "3.10" and python_version < "4.0" -xarray==2023.12.0 ; python_version >= "3.10" and python_version < "4.0" -xarray[accel,io,parallel]==2023.12.0 ; python_version >= "3.10" and python_version < "4.0" -yarl==1.9.4 ; python_version >= "3.10" and python_version < "4.0" -zarr==2.16.1 ; python_version >= "3.10" and python_version < "4.0" -zipp==3.17.0 ; python_version >= "3.10" and python_version < "4.0" +adlfs==2023.10.0 ; python_version >= "3.9" and python_version < "4" +aiohttp==3.9.1 ; python_version >= "3.9" and python_version < "4" +aiosignal==1.3.1 ; python_version >= "3.9" and python_version < "4" +annotated-types==0.6.0 ; python_version >= "3.9" and python_version < "4.0" +anyio==4.1.0 ; python_version >= "3.9" and python_version < "4" +asciitree==0.3.3 ; python_version >= "3.9" and python_version < "4" +async-timeout==4.0.3 ; python_version >= "3.9" and python_version < "3.11" +attrs==23.1.0 ; python_version >= "3.9" and python_version < "4" +azure-common==1.1.28 ; python_version >= "3.9" and python_version < "4" +azure-core==1.29.5 ; python_version >= "3.9" and python_version < "4" +azure-datalake-store==0.0.53 ; python_version >= "3.9" and python_version < "4" +azure-identity==1.15.0 ; python_version >= "3.9" and python_version < "4" +azure-keyvault-certificates==4.7.0 ; python_version >= "3.9" and python_version < "4" +azure-keyvault-keys==4.8.0 ; python_version >= "3.9" and python_version < "4" +azure-keyvault-secrets==4.7.0 ; python_version >= "3.9" and python_version < "4" +azure-keyvault==4.2.0 ; python_version >= "3.9" and python_version < "4" +azure-storage-blob==12.19.0 ; python_version >= "3.9" and python_version < "4" +beautifulsoup4==4.12.2 ; python_version >= "3.9" and python_version < "4.0" +bottleneck==1.3.7 ; python_version >= "3.9" and python_version < "4" +certifi==2023.11.17 ; python_version >= "3.9" and python_version < "4" +cffi==1.16.0 ; python_version >= "3.9" and python_version < "4" +cftime==1.6.3 ; python_version >= "3.9" and python_version < "4" +charset-normalizer==3.3.2 ; python_version >= "3.9" and python_version < "4.0" +click-plugins==1.1.1 ; python_version >= "3.9" and python_version < "4.0" +click==8.1.7 ; python_version >= "3.9" and python_version < "4" +cligj==0.7.2 ; python_version >= "3.9" and python_version < "4" +cloudpickle==3.0.0 ; python_version >= "3.9" and python_version < "4" +colorama==0.4.6 ; python_version >= "3.9" and python_version < "4" +cramjam==2.7.0 ; python_version >= "3.9" and python_version < "4" +cryptography==41.0.7 ; python_version >= "3.9" and python_version < "4" +dask[complete]==2023.12.0 ; python_version >= "3.9" and python_version < "4" +dataretrieval==1.0.6 ; python_version >= "3.9" and python_version < "4.0" +deprecated==1.2.14 ; python_version >= "3.9" and python_version < "4.0" +docopt==0.6.2 ; python_version < "3.10" and python_version >= "3.9" +erddapy==2.2.0 ; python_version >= "3.9" and python_version < "4.0" +exceptiongroup==1.2.0 ; python_version >= "3.9" and python_version < "3.11" +fasteners==0.19 ; python_version >= "3.9" and python_version < "4" +fastparquet==2023.10.1 ; python_version >= "3.9" and python_version < "4" +fiona==1.9.5 ; python_version >= "3.9" and python_version < "4.0" +flox==0.8.5 ; python_version >= "3.9" and python_version < "4" +frozenlist==1.4.0 ; python_version >= "3.9" and python_version < "4" +fsspec==2023.12.2 ; python_version >= "3.9" and python_version < "4" +geopandas==0.14.1 ; python_version >= "3.9" and python_version < "4.0" +h11==0.14.0 ; python_version >= "3.9" and python_version < "4" +h5netcdf==1.3.0 ; python_version >= "3.9" and python_version < "4" +h5py==3.10.0 ; python_version >= "3.9" and python_version < "4" +html5lib==1.1 ; python_version >= "3.9" and python_version < "4.0" +httpcore==1.0.2 ; python_version >= "3.9" and python_version < "4" +httpx==0.25.2 ; python_version >= "3.9" and python_version < "4" +idna==3.6 ; python_version >= "3.9" and python_version < "4" +importlib-metadata==7.0.0 ; python_version >= "3.9" and python_version < "4" +importlib-resources==6.1.1 ; python_version >= "3.9" and python_version < "4.0" +isodate==0.6.1 ; python_version >= "3.9" and python_version < "4" +jinja2==3.1.2 ; python_version < "3.10" and python_version >= "3.9" +limits==3.7.0 ; python_version >= "3.9" and python_version < "4.0" +llvmlite==0.41.1 ; python_version >= "3.9" and python_version < "4" +locket==1.0.0 ; python_version >= "3.9" and python_version < "4" +lxml==4.9.3 ; python_version >= "3.9" and python_version < "4.0" +lz4==4.3.2 ; python_version >= "3.9" and python_version < "4" +markdown-it-py==3.0.0 ; python_version >= "3.9" and python_version < "4" +markupsafe==2.1.3 ; python_version < "3.10" and python_version >= "3.9" +mdurl==0.1.2 ; python_version >= "3.9" and python_version < "4" +msal-extensions==1.1.0 ; python_version >= "3.9" and python_version < "4" +msal==1.26.0 ; python_version >= "3.9" and python_version < "4" +multidict==6.0.4 ; python_version >= "3.9" and python_version < "4" +multifutures==0.2.0 ; python_version >= "3.9" and python_version < "4.0" +netcdf4==1.6.5 ; python_version >= "3.9" and python_version < "4" +numba==0.58.1 ; python_version >= "3.9" and python_version < "4" +numbagg==0.6.7 ; python_version >= "3.9" and python_version < "4" +numcodecs==0.12.1 ; python_version >= "3.9" and python_version < "4" +numpy-groupies==0.10.2 ; python_version >= "3.9" and python_version < "4" +numpy==1.26.2 ; python_version >= "3.9" and python_version < "4" +opt-einsum==3.3.0 ; python_version >= "3.9" and python_version < "4" +packaging==23.2 ; python_version >= "3.9" and python_version < "4" +pandas==2.1.4 ; python_version >= "3.9" and python_version < "4" +partd==1.4.1 ; python_version >= "3.9" and python_version < "4" +platformdirs==4.1.0 ; python_version >= "3.9" and python_version < "4" +pooch==1.8.0 ; python_version >= "3.9" and python_version < "4" +portalocker==2.8.2 ; python_version >= "3.9" and python_version < "4" +pyarrow-hotfix==0.6 ; python_version >= "3.9" and python_version < "4" +pyarrow==14.0.1 ; python_version >= "3.9" and python_version < "4" +pycparser==2.21 ; python_version >= "3.9" and python_version < "4" +pydantic-core==2.14.5 ; python_version >= "3.9" and python_version < "4.0" +pydantic-settings==2.1.0 ; python_version >= "3.9" and python_version < "4" +pydantic==2.5.2 ; python_version >= "3.9" and python_version < "4.0" +pydap==3.4.1 ; python_version < "3.10" and python_version >= "3.9" +pygments==2.17.2 ; python_version >= "3.9" and python_version < "4" +pyjwt[crypto]==2.8.0 ; python_version >= "3.9" and python_version < "4" +pyproj==3.6.1 ; python_version >= "3.9" and python_version < "4.0" +python-dateutil==2.8.2 ; python_version >= "3.9" and python_version < "4" +python-dotenv==1.0.0 ; python_version >= "3.9" and python_version < "4" +pytz==2023.3.post1 ; python_version >= "3.9" and python_version < "4" +pywin32==306 ; python_version >= "3.9" and python_version < "4" and platform_system == "Windows" +pyyaml==6.0.1 ; python_version >= "3.9" and python_version < "4" +requests==2.31.0 ; python_version >= "3.9" and python_version < "4.0" +rich==13.7.0 ; python_version >= "3.9" and python_version < "4" +scipy==1.11.4 ; python_version >= "3.9" and python_version < "4" +searvey==0.3.1 ; python_version >= "3.9" and python_version < "4.0" +setuptools==69.0.2 ; python_version >= "3.9" and python_version < "4.0" +shapely==2.0.2 ; python_version >= "3.9" and python_version < "4.0" +shellingham==1.5.4 ; python_version >= "3.9" and python_version < "4" +six==1.16.0 ; python_version >= "3.9" and python_version < "4" +sniffio==1.3.0 ; python_version >= "3.9" and python_version < "4" +soupsieve==2.5 ; python_version >= "3.9" and python_version < "4.0" +tenacity==8.2.3 ; python_version >= "3.9" and python_version < "4" +toolz==0.12.0 ; python_version >= "3.9" and python_version < "4" +tqdm==4.66.1 ; python_version >= "3.9" and python_version < "4.0" +typer[all]==0.9.0 ; python_version >= "3.9" and python_version < "4" +typing-extensions==4.9.0 ; python_version >= "3.9" and python_version < "4" +tzdata==2023.3 ; python_version >= "3.9" and python_version < "4" +urllib3==2.1.0 ; python_version >= "3.9" and python_version < "4.0" +webencodings==0.5.1 ; python_version >= "3.9" and python_version < "4.0" +webob==1.8.7 ; python_version >= "3.9" and python_version < "3.10" +wrapt==1.16.0 ; python_version >= "3.9" and python_version < "4.0" +xarray==2023.12.0 ; python_version >= "3.9" and python_version < "4.0" +xarray[accel,io,parallel]==2023.12.0 ; python_version >= "3.9" and python_version < "4" +yarl==1.9.4 ; python_version >= "3.9" and python_version < "4" +zarr==2.16.1 ; python_version >= "3.9" and python_version < "4" +zipp==3.17.0 ; python_version >= "3.9" and python_version < "4" diff --git a/tests/cli_test.py b/tests/cli_test.py index d8eb7f6..3d81779 100644 --- a/tests/cli_test.py +++ b/tests/cli_test.py @@ -1,6 +1,7 @@ from __future__ import annotations from typer.testing import CliRunner + from observer.cli import app runner = CliRunner() diff --git a/tests/test_ioc.py b/tests/test_ioc.py index bd7f882..f4b076a 100644 --- a/tests/test_ioc.py +++ b/tests/test_ioc.py @@ -1,9 +1,6 @@ from __future__ import annotations import unittest.mock -from observer.ioc.scraper import scrape_ioc -from observer.ioc.scraper import scrape_ioc_station -import observer.ioc.scraper as scraper import httpx import limits @@ -11,6 +8,10 @@ import pandas as pd import pytest +import observer.ioc.scraper as scraper +from observer.ioc.scraper import scrape_ioc +from observer.ioc.scraper import scrape_ioc_station + def test_generate_urls(): ioc_code = "AAA" @@ -29,8 +30,8 @@ def test_generate_urls(): def test_generate_urls_raises_when_end_date_before_start_date(): - start_date=pd.Timestamp("2023-01-01") - end_date=pd.Timestamp("2023-01-01") + start_date = pd.Timestamp("2023-01-01") + end_date = pd.Timestamp("2023-01-01") with pytest.raises(ValueError) as exc: scraper.generate_urls( ioc_code="aaaa", @@ -62,7 +63,7 @@ def test_scrape_ioc_empty_responses(mocked_fetch_url): f"""[{{"error":"code '{ioc_code}' not found"}}]""", f"""[{{"error":"code '{ioc_code}' not found"}}]""", '[{"error":"Incorrect code"}]', - '[]', + "[]", ] data = scrape_ioc( ioc_codes=[ioc_code], @@ -77,7 +78,7 @@ def test_scrape_ioc_empty_responses(mocked_fetch_url): @unittest.mock.patch("observer.ioc.scraper.fetch_url") def test_scrape_ioc_normal_call(mocked_fetch_url): - ioc_code="acnj" + ioc_code = "acnj" start_date = pd.Timestamp("2022-03-12T11:04:00") end_date = pd.Timestamp("2022-03-12T11:06:00") mocked_fetch_url.side_effect = [ @@ -101,7 +102,7 @@ def test_scrape_ioc_normal_call(mocked_fetch_url): @unittest.mock.patch("observer.ioc.scraper.fetch_url") def test_scrape_ioc_duplicated_timestamps(mocked_fetch_url): - ioc_code="acnj" + ioc_code = "acnj" start_date = pd.Timestamp("2022-03-12T11:04:00") end_date = pd.Timestamp("2022-03-12T11:06:00") mocked_fetch_url.side_effect = [ @@ -131,7 +132,7 @@ def test_scrape_ioc_duplicated_timestamps(mocked_fetch_url): @unittest.mock.patch("observer.ioc.scraper.fetch_url") def test_scrape_ioc_station_normal_call(mocked_fetch_url): - ioc_code="acnj" + ioc_code = "acnj" start_date = pd.Timestamp("2022-03-12T11:04:00") end_date = pd.Timestamp("2022-03-12T11:06:00") mocked_fetch_url.side_effect = [