Skip to content

Conversation

@Dvermetten
Copy link
Contributor

Equivalent of csv_to_yaml, but with translation of the column names. Currently does no additional checking.

@Dvermetten Dvermetten requested a review from kvdblom December 11, 2025 09:48
Copy link
Collaborator

@kvdblom kvdblom left a 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"
Copy link
Collaborator

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.)

"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?",
Copy link
Collaborator

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'
Copy link
Collaborator

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.

Copy link
Contributor Author

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?

Copy link
Collaborator

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.

@Dvermetten
Copy link
Contributor Author

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 :)

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