From e24351ad2c182a790128d11423cc05870df7dd9f Mon Sep 17 00:00:00 2001 From: Thomas Maschler Date: Wed, 3 Apr 2024 22:57:15 -0400 Subject: [PATCH] update dependencies --- stac_fastapi/api/setup.py | 13 +++++++++---- stac_fastapi/api/tests/test_app.py | 8 ++++++-- stac_fastapi/extensions/setup.py | 16 +++++++++++----- stac_fastapi/types/setup.py | 11 +++++++++-- 4 files changed, 35 insertions(+), 13 deletions(-) diff --git a/stac_fastapi/api/setup.py b/stac_fastapi/api/setup.py index cb9097eca..439e55b72 100644 --- a/stac_fastapi/api/setup.py +++ b/stac_fastapi/api/setup.py @@ -1,16 +1,20 @@ """stac_fastapi: api module.""" +from distutils.util import convert_path + from setuptools import find_namespace_packages, setup +main_ns = {} +ver_path = convert_path("stac_fastapi/api/version.py") +with open(ver_path) as ver_file: + exec(ver_file.read(), main_ns) + with open("README.md") as f: desc = f.read() install_requires = [ - "attrs", - "pydantic[dotenv]>=2", - "stac_pydantic>=3", "brotli_asgi", - "stac-fastapi.types", + f"stac-fastapi.types=={main_ns['__version__']}", ] extra_reqs = { @@ -54,4 +58,5 @@ install_requires=install_requires, tests_require=extra_reqs["dev"], extras_require=extra_reqs, + version=main_ns["__version__"], ) diff --git a/stac_fastapi/api/tests/test_app.py b/stac_fastapi/api/tests/test_app.py index 62b5693a6..2878e2ac4 100644 --- a/stac_fastapi/api/tests/test_app.py +++ b/stac_fastapi/api/tests/test_app.py @@ -1,3 +1,6 @@ +"""Implement all read_only methods of BaseCoreClient +and test all GET endpoints of the API""" + import importlib import os from datetime import datetime @@ -30,8 +33,9 @@ def cleanup(): ("False", dict), ], ) -def test_app(validate, response_type, collection_dict, item_dict, cleanup): - os.environ["VALIDATE_RESPONSE"] = str(validate) +def test_app(validate, response_type, collection_dict, item_dict, cleanup, monkeypatch): + monkeypatch.setenv("VALIDATE_RESPONSE", validate) + importlib.reload(response_model) importlib.reload(core) diff --git a/stac_fastapi/extensions/setup.py b/stac_fastapi/extensions/setup.py index a22d8815f..c332ccb99 100644 --- a/stac_fastapi/extensions/setup.py +++ b/stac_fastapi/extensions/setup.py @@ -1,16 +1,21 @@ """stac_fastapi: extensions module.""" +from distutils.util import convert_path + from setuptools import find_namespace_packages, setup +main_ns = {} +ver_path = convert_path("stac_fastapi/extensions/version.py") +with open(ver_path) as ver_file: + exec(ver_file.read(), main_ns) + + with open("README.md") as f: desc = f.read() install_requires = [ - "attrs", - "pydantic[dotenv]>=2", - "stac_pydantic>=3", - "stac-fastapi.types", - "stac-fastapi.api", + f"stac-fastapi.types=={main_ns['__version__']}", + f"stac-fastapi.api=={main_ns['__version__']}", ] extra_reqs = { @@ -52,4 +57,5 @@ install_requires=install_requires, tests_require=extra_reqs["dev"], extras_require=extra_reqs, + version=main_ns["__version__"], ) diff --git a/stac_fastapi/types/setup.py b/stac_fastapi/types/setup.py index 7717f3a69..cf9cb8941 100644 --- a/stac_fastapi/types/setup.py +++ b/stac_fastapi/types/setup.py @@ -1,14 +1,20 @@ """stac_fastapi: types module.""" +from distutils.util import convert_path + from setuptools import find_namespace_packages, setup +main_ns = {} +ver_path = convert_path("stac_fastapi/types/version.py") +with open(ver_path) as ver_file: + exec(ver_file.read(), main_ns) + with open("README.md") as f: desc = f.read() install_requires = [ "fastapi>=0.100.0", - "attrs", - "pydantic[dotenv]>=2", + "attrs>=23.2.0", "pydantic-settings>=2", "stac_pydantic>=3", "pystac==1.*", @@ -54,4 +60,5 @@ install_requires=install_requires, tests_require=extra_reqs["dev"], extras_require=extra_reqs, + version=main_ns["__version__"], )