Skip to content

Elements in precice-config.xml need to be in specific order #21

@MakisH

Description

@MakisH

In the current develop, the aste-turbine case does not work with the config-visualizer, because the m2n tag is defined before the participants tags:

https://github.com/precice/tutorials/blob/254f8247afe555e7cffc3ecc20e30a40620cd645/aste-turbine/precice-config.xml#L22-L27

Instead of a useful error message, I get:

~/repos/precice/tutorials/aste-turbine [add-config-visualizations]$ preciceToPNG
Traceback (most recent call last):
  File "/home/gc/.local/bin/precice-config-visualizer", line 8, in <module>
    sys.exit(main())
  File "/home/gc/.local/pipx/venvs/precice-config-visualizer/lib/python3.10/site-packages/preciceconfigvisualizer/cli.py", line 65, in main
    dot = configFileToDotCode(args.infile, args)
  File "/home/gc/.local/pipx/venvs/precice-config-visualizer/lib/python3.10/site-packages/preciceconfigvisualizer/common.py", line 437, in configFileToDotCode
    g = configToGraph(xml, args)
  File "/home/gc/.local/pipx/venvs/precice-config-visualizer/lib/python3.10/site-packages/preciceconfigvisualizer/common.py", line 299, in configToGraph
    lhead=participantClusterName[pto],
KeyError: 'A'

Moving the m2n tag after the participant tags works (implemented in precice/tutorials#514).

I guess the config-visualizer should not care what order the tags are defined in, but if it cares, an error would be helpful. In any case, not so important, as we should write our config files "tell a story". But it could confuse users.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions