Пример #1
0
 def setUp(self):
     self.xml_file = os.path.abspath(
         os.path.join('tests', 'test_processes_local', 'helloworld.xml'))
     self.tst_out_file = os.path.abspath(
         os.path.join('tests', 'test_processes_local', 'helloworld.txt'))
     ConfigAccess(
         os.path.abspath(
             os.path.join('tests', 'test_config', 'config_local.json')))
Пример #2
0
        runner_name = sys.argv[2]    

    runner_name = runner_name.upper()

    # create the config file from config_sample.json
    bioimagepy_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)))
    package_dir = Path(bioimagepy_dir).parent

    config_json = read_json(os.path.join(bioimagepy_dir, 'config_sample.json'))
    config_json["process"]["xml_dirs"] = [ os.path.join(package_dir,
                                                        "toolboxes", "tools")]
    config_json["process"]["categories"] = os.path.join(package_dir,
                                                        "toolboxes",
                                                        "toolboxes.json")
    config_json["process"]["tools"] = os.path.join(package_dir, "toolboxes",
                                                   "tools.json")
    config_json["runner"]["service"] = runner_name
    if runner_name == 'DOCKER':
        config_json["runner"]["working_dir"] = os.path.join(package_dir, "userdata")
    config_json["gui"] = {"tmp": os.path.join(package_dir, "userdata")}
    config_json["user"]["name"] = user_name
    config_json["formats"]["file"] = os.path.join(package_dir, "formats.json")

    config_file = os.path.join(package_dir, 'config.json')
    write_json(config_json, config_file)

    # run toolboxes build
    ConfigAccess(config_file)
    builder = Toolboxes()
    builder.build()
Пример #3
0
 def test_access(self):
     ConfigAccess(self.config_local_file) 
     content = ConfigAccess.instance().config
     self.assertTrue(_check_content(content))
Пример #4
0
 def setUp(self):
     self.xml_file = os.path.join('tests', 'test_processes_local', 'svdeconv', 'svdeconv2d.xml')
     ConfigAccess(os.path.join('tests', 'test_config','config_local.json'))