Skip to content

add queries for generalized horizons which support yearly, monthly and daily auctions properly - #8

Open
maurerle wants to merge 4 commits into
fboerman:masterfrom
maurerle:improve_horizon_support
Open

add queries for generalized horizons which support yearly, monthly and daily auctions properly#8
maurerle wants to merge 4 commits into
fboerman:masterfrom
maurerle:improve_horizon_support

Conversation

@maurerle

Copy link
Copy Markdown
Contributor

This project did not correctly handle queries to daily horizon, as the day was always set to 1 (as needed for the month queries).
By introducing two new functions:

query_auction_details and query_auction_stats this is now properly handled and can be extended (I did not find corridors which have other horizons than the named available).

The previous monthly queries are mapped to call the generalized functions, to not break existing code.

Comment thread jao/webservice.py Outdated
# pretify the results since we know it is for monthly auction
# prettify the results to only show the first products and results
data = data[0]
data = {**data, **data['results'][0], **data['products'][0]}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This returns only the results from the first auction with this ID.
When having daily products, 24 biddings exist with the same ID, which have a different date (one for each hour).
This is currently not reflected in the auctions code.

A split to multiple datasets:

  • auctions
  • results
  • products
    would help here, though this is much more work.

I don't know what you think @fboerman - maybe it surely is worth it to provide the option to consistently download data for the different horizons as well here..?

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

hmm that is an interesting one, I dont really have the time to go through this given that I dont use it myself. If you want to take a crack at this feel free!

@fboerman

fboerman commented Jun 1, 2024

Copy link
Copy Markdown
Owner

hi! thanks for the work! do you have a quick snippit to test some things? then after that I will merge it!

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