Ulm-IQO / qudi-core

A framework for modular measurement applications.
GNU General Public License v3.0
28 stars 21 forks source link

[Bug] Schema validation fails for remote modules #27

Closed drogenlied closed 2 years ago

drogenlied commented 2 years ago

Version

current main

What is affected by the bug?

This part of the schema validation fails because properties for local modules get injected into the config that is being validated:

'additionalProperties': {
                    'oneOf': [
                        {'$ref': '#/$defs/local_module'},
                        {'$ref': '#/$defs/remote_module'}
                    ]

When does the bug occur?

While loading a config with remote modules.

How do we replicate the issue?

Load this config (NVision internal modules needed) or write an equivalent one yourself.

#  Example Qudi configuration file.
#

global:
    # list of modules to load when starting
    startup: []

    remote_modules_server:
        address: 'localhost'
        port: 12345

    namespace_server_port: 18861

    #default_data_dir: 'C:\\Data'

    ## For controlling the appearance of the GUI:
    #stylesheet: 'C:\\Software\\qudi\\qudi-nvision-modules\\src\\qudi\\artwork\\styles\\application\\nvision_laser_v01.qss' # 'qdark.qss'

logic:
    commandlogic:
        module.Class: 'nmr_command_logic.NMRCommandLogic'
        connect:
            command_receiver: 'fieldcyclinglogic'
        options:
            input_pipe: '/home/nmrsu/qudi/qudipipe'
            output_pipe: '/home/nmrsu/qudi/nmrpipe'
            query_interval: 0.1

    fieldcyclinglogic:
        native_module_name: 'field_cycling_logic'
        address: '192.168.1.207'
        port: 12345

Expected behavior

Qudi should accept this config as valid and be usable.

Relevant log output

--

Additional Comments

Current workaround is to set 'additionalProperties': True, in remote_module_config_schema().

Contact Details

No response

Neverhorst commented 2 years ago

Should be fixed with recent hotfix 23811fbf0f332d0f4a74a6aa8ffe646d42bf9f0a