Skip to content

Commit

Permalink
update all conformance classes to 1.0.0-rc.1 and fix several extensio…
Browse files Browse the repository at this point in the history
…n cc URIs with extra forward-slash (#383)

* update all conformance classes to 1.0.0-rc.1 and fix several extension cc URIs with extra forward-slash

* add collections conformance class, update Changelog

Co-authored-by: Nathan Zimmerman <npzimmerman@gmail.com>
  • Loading branch information
philvarner and moradology authored Apr 15, 2022
1 parent 77b368f commit bda2412
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 26 deletions.
7 changes: 5 additions & 2 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,30 @@

## Unreleased

* Update error response payloads to match the API spec. ([#361](https://github.com/stac-utils/stac-fastapi/pull/361))

### Added

* Add hook to allow adding dependencies to routes. ([#295](https://github.com/stac-utils/stac-fastapi/pull/295))
* Add STAC API - Collections conformance class. ([383](https://github.com/stac-utils/stac-fastapi/pull/383))

### Changed

* Update FastAPI requirement to allow version >=0.73 ([#337](https://github.com/stac-utils/stac-fastapi/pull/337))
* Bump version of PGStac to 0.4.5 ([#346](https://github.com/stac-utils/stac-fastapi/pull/346))
* Add support for PGStac Backend to use PyGeofilter to convert Get Request with cql2-text into cql2-json to send to PGStac backend ([#346](https://github.com/stac-utils/stac-fastapi/pull/346))
* Updated all conformance classes to 1.0.0-rc.1. ([383](https://github.com/stac-utils/stac-fastapi/pull/383))
* Bulk Transactions object Items iterator now returns the Item objects rather than the string IDs of the Item objects
([#355](https://github.com/stac-utils/stac-fastapi/issues/355))
* docker-compose now runs uvicorn with hot-reloading enabled

### Removed

### Fixed

* Bumped uvicorn version to 0.17 (from >=0.12, <=0.14) to resolve security vulnerability related to websockets dependency version ([#343](https://github.com/stac-utils/stac-fastapi/pull/343))
* `AttributeError` and/or missing properties when requesting the complete `properties`-field in searches. Added test. ([#339](https://github.com/stac-utils/stac-fastapi/pull/339))
* Fixes issues (and adds tests) for issues caused by regression in pgstac ([#345](https://github.com/stac-utils/stac-fastapi/issues/345)
* Update error response payloads to match the API spec. ([#361](https://github.com/stac-utils/stac-fastapi/pull/361))
* Fixed stray `/` before the `#` in several extension conformance class strings ([383](https://github.com/stac-utils/stac-fastapi/pull/383))
* SQLAlchemy backend bulk item insert now works ([#356]https://github.com/stac-utils/stac-fastapi/issues/356))

## [2.3.0]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ class ContextExtension(ApiExtension):
"""

conformance_classes: List[str] = attr.ib(
factory=lambda: ["https://api.stacspec.org/v1.0.0-beta.4/item-search/#context"]
factory=lambda: ["https://api.stacspec.org/v1.0.0-rc.1/item-search#context"]
)
schema_href: Optional[str] = attr.ib(
default="https://raw.githubusercontent.com/radiantearth/stac-api-spec/v1.0.0-beta.4/fragments/context/json-schema/schema.json"
default="https://raw.githubusercontent.com/radiantearth/stac-api-spec/v1.0.0-rc.1/fragments/context/json-schema/schema.json"
)

def register(self, app: FastAPI) -> None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class FieldsExtension(ApiExtension):
POST = FieldsExtensionPostRequest

conformance_classes: List[str] = attr.ib(
factory=lambda: ["https://api.stacspec.org/v1.0.0-beta.4/item-search/#fields"]
factory=lambda: ["https://api.stacspec.org/v1.0.0-rc.1/item-search#fields"]
)
default_includes: Set[str] = attr.ib(
factory=lambda: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,25 @@
class FilterConformanceClasses(str, Enum):
"""Conformance classes for the Filter extension.
See https://github.com/radiantearth/stac-api-spec/tree/v1.0.0-beta.4/fragments/filter
See https://github.com/radiantearth/stac-api-spec/tree/v1.0.0-rc.1/fragments/filter
"""

FILTER = "https://api.stacspec.org/v1.0.0-beta.4/item-search#filter:filter"
FILTER = "https://api.stacspec.org/v1.0.0-rc.1/item-search#filter:filter"
ITEM_SEARCH_FILTER = (
"https://api.stacspec.org/v1.0.0-beta.4/item-search#filter:item-search-filter"
"https://api.stacspec.org/v1.0.0-rc.1/item-search#filter:item-search-filter"
)
CQL_TEXT = "https://api.stacspec.org/v1.0.0-beta.4/item-search#filter:cql-text"
CQL_JSON = "https://api.stacspec.org/v1.0.0-beta.4/item-search#filter:cql-json"
BASIC_CQL = "https://api.stacspec.org/v1.0.0-beta.4/item-search#filter:basic-cql"
BASIC_SPATIAL_OPERATORS = "https://api.stacspec.org/v1.0.0-beta.4/item-search#filter:basic-spatial-operators"
BASIC_TEMPORAL_OPERATORS = "https://api.stacspec.org/v1.0.0-beta.4/item-search#filter:basic-temporal-operators"
ENHANCED_COMPARISON_OPERATORS = "https://api.stacspec.org/v1.0.0-beta.4/item-search#filter:enhanced-comparison-operators"
ENHANCED_SPATIAL_OPERATORS = "https://api.stacspec.org/v1.0.0-beta.4/item-search#filter:enhanced-spatial-operators"
ENHANCED_TEMPORAL_OPERATORS = "https://api.stacspec.org/v1.0.0-beta.4/item-search#filter:enhanced-temporal-operators"
FUNCTIONS = "https://api.stacspec.org/v1.0.0-beta.4/item-search#filter:functions"
ARITHMETIC = "https://api.stacspec.org/v1.0.0-beta.4/item-search#filter:arithmetic"
ARRAYS = "https://api.stacspec.org/v1.0.0-beta.4/item-search#filter:arrays"
QUERYABLE_SECOND_OPERAND = "https://api.stacspec.org/v1.0.0-beta.4/item-search#filter:queryable-second-operand"
CQL_TEXT = "https://api.stacspec.org/v1.0.0-rc.1/item-search#filter:cql-text"
CQL_JSON = "https://api.stacspec.org/v1.0.0-rc.1/item-search#filter:cql-json"
BASIC_CQL = "https://api.stacspec.org/v1.0.0-rc.1/item-search#filter:basic-cql"
BASIC_SPATIAL_OPERATORS = "https://api.stacspec.org/v1.0.0-rc.1/item-search#filter:basic-spatial-operators"
BASIC_TEMPORAL_OPERATORS = "https://api.stacspec.org/v1.0.0-rc.1/item-search#filter:basic-temporal-operators"
ENHANCED_COMPARISON_OPERATORS = "https://api.stacspec.org/v1.0.0-rc.1/item-search#filter:enhanced-comparison-operators"
ENHANCED_SPATIAL_OPERATORS = "https://api.stacspec.org/v1.0.0-rc.1/item-search#filter:enhanced-spatial-operators"
ENHANCED_TEMPORAL_OPERATORS = "https://api.stacspec.org/v1.0.0-rc.1/item-search#filter:enhanced-temporal-operators"
FUNCTIONS = "https://api.stacspec.org/v1.0.0-rc.1/item-search#filter:functions"
ARITHMETIC = "https://api.stacspec.org/v1.0.0-rc.1/item-search#filter:arithmetic"
ARRAYS = "https://api.stacspec.org/v1.0.0-rc.1/item-search#filter:arrays"
QUERYABLE_SECOND_OPERAND = "https://api.stacspec.org/v1.0.0-rc.1/item-search#filter:queryable-second-operand"


@attr.s
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class QueryExtension(ApiExtension):
POST = QueryExtensionPostRequest

conformance_classes: List[str] = attr.ib(
factory=lambda: ["https://api.stacspec.org/v1.0.0-beta.4/item-search/#query"]
factory=lambda: ["https://api.stacspec.org/v1.0.0-rc.1/item-search#query"]
)
schema_href: Optional[str] = attr.ib(default=None)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class SortExtension(ApiExtension):
POST = SortExtensionPostRequest

conformance_classes: List[str] = attr.ib(
factory=lambda: ["https://api.stacspec.org/v1.0.0-beta.4/item-search/#sort"]
factory=lambda: ["https://api.stacspec.org/v1.0.0-rc.1/item-search#sort"]
)
schema_href: Optional[str] = attr.ib(default=None)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class TransactionExtension(ApiExtension):
settings: ApiSettings = attr.ib()
conformance_classes: List[str] = attr.ib(
factory=lambda: [
"https://api.stacspec.org/v1.0.0-beta.4/ogcapi-features/extensions/transaction/",
"https://api.stacspec.org/v1.0.0-rc.1/ogcapi-features/extensions/transaction",
"http://www.opengis.net/spec/ogcapi-features-4/1.0/conf/simpletx",
]
)
Expand Down
8 changes: 5 additions & 3 deletions stac_fastapi/types/stac_fastapi/types/conformance.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
class STACConformanceClasses(str, Enum):
"""Conformance classes for the STAC API spec."""

CORE = "https://api.stacspec.org/v1.0.0-beta.4/core"
OGC_API_FEAT = "https://api.stacspec.org/v1.0.0-beta.4/ogcapi-features"
ITEM_SEARCH = "https://api.stacspec.org/v1.0.0-beta.4/item-search"
CORE = "https://api.stacspec.org/v1.0.0-rc.1/core"
OGC_API_FEAT = "https://api.stacspec.org/v1.0.0-rc.1/ogcapi-features"
COLLECTIONS = "https://api.stacspec.org/v1.0.0-rc.1/collections"
ITEM_SEARCH = "https://api.stacspec.org/v1.0.0-rc.1/item-search"


class OAFConformanceClasses(str, Enum):
Expand All @@ -21,6 +22,7 @@ class OAFConformanceClasses(str, Enum):
BASE_CONFORMANCE_CLASSES = [
STACConformanceClasses.CORE,
STACConformanceClasses.OGC_API_FEAT,
STACConformanceClasses.COLLECTIONS,
STACConformanceClasses.ITEM_SEARCH,
OAFConformanceClasses.CORE,
OAFConformanceClasses.OPEN_API,
Expand Down

0 comments on commit bda2412

Please sign in to comment.