Installation

Preliminary Git and GitHub setup

Note

Existing users of git/GitHub should be able to skip a number of steps in this preliminary setup section.

First, some preliminary git/GitHub setup that will allow you to push and pull code securely:

# NOTE: Substitute your own name and email below!!
git config --global user.name "John Doe"
git config --global user.email johndoe@example.com

Install DataKit libraries

Next, install the core DataKit library and the datakit-project and datakit-github plugins:

pip install --user datakit-core datakit-project datakit-github

Generate GitHub API token

Next, you must generate a personal GitHub API token with all permissions for the repo scope. This will enable datakit to automate interactions with the GitHub API (e.g. to auto-generate a project on GitHub).

Add API token to config

With the API token in hand, store it in the configuration file for the datakit-github plugin. This file must be located inside the home directory for datakit configurations.

On Mac/Linux systems, you should create ~/.datakit/plugins/datakit-github/config.json file with the below commands:

# First ensure the plugin directory exists
mkdir -p ~/.datakit/plugins/datakit-github/
# Create a blank configuration file
touch ~/.datakit/plugins/datakit-github/config.json

Lastly, edit the newly created file so that it contains the below, replacing GITHUB_API_TOKEN with your actual key:

{"github_api_key": "GITHUB_API_TOKEN"}

Note

Please be sure to avoid extraneous white space and preserve the double quotes. This must be valid JSON!!