datacatalog.linkedstores.challenge_problem.mappings.gdrive package

Submodules

datacatalog.linkedstores.challenge_problem.mappings.gdrive.build_list module

datacatalog.linkedstores.challenge_problem.mappings.gdrive.errors module

exception datacatalog.linkedstores.challenge_problem.mappings.gdrive.errors.ExperimentReferenceError[source]

Bases: Exception

exception datacatalog.linkedstores.challenge_problem.mappings.gdrive.errors.GoogleSheetsError[source]

Bases: datacatalog.linkedstores.challenge_problem.mappings.gdrive.errors.ExperimentReferenceError

exception datacatalog.linkedstores.challenge_problem.mappings.gdrive.errors.IncorrectConfiguration[source]

Bases: datacatalog.linkedstores.challenge_problem.mappings.gdrive.errors.ExperimentReferenceError

exception datacatalog.linkedstores.challenge_problem.mappings.gdrive.errors.LookupNotPopulated[source]

Bases: datacatalog.linkedstores.challenge_problem.mappings.gdrive.errors.ExperimentReferenceError

exception datacatalog.linkedstores.challenge_problem.mappings.gdrive.errors.MappingNotFound[source]

Bases: datacatalog.linkedstores.challenge_problem.mappings.gdrive.errors.ExperimentReferenceError

exception datacatalog.linkedstores.challenge_problem.mappings.gdrive.errors.UnsupportedMapping[source]

Bases: NotImplementedError

datacatalog.linkedstores.challenge_problem.mappings.gdrive.gdrive module

class datacatalog.linkedstores.challenge_problem.mappings.gdrive.gdrive.ExperimentReferenceMapping(mapper_config, google_client=None, google_client_path=None)[source]

Bases: object

encode_title_as_id(textstring)[source]
id_to_title(id)[source]
id_to_uri(id)[source]
populate()[source]

Populate lookup cache. We do not do this at init() time to avoid thrashing the API client during testing

title_to_id(title)[source]
title_to_uri(title)[source]
uri_to_id(uri)[source]
uri_to_title(uri)[source]

datacatalog.linkedstores.challenge_problem.mappings.gdrive.google_utils module

datacatalog.linkedstores.challenge_problem.mappings.gdrive.google_utils.get_drive_service(credential_path='service_account.json', scopes=['https://www.googleapis.com/auth/drive.metadata.readonly'])[source]

Set up interface for interacting with Google Drive.

Relies on service account credentials

datacatalog.linkedstores.challenge_problem.mappings.gdrive.google_utils.get_files(filename, folder_id, drive_service=None)[source]

Return a list of dicts representing the matches to the file.

datacatalog.linkedstores.challenge_problem.mappings.gdrive.quickstart_service module

datacatalog.linkedstores.challenge_problem.mappings.gdrive.quickstart_service.main()[source]