stac-fastapi.api 3.0.0a0__tar.gz → 3.0.0a1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {stac_fastapi_api-3.0.0a0 → stac_fastapi_api-3.0.0a1}/PKG-INFO +1 -2
- {stac_fastapi_api-3.0.0a0 → stac_fastapi_api-3.0.0a1}/setup.py +0 -1
- {stac_fastapi_api-3.0.0a0 → stac_fastapi_api-3.0.0a1}/stac_fastapi/api/app.py +2 -2
- stac_fastapi_api-3.0.0a1/stac_fastapi/api/version.py +2 -0
- {stac_fastapi_api-3.0.0a0 → stac_fastapi_api-3.0.0a1}/stac_fastapi.api.egg-info/PKG-INFO +1 -2
- {stac_fastapi_api-3.0.0a0 → stac_fastapi_api-3.0.0a1}/stac_fastapi.api.egg-info/requires.txt +0 -1
- {stac_fastapi_api-3.0.0a0 → stac_fastapi_api-3.0.0a1}/tests/test_app.py +6 -2
- stac_fastapi_api-3.0.0a0/stac_fastapi/api/version.py +0 -2
- {stac_fastapi_api-3.0.0a0 → stac_fastapi_api-3.0.0a1}/README.md +0 -0
- {stac_fastapi_api-3.0.0a0 → stac_fastapi_api-3.0.0a1}/setup.cfg +0 -0
- {stac_fastapi_api-3.0.0a0 → stac_fastapi_api-3.0.0a1}/stac_fastapi/api/__init__.py +0 -0
- {stac_fastapi_api-3.0.0a0 → stac_fastapi_api-3.0.0a1}/stac_fastapi/api/config.py +0 -0
- {stac_fastapi_api-3.0.0a0 → stac_fastapi_api-3.0.0a1}/stac_fastapi/api/errors.py +0 -0
- {stac_fastapi_api-3.0.0a0 → stac_fastapi_api-3.0.0a1}/stac_fastapi/api/middleware.py +0 -0
- {stac_fastapi_api-3.0.0a0 → stac_fastapi_api-3.0.0a1}/stac_fastapi/api/models.py +0 -0
- {stac_fastapi_api-3.0.0a0 → stac_fastapi_api-3.0.0a1}/stac_fastapi/api/openapi.py +0 -0
- {stac_fastapi_api-3.0.0a0 → stac_fastapi_api-3.0.0a1}/stac_fastapi/api/routes.py +0 -0
- {stac_fastapi_api-3.0.0a0 → stac_fastapi_api-3.0.0a1}/stac_fastapi.api.egg-info/SOURCES.txt +0 -0
- {stac_fastapi_api-3.0.0a0 → stac_fastapi_api-3.0.0a1}/stac_fastapi.api.egg-info/dependency_links.txt +0 -0
- {stac_fastapi_api-3.0.0a0 → stac_fastapi_api-3.0.0a1}/stac_fastapi.api.egg-info/not-zip-safe +0 -0
- {stac_fastapi_api-3.0.0a0 → stac_fastapi_api-3.0.0a1}/stac_fastapi.api.egg-info/top_level.txt +0 -0
- {stac_fastapi_api-3.0.0a0 → stac_fastapi_api-3.0.0a1}/tests/test_api.py +0 -0
- {stac_fastapi_api-3.0.0a0 → stac_fastapi_api-3.0.0a1}/tests/test_app_prefix.py +0 -0
- {stac_fastapi_api-3.0.0a0 → stac_fastapi_api-3.0.0a1}/tests/test_middleware.py +0 -0
- {stac_fastapi_api-3.0.0a0 → stac_fastapi_api-3.0.0a1}/tests/test_models.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: stac-fastapi.api
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.0a1
|
|
4
4
|
Summary: An implementation of STAC API based on the FastAPI framework.
|
|
5
5
|
Home-page: https://github.com/stac-utils/stac-fastapi
|
|
6
6
|
Author: Arturo Engineering
|
|
@@ -27,7 +27,6 @@ Requires-Dist: pytest-cov; extra == "dev"
|
|
|
27
27
|
Requires-Dist: pytest-asyncio; extra == "dev"
|
|
28
28
|
Requires-Dist: pre-commit; extra == "dev"
|
|
29
29
|
Requires-Dist: requests; extra == "dev"
|
|
30
|
-
Requires-Dist: pystac[validation]==1.*; extra == "dev"
|
|
31
30
|
Provides-Extra: benchmark
|
|
32
31
|
Requires-Dist: pytest-benchmark; extra == "benchmark"
|
|
33
32
|
Provides-Extra: docs
|
|
@@ -172,14 +172,14 @@ class StacApi:
|
|
|
172
172
|
name="Conformance Classes",
|
|
173
173
|
path="/conformance",
|
|
174
174
|
response_model=(
|
|
175
|
-
api.
|
|
175
|
+
api.Conformance if self.settings.enable_response_models else None
|
|
176
176
|
),
|
|
177
177
|
responses={
|
|
178
178
|
200: {
|
|
179
179
|
"content": {
|
|
180
180
|
MimeTypes.json.value: {},
|
|
181
181
|
},
|
|
182
|
-
"model": api.
|
|
182
|
+
"model": api.Conformance,
|
|
183
183
|
},
|
|
184
184
|
},
|
|
185
185
|
response_class=self.response_class,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: stac-fastapi.api
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.0a1
|
|
4
4
|
Summary: An implementation of STAC API based on the FastAPI framework.
|
|
5
5
|
Home-page: https://github.com/stac-utils/stac-fastapi
|
|
6
6
|
Author: Arturo Engineering
|
|
@@ -27,7 +27,6 @@ Requires-Dist: pytest-cov; extra == "dev"
|
|
|
27
27
|
Requires-Dist: pytest-asyncio; extra == "dev"
|
|
28
28
|
Requires-Dist: pre-commit; extra == "dev"
|
|
29
29
|
Requires-Dist: requests; extra == "dev"
|
|
30
|
-
Requires-Dist: pystac[validation]==1.*; extra == "dev"
|
|
31
30
|
Provides-Extra: benchmark
|
|
32
31
|
Requires-Dist: pytest-benchmark; extra == "benchmark"
|
|
33
32
|
Provides-Extra: docs
|
|
@@ -110,7 +110,8 @@ def test_client_openapi(TestCoreClient):
|
|
|
110
110
|
assert component in test_app.app.openapi_schema["components"]["schemas"]
|
|
111
111
|
|
|
112
112
|
|
|
113
|
-
|
|
113
|
+
@pytest.mark.parametrize("validate", [True, False])
|
|
114
|
+
def test_filter_extension(validate, TestCoreClient, item_dict):
|
|
114
115
|
"""Test if Filter Parameters are passed correctly."""
|
|
115
116
|
|
|
116
117
|
class FilterClient(TestCoreClient):
|
|
@@ -159,13 +160,15 @@ def test_filter_extension(TestCoreClient, item_dict):
|
|
|
159
160
|
post_request_model = create_post_request_model([FilterExtension()])
|
|
160
161
|
|
|
161
162
|
test_app = app.StacApi(
|
|
162
|
-
settings=ApiSettings(),
|
|
163
|
+
settings=ApiSettings(enable_response_models=validate),
|
|
163
164
|
client=FilterClient(post_request_model=post_request_model),
|
|
164
165
|
search_get_request_model=create_get_request_model([FilterExtension()]),
|
|
165
166
|
search_post_request_model=post_request_model,
|
|
167
|
+
extensions=[FilterExtension()],
|
|
166
168
|
)
|
|
167
169
|
|
|
168
170
|
with TestClient(test_app.app) as client:
|
|
171
|
+
landing = client.get("/")
|
|
169
172
|
get_search = client.get(
|
|
170
173
|
"/search",
|
|
171
174
|
params={
|
|
@@ -184,5 +187,6 @@ def test_filter_extension(TestCoreClient, item_dict):
|
|
|
184
187
|
},
|
|
185
188
|
)
|
|
186
189
|
|
|
190
|
+
assert landing.status_code == 200, landing.text
|
|
187
191
|
assert get_search.status_code == 200, get_search.text
|
|
188
192
|
assert post_search.status_code == 200, post_search.text
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{stac_fastapi_api-3.0.0a0 → stac_fastapi_api-3.0.0a1}/stac_fastapi.api.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{stac_fastapi_api-3.0.0a0 → stac_fastapi_api-3.0.0a1}/stac_fastapi.api.egg-info/not-zip-safe
RENAMED
|
File without changes
|
{stac_fastapi_api-3.0.0a0 → stac_fastapi_api-3.0.0a1}/stac_fastapi.api.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|