Skip to content
This repository was archived by the owner on Jan 31, 2024. It is now read-only.
This repository was archived by the owner on Jan 31, 2024. It is now read-only.

Use Python dictionaries for internal input representation #121

@OndrejMarsalek

Description

@OndrejMarsalek

I propose that we represent the input file structure internally as Python dictionaries (and lists or single values where appropriate). I also think this should be combined with the idea from some time ago to merge the input processing classes to the actual classes representing the various aspects of the simulation.

Input file parsing (and perhaps checking) would then happen in another separate layer that would be independent of the internal representation. This can be the current XML or other formats, supporting multiple formats would in principle be straightforward. Notably, it would also be possible to provide the input as a text representation of a Python dictionary, which will be useful for the emerging script interface.

Tools already exist to convert between Python dictionaries and XML, using XML processing from the standard library. I think this is the cleanest and most useful way to proceed. As a bonus, everyone on the different sides on the XML discussion should be happy 😉

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions