How to use the ramp-database.ramp_database.tools.event.add_keyword function in ramp-database

To help you get started, we’ve selected a few ramp-database 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 paris-saclay-cds / ramp-board / ramp-database / ramp_database / testing.py View on Github external
Parameters
    ----------
    session : :class:`sqlalchemy.orm.Session`
        The session to directly perform the operation on the database.
    """
    ramp_configs = {
        'iris': read_config(ramp_config_iris()),
        'boston_housing': read_config(ramp_config_boston_housing())
    }
    for problem_name, ramp_config in ramp_configs.items():
        internal_ramp_config = generate_ramp_config(ramp_config)
        setup_ramp_kit_ramp_data(internal_ramp_config, problem_name, depth=1)
        add_problem(session, problem_name,
                    internal_ramp_config['ramp_kit_dir'],
                    internal_ramp_config['ramp_data_dir'])
        add_keyword(session, problem_name, 'data_domain',
                    category='scientific data')
        add_problem_keyword(session, problem_name=problem_name,
                            keyword_name=problem_name)
        add_keyword(session, problem_name + '_theme', 'data_science_theme',
                    category='classification')
        add_problem_keyword(session, problem_name=problem_name,
                            keyword_name=problem_name + '_theme')
github paris-saclay-cds / ramp-board / ramp-database / ramp_database / testing.py View on Github external
"""
    ramp_configs = {
        'iris': read_config(ramp_config_iris()),
        'boston_housing': read_config(ramp_config_boston_housing())
    }
    for problem_name, ramp_config in ramp_configs.items():
        internal_ramp_config = generate_ramp_config(ramp_config)
        setup_ramp_kit_ramp_data(internal_ramp_config, problem_name, depth=1)
        add_problem(session, problem_name,
                    internal_ramp_config['ramp_kit_dir'],
                    internal_ramp_config['ramp_data_dir'])
        add_keyword(session, problem_name, 'data_domain',
                    category='scientific data')
        add_problem_keyword(session, problem_name=problem_name,
                            keyword_name=problem_name)
        add_keyword(session, problem_name + '_theme', 'data_science_theme',
                    category='classification')
        add_problem_keyword(session, problem_name=problem_name,
                            keyword_name=problem_name + '_theme')