Beispiel #1
0
def main(api_endpoint):
    api_key = input('Enter API KEY: ')
    project_id = input('Enter project id: ')
    title = input(
        'Enter a new title (leave blank and press [Enter] to leave title as is): ').strip()
    description = input(
        'Enter a new description (leave blank and press [Enter] to leave description as is): ').strip()

    kauth = KiliAuth(api_key=api_key, api_endpoint=api_endpoint)
    playground = Playground(kauth)
    playground.update_properties_in_project(
        project_id=project_id, title=title, description=description)
Beispiel #2
0
def main(api_endpoint):
    api_key = input('Enter API KEY: ')
    project_id = input('Enter project id: ')
    instructions = input(
        'Enter link to instructions (leave blank and press [Enter] to disable instructions): '
    ).strip()

    if not instructions.startswith('http') and not instructions == '':
        raise Exception(
            'The link to instructions should be an URL beginning in http:// or https://'
        )

    kauth = KiliAuth(api_key=api_key, api_endpoint=api_endpoint)
    playground = Playground(kauth)
    playground.update_properties_in_project(project_id=project_id,
                                            instructions=instructions)
Beispiel #3
0
def main(api_endpoint):
    email = input('Enter email: ')
    password = getpass.getpass()
    project_id = input('Enter project id: ')
    title = input(
        'Enter a new title (leave blank and press [Enter] to leave title as is): '
    ).strip()
    description = input(
        'Enter a new description (leave blank and press [Enter] to leave description as is): '
    ).strip()

    kauth = KiliAuth(email, password, api_endpoint=api_endpoint)
    playground = Playground(kauth)
    playground.update_properties_in_project(project_id=project_id,
                                            title=title,
                                            description=description)
        },
        "JOB_1": {
            "mlTask": "TRANSCRIPTION",
            "instruction": "Transcription of A",
            "required": 1,
            "isChild": True
        },
        "JOB_2": {
            "mlTask": "TRANSCRIPTION",
            "instruction": "Transcription of B",
            "required": 1,
            "isChild": True
        }
    }
}

user_id = playground.auth.user_id
project = playground.create_empty_project(user_id=user_id)
playground.update_properties_in_project(project_id=project['id'],
                                        title=title,
                                        description=description,
                                        json_interface=json_interface)

emails = [
    '*****@*****.**', '*****@*****.**'
]
for email in emails:
    playground.append_to_roles(project_id=project['id'],
                               user_email=email,
                               role='ADMIN')