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

Replace old Timeseries field with Timeseries model #277

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

paulapreuss
Copy link
Collaborator

@paulapreuss paulapreuss commented Oct 31, 2024

This is WIP for implementing Timeseries

What is done

  • The existing migrations rename the old field, include the new Foreignkey field and create new Timeseries instances from the existing input_timeseries data. It should be possible to roll back all of these migrations if necessary.
  • The field to upload the Timeseries is replaced by the custom MultiWidget input field. If a file or manual input are set in the form, a new Timeseries instance is created that will be added to the dropdown.

What is not yet working

  • There is some fine tuning to be done on how to handle the timeseries upload, e.g. if the user should be able to input a custom name (currently it is taken from the filename/asset if I remember correctly)
  • In my opinion, when the form for an existing asset is opened, the widget should be active on the "select" part, with the appropriate Timeseries instance (that was either uploaded or selected before) selected by default. I could not manage to set this up through the initial attributes of the form though
  • The JS functions to update the plot based on the selected Timeseries is not yet updated - I saw that there is already something set up for it but have not touched it
  • Once everything is working (!), we can delete input_timeseries_old and create the last necessary migration

In general, I think there is a lot of "prettier" handling that could be done here, or put in more appropriate places... I saw that the structure you set up is already quite sophisticated and I'm not sure I really got the full extent of it. Feel free to have a look and then we can regroup and talk about it in more detail when I'm back from holiday :).

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.

1 participant