Skip to content
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

Set horizon_minutes as NOT NULL #66

Open
simlmx opened this issue Mar 23, 2023 · 3 comments
Open

Set horizon_minutes as NOT NULL #66

simlmx opened this issue Mar 23, 2023 · 3 comments

Comments

@simlmx
Copy link
Collaborator

simlmx commented Mar 23, 2023

We should enforce horizon_minutes to be NOT NULL. This will require a data migration where we calculate the horizon based on the timestamp_utc of the forecast and the start_utc time of the forecast_value.

# TODO Set to nullable=False

@Chirag-01
Copy link

Hi @simlmx ,
I was going through this issue for GSOC 2024 contribution. So we just need to change one line 213 to fix this?

@simlmx
Copy link
Collaborator Author

simlmx commented Mar 31, 2024

In theory yes but in practice this will require a corresponding migration for production environment where this is used. I don't have access to those anymore. Also I don't know if changing this is still relevant. @peterdudfield would know more!

@peterdudfield
Copy link
Contributor

Yea, we just need to write a script that would look at start_utc and created_utc and calculate the horizon minutes. I can always do that script, if @Chirag-01 you fancy doing the migration

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

No branches or pull requests

3 participants