nanotune.configuration.config

class nanotune.configuration.config.Config(path: Optional[str] = None)[source]

Bases: object

nanotune config system.

Heavily inspired by qcodes config class. It loads defaults from config.json, which can be accessed by nt.config.

config_filename = 'config.json'
config_schema_filename = 'config_schema.json'

Default configuration

default_config_path = '/home/runner/work/nanotune/nanotune/nanotune/configuration/config.json'
default_schema_path = '/home/runner/work/nanotune/nanotune/nanotune/configuration/config_schema.json'
user_config_path = '/home/runner/config.json'
user_schema_path = '/home/runner/config_schema.json'

Local user specific configuration

cwd_config_path = '/home/runner/work/nanotune/nanotune/docs/config.json'
cwd_schema_path = '/home/runner/work/nanotune/nanotune/docs/config_schema.json'
current_config: Dict[str, Any] = {}
current_config_path: str = ''
default_config: Dict[str, Any] = {}
default_schema: Dict[str, Any] = {}
load_config(path: str) Dict[str, Any][source]
load_default() Tuple[Dict[str, Any], Dict[str, Any]][source]
update_config(path: Optional[str] = None) Dict[str, Any][source]
validate(json_config: Optional[Dict[str, Any]] = None, schema: Optional[Dict[str, Any]] = None) None[source]

Validate configuration;