-
Notifications
You must be signed in to change notification settings - Fork 2
Script to generate Material Sheet options #50
base: develop
Are you sure you want to change the base?
Conversation
…ng preferred units function
get_preferred_unit method works single_options can return a successful df
added some comments and doc strings for clarity
…stead and called output.xlsx
…bles, changed instruction for uncertainty_type
…at they need from the dropdown
CVilla17
left a comment
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 while back I learned that it's not great practice to keep an excel file in your master branch of code if you're using github because no matter when you clone the repo that file is downloaded in some regard. For example, if later on we got rid of that file or replace it with a different one, you would still have to download the old file as part of the repo's history. The code is great and helpful, but I would suggest keeping the file in the organizations drive and calling on it locally whenever we want to run this.
because other sheets will need this algorithm too and its good to differentiate
|
@nh916 does this still include a manual step of copy-paste the controlled vocab? we should aim to eliminate the manual process |
fixed process_source.xlsx and material_source.xlsx to have correct vocabulary
renamed because it is for both process sheet and material sheet
|
@brili it does. If I can make the request to an endpoint to get a JSON of keys I think that could help eliminate this issue. However, I think there is a bigger problem with this solution in that the options are a lot and Excel cannot handle it and is often crashing |
|
@CVilla17 hmmm, I dont think that would happen from my experience but if you have an example or something let me know and I can look more into it |
From what I've read online people suggest using something called Git LFS for things like excel files, especially if they are over 100MB |
|
@CVilla17 yeah I've read about that too, but I think that is only for Large File Storage because Git will reject pushes that are more than 100MB. I think the best test for this is to create a separate repo and try to insert an Excel file and then remove it and see if it still happens |
|
@bearmit do you have the endpoints for how to get the controlled vocabulary? |
This part is not complete. I just know the base URL is like EDIT: for info, URL is node oriented, not key oriented: example |
Script to generate
Material Sheetcontrolled vocabularyDescription
This is the implementation that generates all the options for the Excel Uploader material sheet.
This code is only for the material sheet because the other sheets do not have nesting and can just be copied and pasted from the online controlled vocabulary.
How it works
It works by:
source.xlsxsheetsmaterial_sheet_keys.pygenerates all the options by:source.xlsxfileproperty:conditionutils/excel_files/output.xlsxoutput.xlsxand paste them into the hidden sheet of theCRIPT_template.xlsx