ukaea/JSON-mapping-plugin

Functionality for top-level globals.json

Closed this issue · 0 comments

All IDSs have an associated globals.json that needs to be loaded into the mapping plugin.
The plugin currently has a map of globals with the IDS name as key (defined in mapping_handler.cpp)

Problem: each globals.json duplicates PLUGIN_ARGS for the plugins it uses, e.g.

    "DEG2RAD": 0.0174532925199,
    "PLUGIN_ARGS": {
        "DRAFT_JSON": {
            "source": "{{ shot }}"
        },
        "UDA": {
            "source": "{{ shot }}",
            "host": "uda2.hpc.l",
            "port": "56565"
        },
        "TEMP_GEOM": {
            "source": "{{ shot }}",
            "host": "uda2.hpc.l",
            "port": "56565"
        }
    },

Solution: Implement top-level globals.json per machine, add this to arguments for passed globals for each IDS, and remove from the separate globals.json

./mastu
├── globals.json
├── magnetics
│   ├── globals.json
│   └── mappings.json
├── pf_active
│   ├── connections_pf.json
│   ├── globals.json
│   └── mappings.json

Making an issue so I don't forget but should be relatively simple.

@jholloc @stephen-dixon let me know if you had any issues thoughts on the best way to do this