Skip to content

Ercot product response handling#3

Merged
kvkenyon merged 1 commit into
refactor/ercot-subpackagefrom
cursor/ercot-product-response-handling-553a
Dec 29, 2025
Merged

Ercot product response handling#3
kvkenyon merged 1 commit into
refactor/ercot-subpackagefrom
cursor/ercot-product-response-handling-553a

Conversation

@kvkenyon
Copy link
Copy Markdown
Owner

@kvkenyon kvkenyon commented Dec 29, 2025

Restore support for HAL and list response formats in _products_to_dataframe.

The _products_to_dataframe method was simplified and stopped handling HAL (_embedded.products, nested additional_properties._embedded.products) and raw list responses, causing get_list_for_products() to return empty DataFrames for valid API responses. This PR reintroduces logic to correctly parse these previously supported formats.


Open in Cursor Open in Web


Note

Reintroduces support for multiple products response shapes and strengthens test coverage.

  • Updates ERCOT._products_to_dataframe to accept Any and correctly handle: {"products": [...]}, HAL {"_embedded": {"products": [...]}}, nested {"additional_properties": {"_embedded": {"products": [...]}}, and raw list [...]; returns empty DataFrame otherwise
  • Adds regression tests validating DataFrame parsing for the above shapes
  • Expands HTTP tests for products and version endpoints: correct URL paths, query handling, URL encoding, and basic error responses

Written by Cursor Bugbot for commit df9f98f. This will update automatically on new commits. Configure here.

Co-authored-by: kvkenyon <kvkenyon@utexas.edu>
@cursor
Copy link
Copy Markdown

cursor Bot commented Dec 29, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@kvkenyon kvkenyon marked this pull request as ready for review December 29, 2025 00:52
@kvkenyon kvkenyon merged commit 91d4fac into refactor/ercot-subpackage Dec 29, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants