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

Improve upload flow #509

Merged
merged 8 commits into from
Oct 1, 2024
Merged

Improve upload flow #509

merged 8 commits into from
Oct 1, 2024

Conversation

floryst
Copy link
Contributor

@floryst floryst commented Sep 18, 2024

  • Report errors to the client
  • allow for zip files to not have region models if an override region is specified
  • list regions and performers in their respective dropdowns in the upload box

@floryst
Copy link
Contributor Author

floryst commented Sep 26, 2024

New changes:

  • fixed pagination off-by-one
  • full upload error tracebacks are sent to the app-level error handler
  • upload button hidden in annotator view

Copy link
Member

@mvandenburgh mvandenburgh left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@floryst floryst mentioned this pull request Sep 27, 2024
Copy link
Contributor

@BryonLewis BryonLewis left a comment

Choose a reason for hiding this comment

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

Push back if you believe this is out of scope for this PR:

Proposal/Annotator Mode Upload Model Run: Either removing the upload button or supporting the upload button with a default that the uploaded model is a 'proposal'.

Background:

The annotator mode used to be called 'proposal' so you'll see that referenced a lot in the code.
https://github.com/ResonantGeoData/RD-WATCH/blob/main/vue/src/router.ts#L16
The above router will take you into proposal mode.
https://github.com/ResonantGeoData/RD-WATCH/blob/main/vue/src/components/LayerSelection.vue#L11C1-L12C1
That code can determine if you are in the proposal/annotator mode by looking at the route to determine it.

Option 1 - Disabling Upload Model:
You could make the visibility of upload model run only occur when not in proposal mode and not in scoring mode here: https://github.com/ResonantGeoData/RD-WATCH/blob/main/vue/src/components/ModelRunList.vue#L192

Option 2 - supporting proposal uploads:
If you want to support proposal uploading, which may be handy in the future. You would keep this in there for proposal mode and then edit the logic in the upload-model-run component to add an additional 'proposal' flag when loading the data.

As seen in the upload script:
https://github.com/ResonantGeoData/RD-WATCH/blob/main/scripts/loadModelRun.py#L120
The proposal is a boolean option when posting to the endpoint.

https://github.com/ResonantGeoData/RD-WATCH/blob/main/rdwatch/core/models/model_run.py#L46
The ModelRun model has a proposal option during creation where this can be added during your processing of the upload: https://github.com/ResonantGeoData/RD-WATCH/blob/main/rdwatch/core/tasks/__init__.py#L859
So just masking it so that upload-model-run vue component understands that it is currently being used in the proposal route and the upload should be processed as a proposal could work, or just disabling the button for now from the proposal route.

@floryst floryst force-pushed the improve-upload-flow branch from 71ea47d to 2bcae1f Compare October 1, 2024 20:20
@floryst
Copy link
Contributor Author

floryst commented Oct 1, 2024

Updated to hide the upload button in the annotator view.

@floryst floryst merged commit e71c84a into main Oct 1, 2024
8 checks passed
@floryst floryst deleted the improve-upload-flow branch October 1, 2024 22:45
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.

3 participants