dvcurator.github

Attributes

github_api

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[, token, repo])

Check if a project has existing github tickets

create_project(dv, project_name, token[, repo])

Trigger a "create a project" workflow in a GitHub repository.

Module Contents

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, token=None, repo=None)

Check if a project has existing github tickets

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

  • token (String or None) – Github token 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, project_name, token, repo=None)

Trigger a “create a project” workflow in a GitHub repository.

Parameters:
  • project_name (str) – The name of the project to be created.

  • token (str) – The GitHub API token for authentication.

  • repo (str, optional) – The repository where the project will be created. If not provided, the default repository will be used.

Returns:

A dictionary containing the response from the GitHub API.

Return type:

dict

Raises:

requests.exceptions.RequestException – If there is an error with the HTTP request.