Load¶
load
¶
load_package(package, **kwargs)
¶
Load data and metadata from a datapackage into a GitHub repository.
github
¶
get_repo_settings(package)
¶
Extract and validate repository settings from the package custom metadata.
get_installation_token(app_id, private_key, owner, installation_id=None)
¶
Generate a temporary Installation Access Token using GitHub App credentials.
repo_exists(token, owner, repo, **kwargs)
¶
Check if a GitHub repository exists for a given owner.
create_repo(token, owner, repo, level, visibility, **kwargs)
¶
Create a new GitHub repository under a user or organization.
get_remote_descriptor(owner, repo, token)
¶
Retrieve the datapackage.json currently committed to a GitHub repository. Returns None if the repository has no descriptor yet.
get_deletions(token, files, owner, repo, **kwargs)
¶
Compare the previously committed datapackage.json against the current resource paths and return paths that no longer belong to the data package (removed, merged or renamed resources).
commit_remote(token, files, deletions, owner, repo, **kwargs)
¶
Create a single commit with multiple files using the GitHub Git Data API.
Paths listed in deletions are removed from the tree.
create_commit(url, headers, owner, repo, files, tree, parent, branch)
¶
Create a commit with tree on top of parent and move branch to it.
Without an author in the request, GitHub uses the authenticated user or App.
get_local_descriptor()
¶
Retrieve the datapackage.json currently committed in the local repository. Returns None if there is no previous commit or descriptor.
commit_clone(token, files, deletions, owner, repo, **kwargs)
¶
Push the files to a temporary branch through a clone of the GitHub repository, then create the commit with the GitHub API, as the authenticated user or App. Unlike the blobs API, git accepts large files, and files over GitHub's 100 MB limit are sent with Git LFS.
commit_local(files, deletions=())
¶
Commit and push local repository changes.
Paths listed in deletions are removed from the repository.