Skip to content
This repository was archived by the owner on Apr 2, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
45307b7
feat: add async opportunity models
pjhartzell Feb 4, 2025
9cdf3f2
feat: update backends for asynchronous opportunity searches
pjhartzell Feb 4, 2025
dd7c7ad
feat: update product model to support async and optional opportunity …
pjhartzell Feb 4, 2025
7a00095
feat: Add async and optional opportunity search to routers
pjhartzell Feb 4, 2025
37bda4b
fix: revert back to a clunky, but functional, opportunity search endp…
pjhartzell Feb 4, 2025
f21a152
tests: add tests for async opportunity searching
pjhartzell Feb 5, 2025
3db2a60
tests: add more async tests and fix a few bugs
pjhartzell Feb 6, 2025
d2b849a
Merge branch 'main' into pjh/asynchronous-opportunity-search
pjhartzell Feb 6, 2025
b775a1e
tests: add pagination tests for async search, fix a few bugs
pjhartzell Feb 6, 2025
f1e3086
tests: Add a custom marker for supplying mock products
pjhartzell Feb 6, 2025
73741b9
docs: update CHANGELOG
pjhartzell Feb 6, 2025
3ec6978
fix: fix db mutation bug, sundry fixes
pjhartzell Feb 7, 2025
8f1366d
review: class attributes always defined, remove implicit Self type
pjhartzell Feb 8, 2025
51166f6
review: Rename get_preference to get_prefer
pjhartzell Feb 8, 2025
c719d8d
review: sidecar fix for logging -> logger
pjhartzell Feb 8, 2025
ae1a670
review: logging.error -> logging.exception
pjhartzell Feb 8, 2025
822dae9
review: correct list-orders type to geo+json
pjhartzell Feb 8, 2025
e903c16
review: sidecar - remove unused STAPI_VERSION
pjhartzell Feb 8, 2025
df8003c
review: Use Generator instead of Iterator
pjhartzell Feb 10, 2025
34c248b
review: correct logger.exception/logger.error use
pjhartzell Feb 10, 2025
c47307d
review: simplify root router links
pjhartzell Feb 10, 2025
a6c927f
Merge branch 'main' into pjh/asynchronous-opportunity-search
pjhartzell Feb 10, 2025
3ac327d
fix: minor typo fixes in CHANGELOG
pjhartzell Feb 10, 2025
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
8 changes: 4 additions & 4 deletions src/stapi_fastapi/routers/product_router.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ async def search_opportunities_sync(
case Failure(e) if isinstance(e, ConstraintsException):
raise e
case Failure(e):
logger.error(
logger.exception(
Comment thread
pjhartzell marked this conversation as resolved.
Outdated
"An error occurred while searching opportunities: %s",
traceback.format_exception(e),
)
Expand Down Expand Up @@ -324,7 +324,7 @@ async def search_opportunities_async(
case Failure(e) if isinstance(e, ConstraintsException):
raise e
case Failure(e):
logger.error(
logger.exception(
"An error occurred while initiating an asynchronous opportunity search: %s",
traceback.format_exception(e),
)
Expand Down Expand Up @@ -366,7 +366,7 @@ async def create_order(
case Failure(e) if isinstance(e, ConstraintsException):
raise e
case Failure(e):
logger.error(
logger.exception(
"An error occurred while creating order: %s",
traceback.format_exception(e),
)
Expand Down Expand Up @@ -431,7 +431,7 @@ async def get_opportunity_collection(
case Success(Maybe.empty):
raise NotFoundException("Opportunity Collection not found")
case Failure(e):
logger.error(
logger.exception(
"An error occurred while fetching opportunity collection: '%s': %s",
opportunity_collection_id,
traceback.format_exception(e),
Expand Down
10 changes: 5 additions & 5 deletions src/stapi_fastapi/routers/root_router.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ async def get_orders(
case Failure(ValueError()):
raise NotFoundException(detail="Error finding pagination token")
case Failure(e):
logger.error(
logger.exception(
"An error occurred while retrieving orders: %s",
traceback.format_exception(e),
)
Expand All @@ -275,7 +275,7 @@ async def get_order(self, order_id: str, request: Request) -> Order:
case Success(Maybe.empty):
raise NotFoundException("Order not found")
case Failure(e):
logger.error(
logger.exception(
"An error occurred while retrieving order '%s': %s",
order_id,
traceback.format_exception(e),
Expand Down Expand Up @@ -308,7 +308,7 @@ async def get_order_statuses(
case Failure(ValueError()):
raise NotFoundException("Error finding pagination token")
case Failure(e):
logger.error(
logger.exception(
"An error occurred while retrieving order statuses: %s",
traceback.format_exception(e),
)
Expand Down Expand Up @@ -386,7 +386,7 @@ async def get_opportunity_search_records(
case Failure(ValueError()):
raise NotFoundException(detail="Error finding pagination token")
case Failure(e):
logger.error(
logger.exception(
"An error occurred while retrieving opportunity search records: %s",
traceback.format_exception(e),
)
Expand All @@ -413,7 +413,7 @@ async def get_opportunity_search_record(
case Success(Maybe.empty):
raise NotFoundException("Opportunity Search Record not found")
case Failure(e):
logger.error(
logger.exception(
"An error occurred while retrieving opportunity search record '%s': %s",
search_record_id,
traceback.format_exception(e),
Expand Down