def create()

in iact3/config.py [0:0]


    def create(cls: Type[T],
               global_config_path: Path = GENERAL_CONFIG_FILE,
               project_config_file: Path = DEFAULT_CONFIG_FILE,
               args: Optional[dict] = None,
               project_path: str = None,
               fail_ok: bool = False) -> T:
        if not project_path:
            project_path = DEFAULT_PROJECT_ROOT
        project_root: Path = Path(project_path).expanduser().resolve()
        project_config_path = project_root / project_config_file
        sources = [
            cls.generate_from_file(global_config_path),
            cls.generate_from_file(project_config_path, fail_ok=fail_ok),
            args or {}
        ]
        config = reduce(cls.merge, sources)
        general_config = config.get(GENERAL, {})
        merged_project_config = cls.merge(general_config, config.get(PROJECT, {}))
        merged_test_configs = {
            key: cls.merge(merged_project_config, value) for key, value in config.get(TESTS, {}).items()
        }
        return cls.from_dict({
            GENERAL: general_config,
            PROJECT: merged_project_config,
            TESTS: merged_test_configs
        })