Add dashboard for timeseries management#446
Draft
paulapreuss wants to merge 6 commits into
Draft
Conversation
032dd8c to
3ef5d1b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Will (hopefully) close #403, close #401, close #331, close #332.
The current state is simply a frontend prototype to display what this dashboard could look like (a lot of this code will have to be deleted and replaced). Here are some of the things that need to be handled:
Backend:
Timeseriesis used for a different scenario, a duplicate timeseries gets created, that means that a timeseries might have four duplicates (for each scenario) with the exact same values. It might be better to replace thescenariofield of the Timeseries withprojectand fill those withscenario.projecton the next migration (keeping only one Timeseries), which would get rid of the many duplicates. This would need a custom migration to handle the deletion and replacement of the field values - here we have to be really careful since we would be deleting production database objects. We still might have the issue of a user wanting to share a timeseries between different projects. The options here would be to handle it through aManyToManyfield instead of a strictForeignKey(aTimeseriescan be assigned to multipleProjects) or to simply have the user duplicate this timeseries for the other project (I think this is my preffered option, as this would also avoid issues if for example one project has a different number of timesteps than the other).Timeseriesclass also should get two new metadata fields: ageneration_parametersJSONField (stores the values used to create the timeseries, e.g. if a timeseries is created from an eesyplan method with a specific tilt/azimuth it can store these inputs in a JSON format), and adescriptionTextField where the user can freely add a description to their Timeseries. It was wished that this description would also be shown in the modal when selecting a timeseries on an asset.Frontend:
TimeseriesModelFormout of theTimeseriesclass and feed it to the existing modal template ({% include "modal_template.html" ... %})timeseries_inputdoes, and should make use of the validation pipeline that is already established thereeesyplanmethods should be accessible for creating Timeseries and which inputs they require.