Skip to content

Conversation

lambaaryan011
Copy link

Pull Request

Description

This PR implements and documents the "day ahead" forecast rule across the India API. The changes ensure that forecasts adhere to the timing requirement that they must be generated before 9:00 IST on the day before the forecast date.

Key changes include:

      ⇾ Added forecast timing validation logic to enforce the rule

      ⇾Updated API documentation to clearly explain the timing requirements

      ⇾Added error handling for requests that don't meet the timing requirement

      ⇾Updated utility functions to respect the forecast timing rule

These changes standardize the forecast behavior and provide users with clear information about when forecasts are available.

Fixes #64

How Has This Been Tested?

→Simulating forecast requests at various times relative to the 9:00 IST cutoff

→Verifying that requests before cutoff time return appropriate error messages

→Confirming that valid requests after cutoff time proceed normally

→Testing timezone handling across IST/UTC conversions

  • Yes

If your changes affect data processing, have you plotted any changes? i.e. have you done a quick sanity check?

  • Yes

Checklist:

  • My code follows OCF's coding style guidelines
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked my code and corrected any misspellings

Signed-off-by: aryan lamba <aryanlamba54@gmail.com>
@lambaaryan011
Copy link
Author

Hi, @peterdudfield I have completed the issue so have a look. If there is a problem, so let me know.

@peterdudfield
Copy link
Contributor

See comments in #64

If the class field is upper case, parse it into the indicated
type from the environment. Required fields are those set in
the child class without a default value.
Copy link
Contributor

Choose a reason for hiding this comment

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

why remove this?

Copy link
Author

Choose a reason for hiding this comment

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

I removed those example lines because they are outdated or no longer accurately reflect how the class is used, they might end up confusing readers. Additionally, if the functionality of the EnvParser is already there so , including those examples just becomes unnecessary.

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.

Update docs forecast
2 participants