Skip to content
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

input_validator_flags unexpected behaviour with test data groups #208

Open
bandgeekdante opened this issue Jun 14, 2022 · 1 comment
Open

Comments

@bandgeekdante
Copy link

bandgeekdante commented Jun 14, 2022

According to https://www.kattis.com/problem-package-format/spec/problem_package_format, the input_validator_flags key in testdata.yaml should interpret a filename string as "the name of the input validator that will be used for this test data group". However, when I set the flag with a custom validator for each group (each .ctd files), the validators try to validate themselves (i.e. they take as input the validator file, as opposed to the input file). This doesn't match my interpretation of the documentation, but maybe I'm interpreting it wrong. How should I correctly have a separate validator for each test group?

@bandgeekdante
Copy link
Author

bandgeekdante commented Jun 14, 2022

If instead I try to use input_validator_flags as a map, I get the following error:

Traceback (most recent call last):
  File "/usr/local/bin/verifyproblem", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.8/dist-packages/problemtools/verifyproblem.py", line 1540, in main
    [errors, warnings] = prob.check(args)
  File "/usr/local/lib/python3.8/dist-packages/problemtools/verifyproblem.py", line 1471, in check
    item.check(args)                                                                                                                                                                                                                           
  File "/usr/local/lib/python3.8/dist-packages/problemtools/verifyproblem.py", line 913, in check
    collect_flags(self._problem.testdata, all_flags)
  File "/usr/local/lib/python3.8/dist-packages/problemtools/verifyproblem.py", line 912, in collect_flags
    collect_flags(subgroup, flags)
  File "/usr/local/lib/python3.8/dist-packages/problemtools/verifyproblem.py", line 912, in collect_flags
    collect_flags(subgroup, flags)
  File "/usr/local/lib/python3.8/dist-packages/problemtools/verifyproblem.py", line 910, in collect_flags
    flags.add(group.config['input_validator_flags'])
TypeError: unhashable type: 'dict'

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

No branches or pull requests

1 participant