Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add product_id field to Opportunity and Order Properties #103

Merged
merged 3 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I mentioned in one of the merged PRs, we haven't actually released 0.1.0 yet. As such we don't really have an initial release from which to track changes.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Though thinking about this, we could retroactively release from where you started tracking the changelog. 😁

Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Added

- Conformance endpoint `/conformance` and root body `conformsTo` attribute.
- Field `product_id` to Opportunity and Order Properties

### Changed

Expand Down
1 change: 1 addition & 0 deletions src/stapi_fastapi/models/opportunity.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

# Copied and modified from https://github.com/stac-utils/stac-pydantic/blob/main/stac_pydantic/item.py#L11
class OpportunityPropertiesBase(BaseModel):
product_id: str
datetime: DatetimeInterval
model_config = ConfigDict(extra="allow")

Expand Down
1 change: 1 addition & 0 deletions src/stapi_fastapi/models/order.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@


class OrderProperties(BaseModel):
product_id: str
datetime: DatetimeInterval
model_config = ConfigDict(extra="allow")

Expand Down
1 change: 1 addition & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ def mock_test_spotlight_opportunities() -> list[Opportunity]:
coordinates=Position2D(longitude=0.0, latitude=0.0),
),
properties=TestSpotlightProperties(
product_id="xyz123",
datetime=(start, end),
off_nadir=20,
),
Expand Down