varfish-org / varfish-cli

VarFish REST API client (CLI + Python package)
MIT License
2 stars 3 forks source link

Creating a small var query from a shortcut results in an error #40

Closed stolpeo closed 1 year ago

stolpeo commented 1 year ago

Describe the bug Creating a small variant query (from a shortcut) results in an error.

To Reproduce Steps to reproduce the behavior:

  1. Use small-var-query-shortcut to create a query using recessive
  2. See error

Expected behavior A query will be created.

Additional context

[I 230404 09:35:29] Creating query
  + Exception Group Traceback (most recent call last):
  |   File "/home/stolpeo/dev/miniconda3/envs/varfish-cli/bin/varfish-cli", line 10, in <module>
  |     sys.exit(main())
  |   File "/home/stolpeo/dev/miniconda3/envs/varfish-cli/lib/python3.8/site-packages/varfish_cli/__main__.py", line 112, in main
  |     res = cmds[args.cmd](
  |   File "/home/stolpeo/dev/miniconda3/envs/varfish-cli/lib/python3.8/site-packages/varfish_cli/case/__init__.py", line 94, in run
  |     return args.case_cmd(config, toml_config, args, parser, subparser)
  |   File "/home/stolpeo/dev/miniconda3/envs/varfish-cli/lib/python3.8/site-packages/varfish_cli/case/small_var_query_settings_shortcut.py", line 36, in run
  |     res = api.small_var_query_settings_shortcut(
  |   File "/home/stolpeo/dev/miniconda3/envs/varfish-cli/lib/python3.8/site-packages/varfish_cli/api/case.py", line 977, in small_var_query_settings_shortcut
  |     return CONVERTER.structure(result.json(), QueryShortcutsResultV1)
  |   File "/home/stolpeo/dev/miniconda3/envs/varfish-cli/lib/python3.8/site-packages/cattrs/converters.py", line 309, in structure
  |     return self._structure_func.dispatch(cl)(obj, cl)
  |   File "<cattrs generated structure varfish_cli.api.models.QueryShortcutsResultV1>", line 14, in structure_QueryShortcutsResultV1
  |     if errors: raise __c_cve('While structuring ' + 'QueryShortcutsResultV1', errors, __cl)
  | cattrs.errors.ClassValidationError: While structuring QueryShortcutsResultV1 (1 sub-exception)
  +-+---------------- 1 ----------------
    | Exception Group Traceback (most recent call last):
    |   File "<cattrs generated structure varfish_cli.api.models.QueryShortcutsResultV1>", line 5, in structure_QueryShortcutsResultV1
    |     res['presets'] = __c_structure_presets(o['presets'], __c_type_presets)
    |   File "<cattrs generated structure varfish_cli.api.models.QuickPresetsV1>", line 39, in structure_QuickPresetsV1
    |     if errors: raise __c_cve('While structuring ' + 'QuickPresetsV1', errors, __cl)
    | cattrs.errors.ClassValidationError: While structuring QuickPresetsV1 (1 sub-exception)
    | Structuring class QueryShortcutsResultV1 @ attribute presets
    +-+---------------- 1 ----------------
      | Traceback (most recent call last):
      |   File "<cattrs generated structure varfish_cli.api.models.QuickPresetsV1>", line 30, in structure_QuickPresetsV1
      |     res['flags_etc'] = __c_structure_flags_etc(o['flags_etc'])
      | KeyError: 'flags_etc'
      | Structuring class QuickPresetsV1 @ attribute flags_etc
      +------------------------------------
stolpeo commented 1 year ago

All occurrences of flags_etc should be renamed to flagsetc.

holtgrewe commented 1 year ago

The query part has been removed for now and later needs to be added back (without this bug).