dvcurator.github

Module Contents

Functions

check_version()

Check whether the running version is the same as the newest github tag

check_repo([key, repo])

Check whether github repository exists

search_existing(project_name[, key, repo])

Check if a project has existing github tickets

create_project(dv_metadata, folder_name, repo, key)

Create a github project (classic) in kanban format with metadata from dataverse

add_issue(project_name, template, repo, project, key)

Add an issue to a project based on a template

generate_template(metadata, project_name, token[, repo])

Generate a github project (classic) with issues for a curation project

Attributes

github_api

dvcurator.github.github_api = 'https://api.github.com'
dvcurator.github.check_version()

Check whether the running version is the same as the newest github tag

Returns:

Whether a new update is available on github

Return type:

boolean

dvcurator.github.check_repo(key=None, repo=None)

Check whether github repository exists

Parameters:
  • key (String or None) – Github API key, or None for public repository

  • repo (String or None) – Github repository path (e.g. QualitativeDataRepository/dvcurator-python), or None for default

Returns:

Whether or not the repository is accessible

Return type:

boolean

dvcurator.github.search_existing(project_name, key=None, repo=None)

Check if a project has existing github tickets

Parameters:
  • project_name (String) – Project name to check for existing tickets

  • key (String or None) – Github API key, or None for public repository

  • repo (String or None) – Github repository path (e.g. QualitativeDataRepository/dvcurator-python), or None for default

Returns:

Whether or not there are any existing tickets with the specified project name

Return type:

boolean

dvcurator.github.create_project(dv_metadata, folder_name, repo, key)

Create a github project (classic) in kanban format with metadata from dataverse

Parameters:
  • dv_metadata – Dataverse metadata, from get_metadata()

  • folder_name (string) – Name of the dropbox folder, used a a prefix for the project title

  • repo (string) – Github repository to put the project in (e.g. QualitativeDataRepository/dvcurator-python)

  • key (string) – Github API token

Returns:

ID of the Todo column in the project

Return type:

string

dvcurator.github.add_issue(project_name, template, repo, project, key)

Add an issue to a project based on a template

Parameters:
  • project_name (string) – Name of the project, prefix on the issue name

  • template (string) – Path to the template file for the issue body

  • repo (string) – Github repository to put the project in (e.g. QualitativeDataRepository/dvcurator-python)

  • project (string) – ID to add the issue to, use column ID from create_project()

  • key (string) – Github API token

dvcurator.github.generate_template(metadata, project_name, token, repo=None)

Generate a github project (classic) with issues for a curation project

Parameters:
  • metadata – Dataverse metadata from get_metadata()

  • folder_name (string) – Name of the dropbox folder, used a a prefix for the project title

  • token (string) – Github API token

  • repo (string) – Optional. Github repository to put the project in (e.g. QualitativeDataRepository/dvcurator-python)