def generate_groups(amount=10):
    groups = {}
    for i in xrange(10):
        grp = generate_group()
        grp['id'] = grp['name'] = 'group-{0}'.format(generate_id())
        groups[grp['id']] = grp
    return groups
def generate_organizations(amount=10):
    organizations = {}
    for i in xrange(3):
        org = generate_organization()
        org['id'] = org['name'] = 'org-{0}'.format(generate_id())
        organizations[org['name']] = org
    return organizations
Beispiel #3
0
def generate_groups(amount=10):
    groups = {}
    for i in xrange(10):
        grp = generate_group()
        grp['id'] = grp['name'] = 'group-{0}'.format(generate_id())
        groups[grp['id']] = grp
    return groups
Beispiel #4
0
def generate_organizations(amount=10):
    organizations = {}
    for i in xrange(3):
        org = generate_organization()
        org['id'] = org['name'] = 'org-{0}'.format(generate_id())
        organizations[org['name']] = org
    return organizations
def generate_datasets(groups, organizations, amount=20):
    datasets = {}
    for i in xrange(amount):
        dataset = generate_dataset()
        dataset['id'] = 'dataset-{0}'.format(generate_id())
        dataset['groups'] = random.sample(list(groups), random.randint(0, 3))
        dataset['owner_org'] = random.choice(list(organizations))
        datasets[dataset['id']] = dataset
    return datasets
Beispiel #6
0
def generate_datasets(groups, organizations, amount=20):
    datasets = {}
    for i in xrange(amount):
        dataset = generate_dataset()
        dataset['id'] = 'dataset-{0}'.format(generate_id())
        dataset['groups'] = random.sample(list(groups), random.randint(0, 3))
        dataset['owner_org'] = random.choice(list(organizations))
        datasets[dataset['id']] = dataset
    return datasets