-
Notifications
You must be signed in to change notification settings - Fork 3
Add form-csv to yaml converter #140
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
base: main
Are you sure you want to change the base?
Conversation
kvdblom
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.
Some small changes / points for discussion
| import pandas as pd | ||
| import yaml | ||
|
|
||
| csv_file = "OPL_form.csv" |
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.
Could you add this file to the repository as example?
(Please make sure to first anonymise submitter name+email and any other possible personal details.)
formresponse_to_yaml.py
Outdated
| "Problem Source":"source (real-world/artificial)", | ||
| "Link to Implementation" :"implementation", | ||
| "Short description of problem(s)":"textual description", | ||
| # "Do you wish to provide some more detailed information about the proposed problems?", |
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.
It would be a shame to lose these things. Perhaps, in general, any unknown non-empty fields could be added to "other info", until we handle it properly?
| - name: MECHBench | ||
| suite/generator/single: Problem Suite | ||
| variable type: Continuous | ||
| dimensionality: scalable' |
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.
Where does the trailing quote come from?
Not sure if it causes problems (I suppose not?), but may be good to check + why it happens.
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.
It seems to be happening when responses are moved from google's form to sheets (which is how I get the csv). I'm not sure if that behavior is changeable, should I instead just remove all quotes from text to be safe?
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.
Might be best to leave it alone (if there are no issues with the yaml). There could be legitimate reasons for quotes to be entered, maybe? Anyway, probably best to be cautious about removing things.
|
Status: I added the csv as an example, and added the other info as nested fields to other info in the yaml. I still need to remove non-empty fields, and check if suites already exist rather than just appending them again. That is for the next working meeting :) |
Equivalent of csv_to_yaml, but with translation of the column names. Currently does no additional checking.