How to use the ramp-database.ramp_database.tools.team.sign_up_team 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
def sign_up_teams_to_events(session):
    """Sign up user to the events in the database.

    Parameters
    ----------
    session : :class:`sqlalchemy.orm.Session`
        The session to directly perform the operation on the database.

    Notes
    -----
    Be aware that :func:`add_users`, :func:`add_problems`,
    and :func:`add_events` need to be called before.
    """
    for event_name in ['iris_test', 'boston_housing_test']:
        sign_up_team(session, event_name, 'test_user')
        sign_up_team(session, event_name, 'test_user_2')
github paris-saclay-cds / ramp-board / ramp-database / ramp_database / testing.py View on Github external
def sign_up_teams_to_events(session):
    """Sign up user to the events in the database.

    Parameters
    ----------
    session : :class:`sqlalchemy.orm.Session`
        The session to directly perform the operation on the database.

    Notes
    -----
    Be aware that :func:`add_users`, :func:`add_problems`,
    and :func:`add_events` need to be called before.
    """
    for event_name in ['iris_test', 'boston_housing_test']:
        sign_up_team(session, event_name, 'test_user')
        sign_up_team(session, event_name, 'test_user_2')
github paris-saclay-cds / ramp-board / ramp-database / ramp_database / cli.py View on Github external
def sign_up_team(config, event, team):
    """Sign-up a user (or team) for a RAMP event."""
    config = read_config(config)
    with session_scope(config['sqlalchemy']) as session:
        team_module.sign_up_team(session, event, team)