Skip to content

New version of form-processing script for updated schema - #191

Merged
kvdblom merged 19 commits into
mainfrom
FormUpdate
Oct 12, 2026
Merged

kvdblom merged 19 commits into
mainfrom
FormUpdate

Conversation

@Dvermetten

Copy link
Copy Markdown
Contributor

New (generated) script for converting the form responses (csv file) to the updated schema.

@Dvermetten
Dvermetten requested a review from kvdblom June 2, 2026 11:54
@Dvermetten

Copy link
Copy Markdown
Contributor Author

Now adresses #186

@kvdblom kvdblom left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Github action generate_html fails:

  • when running uv run yaml_to_html.py, because problems.yaml contains '?' where input should be 'yes', 'no', 'some' or 'unknown'.
  • Happens at least for: suite_morepo and suite_cec2015_dmoo
  • Maybe these are ouput of the form processing script? Otherwise we can just change them to unknown and that should fix it

Github action check_new_problems fails:

  • it cannot find module pydantic_yaml
  • Maybe the problem is that: pydantic_yaml is in requirements.txt but not in utils/requirements.txt
  • When running with uv run utils/validate_yaml.py problems.yaml (rather than python utils/validate_yaml.py problems.yaml as in the action), the action fails with ImportError: cannot import name 'default_columns' from 'yaml_to_html'

Execution of formresponse_to_yaml.py fails:

  • When run with uv run formresponse_to_yaml.py, the error No such file or directory: 'responses_OPL.csv' comes up
  • Suggestion: Change the default file name to the correct one
  • Suggestion 2: Add instructions in a README (maybe in utils? Perhaps this entire script should go there?) on how thi should be executed.
  • When run with uv run formresponse_to_yaml.py --csv OPL_form.csv execution fails with 44 validation errors -- Seemingly about execution times not being in the format expected by pydantic (but maybe not limited to that)

@kvdblom

kvdblom commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Merging main back in did no resolve any of these issues.

@Dvermetten

Copy link
Copy Markdown
Contributor Author

Github action generate_html fails:

  • when running uv run yaml_to_html.py, because problems.yaml contains '?' where input should be 'yes', 'no', 'some' or 'unknown'.
  • Happens at least for: suite_morepo and suite_cec2015_dmoo
  • Maybe these are ouput of the form processing script? Otherwise we can just change them to unknown and that should fix it

These are not from the processing, but I did change them to unknown anyway

Github action check_new_problems fails:

  • it cannot find module pydantic_yaml
  • Maybe the problem is that: pydantic_yaml is in requirements.txt but not in utils/requirements.txt
  • When running with uv run utils/validate_yaml.py problems.yaml (rather than python utils/validate_yaml.py problems.yaml as in the action), the action fails with ImportError: cannot import name 'default_columns' from 'yaml_to_html'

I tried changing this to uv, but I think I overlooked something, will check this next week. The column naming this is fixed now

Execution of formresponse_to_yaml.py fails:

  • When run with uv run formresponse_to_yaml.py, the error No such file or directory: 'responses_OPL.csv' comes up
  • Suggestion: Change the default file name to the correct one
  • Suggestion 2: Add instructions in a README (maybe in utils? Perhaps this entire script should go there?) on how thi should be executed.
  • When run with uv run formresponse_to_yaml.py --csv OPL_form.csv execution fails with 44 validation errors -- Seemingly about execution times not being in the format expected by pydantic (but maybe not limited to that)

It seems I forgot to upload the readme last time, that is included now (should also fix the wrong default name for the csv). The validation errors remain an issue, I tried changing how the times are handled but either way I do it the validator complains:

If I make it a string:

impl_randoptgen.Implementation.evaluation_time
Input should be a valid set [type=set_type, input_value='milliseconds', >input_type=str]

If I make it a set:

gen_randoptgen.Implementation.evaluation_time.0
Input should be a valid string [type=string_type, input_value={'milliseconds'}, >input_type=set]

@olafmersmann Do you maybe know what I'm missing here?

@kvdblom

kvdblom commented Sep 15, 2026

Copy link
Copy Markdown
Collaborator

The workflow running python utils/validate_yaml.py should be deactivated and not cause problems anymore. Even when it ran correctly, it was not up to date and reporting incorrect error messages about the yaml.

@kvdblom

kvdblom commented Sep 29, 2026

Copy link
Copy Markdown
Collaborator

The workflow running python utils/validate_yaml.py should be deactivated and not cause problems anymore. Even when it ran correctly, it was not up to date and reporting incorrect error messages about the yaml.

I wanted to merge main back into this branch, to include the updated workflow. But there seem to be some painful conflicts on the problems.yaml.

@Dvermetten Can you confirm there are no new problems/implementations and/or changes to their attribute values in this PR? I.e.: All changes here are purely irrelevant ordering changes.
If that is correct:

  • I think we can just take the YAML from main.
  • For HTML it doesn't matter either way, they will be regenerated anyway; so we could take either version.

@Dvermetten

Copy link
Copy Markdown
Contributor Author

The workflow running python utils/validate_yaml.py should be deactivated and not cause problems anymore. Even when it ran correctly, it was not up to date and reporting incorrect error messages about the yaml.

I wanted to merge main back into this branch, to include the updated workflow. But there seem to be some painful conflicts on the problems.yaml.

@Dvermetten Can you confirm there are no new problems/implementations and/or changes to their attribute values in this PR? I.e.: All changes here are purely irrelevant ordering changes. If that is correct:

  • I think we can just take the YAML from main.
  • For HTML it doesn't matter either way, they will be regenerated anyway; so we could take either version.

I don't see any new problems in this branch that aren't in main. There are some new form entries (from the other hackathon), but I think it is better to do those in a new PR after this one is merged

@kvdblom

kvdblom commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator

The workflow running python utils/validate_yaml.py should be deactivated and not cause problems anymore. Even when it ran correctly, it was not up to date and reporting incorrect error messages about the yaml.

I wanted to merge main back into this branch, to include the updated workflow. But there seem to be some painful conflicts on the problems.yaml.
@Dvermetten Can you confirm there are no new problems/implementations and/or changes to their attribute values in this PR? I.e.: All changes here are purely irrelevant ordering changes. If that is correct:

  • I think we can just take the YAML from main.
  • For HTML it doesn't matter either way, they will be regenerated anyway; so we could take either version.

I don't see any new problems in this branch that aren't in main. There are some new form entries (from the other hackathon), but I think it is better to do those in a new PR after this one is merged

Agreed on doing new problems in a separate PR.

I now merged main back into this (using the YAML + HTML from main).

This seems to have fixed most previously mentioned issues.

@Dvermetten One issue remains/is visible now, as far as I can see:

  • When running uv run formresponse_to_yaml.py the problems.yaml file is changed in many places.
  • It is probably not desirable for it to make more changes than the minimal necessary. I.e., it should probably only add new entries (if any) and not make any other changes to the YAML.

@Dvermetten

Copy link
Copy Markdown
Contributor Author

@kvdblom I think this happens because of the change in schema between when these form-entries were first processed and now. It was happening here even when nothing was updated simply because of the loading and saving of the yaml itself.
I enabled sorting of keys now as well, so together with #203 this should hopefully stop occurring in future commits.

@kvdblom kvdblom left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

  • One minor fix
  • One decision we need to make
  • Other than this it looks good (I don't think anything else weird happens)

Comment thread problems.yaml Outdated
Comment thread problems.yaml Outdated
- authors:
- Carolin Mensendiek
- Henrik Zeipel
- "Oliver Ludger Preu\xDF"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We should decide whether this is what we want. To me it seems more natural to do the formatting of names 'symbols' in the conversion to HTML than in the YAML. But ultimately it is just a decision we need to make.

@kvdblom
kvdblom merged commit 001e03d into main Oct 12, 2026
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.

Identify and implement missing steps for processing google form output to YAML on github

2 participants