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

Forecast endpoint #734

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft

Forecast endpoint #734

wants to merge 6 commits into from

Conversation

jamesbrandreth
Copy link
Contributor

@jamesbrandreth jamesbrandreth commented Jul 27, 2021

Summary

Alters the queries driving the forecast endpoints to filter for the dynamic mrdgp model's predictions.

Type of change

  • Bug fix
  • New feature
  • Infrastructure
  • API
  • Pipeline

Additional dependencies

Tests

How has the code been tested?

Issues fixes

List any issues this closes:

Checklist

Please ensure you have done the following:

  • Code conforms to the projects style guidelines

  • New code documented using google docstyle

  • Updated documentation of any changed code

  • Any additional dependencies have been added to the appropriate location (e.g. setup.py or requirements.txt)

  • Unit tests written and passing on local database. Tests should prove that fix is effective or new feature works as expected

  • Code needs to run on the cluster? Tag database administrator in the pull request review to configure.

Reviewer

@jamesbrandreth jamesbrandreth self-assigned this Jul 27, 2021
end_datetime,
PRODUCTION_STATIC_FEATURES,
PRODUCTION_DYNAMIC_FEATURES
).all()
Copy link
Collaborator

Choose a reason for hiding this comment

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

You haven't specified output_type="..." as an argument. At the moment I think it returns a query object. Are you expecting a query?

results_query = ResultQueryMixin().query_results(
start=start_datetime,
upto=end_datetime,
).subquery()
Copy link
Collaborator

@PatrickOHara PatrickOHara Jul 28, 2021

Choose a reason for hiding this comment

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

Or perhaps because this is a subquery? Not a query

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that might be it


query = results_query.innerjoin(
instance_query,
instance_query.c.instance_id == results_query.c.instance_id
)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Which would mean the type of query is also a subquery

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