How to use the beakerx.beakerx.environment.EnvironmentSettings.read_setting_from_file function in beakerx

To help you get started, we’ve selected a few beakerx examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github twosigma / beakerx / beakerx / beakerx / environment.py View on Github external
def read_beakerx_env_settings():
        args = []

        settings = json.loads(EnvironmentSettings.read_setting_from_file())
        beakerx_settings = settings['beakerx']
        if 'jvm_options' in beakerx_settings:
            jvm_settings = beakerx_settings['jvm_options']
            for x in jvm_settings['other']:
                args.append(x)

            for x in jvm_settings['properties']:
                name = x.get('name')
                value = x.get('value')
                value = '-D' + name + '=' + value
                args.append(value)

            if 'heap_GB' in jvm_settings and jvm_settings['heap_GB']:
                val = float(jvm_settings['heap_GB'])
                if val.is_integer():
                    value = '-Xmx' + str(int(val)) + 'g'
github twosigma / beakerx / beakerx / beakerx / handlers.py View on Github external
def _read_property():
        return EnvironmentSettings.read_setting_from_file()