-
Notifications
You must be signed in to change notification settings - Fork 1
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
Zip import/export (based from zip-import-export branch) #80
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few misc comments/questions
Co-authored-by: Brian Ward <[email protected]>
Tried in a codespace and cot this error
I think there was a function name change? |
Yep, I committed the change direct from the comment and missed that it needed to be corrected where it is imported as well. Should be fixed now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me! I left a couple comments, none of which are blockers on a merge IMO
// The user has uploaded a single file and it is not a zip file. In | ||
// this case we want to give the user the option whether or not to | ||
// replace the current project. | ||
setShowReplaceProjectOptions(true) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy to leave this until after merge, just echoing my discussion from #53 that I think uploading a single file should keep the drop box enabled to allow you to also add a second/third etc
This is a modification of @magland's zip-import-export branch (PR #53) to use the amended data model from PR #77.
UI features are unchanged from that PR, so I'll refer to that for description, and this write-up will focus on the code changes (particularly as distinct from that PR/branch).
Most of the changes are to back-end files located under the
gui/src/app/SPAnalysis
directory. Front-end changes are undergui/src/app/pages/HomePage/
. A few other smaller changes are in other directories and I'll describe them with full paths.--
Probably the biggest focus of this PR is to establish standardized filesystem representations for the parts of the overall data model (
SPAnalysisDataModel
). This mapping is mainly implemented in FileMapping.ts. I've also created a new file for serialization code in SPAnalysisSerialization.ts. The reducer also had some significant changes to handle some new ways of updating the data model.On the front-end side, code is mostly the same as in @magland's branch. I made some small changes to the ExportWindow.tsx and ImportWindow.tsx components to move some of their logic into the back-end code section (incl. the reducer), but as this is conceived as an update to that branch I tried to leave most of the functionality untouched.
Additionally, I've added
replaceSpaces.ts
andtriggerDownload.ts
functions in theutil
directory; these are small and straightforward.Here are some notes on the back-end changes:
main.stan
,data.json
, etc.)