-
Notifications
You must be signed in to change notification settings - Fork 40
Add support for sub-hourly price fetching #64
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
Conversation
- Split tests to multiple files for easier management and better performance in editor. - Created a utility module for VCR configuration to streamline cassette management.
- Changed API endpoint from 'DayAheadPrices' to 'DayAheadPriceIndices' for hourly price fetching. - Updated test cases to reflect new date parameters and expected values for May 2025. - Adjusted handling of empty area prices to return None when no data is found.
- Introduced `UnsupportedResolution` exception for unsupported resolution requests. - Updated `Prices` class to support fetching prices at 15-minute and 30-minute intervals. - Enhanced `fetch` and `_fetch_json` methods to accept resolution as a parameter. - Added unit tests for 15-minute and 30-minute price fetching scenarios. - Created test for handling unsupported resolution requests.
- Updated comments for clarity, specifying "Central Western Europe" and "South East Europe".
- Added Bulgaria ("BG") and Romania ("TEL") to the list of countries in the Prices class.
- Added internal handling for "SYSTEM" to be treated as "SYS" in the Prices class. - Updated comments for clarity regarding API endpoint behavior. - Introduced a new test case for hourly price fetching using the "SYS" area. - Adjusted VCR cassette to reflect the new API request and response structure.
|
It is working fine. I just tested it manually. I will update the examples so you can update them as well |
|
I just noticed that you need to use end_date= otherwise you will not get any data |
Good catch, seems like I forgot to handle the situation when "data_type" is None -> uses incorrect parameter name in when defining areas for the request. Will fix tomorrow. |
Aah, there's no bug, just tested at the "wrong time". The library by default tries to fetch prices for tomorrow and returns I'll double check this today after the prices for tomorrow have been published. |
I changed in the code to use today(days=0) and it then worked fine without end_date, so everything is correct https://github.com/kipe/nordpool/blob/15min/nordpool/elspot.py#L159 |
- Remove example1.py and example2.py - Add basic.py and advanced.py to examples -directory - Update instructions for fetching Elspot prices with improved usage documentation in README.md.
|
Thanks for the updates! If nothing else comes to mind, I think I'll merge and publish this tomorrow. |
elspot.Prices.fetch, no helper functions for those. For examplePrices.fetch(areas=['FI'], resolution=15)UnsupportedResolutionexception which is raised if an unsupported resolution is requested.