Instructions for POSIX bash/zsh (see here for syntax for other shells):
python3 -m venv env
source env/bin/activate
python3 -m pip install --upgrade pip
python3 -m pip install -r requirements.txt -r requirements-dev.txt
source env/bin/activate
pre-commit installFollow these instructions to configure a PAT in GitHub.
Scopes:
- repo (and all sub-items)
- workflow
Save the token to a secure location. Click the "Configure SSO" button and "Authorize" if applicable.
cp config.example.json config.json
# Add the relevant GitHub username, email address and token
$EDITOR config.json
# Export the JSON credentials into an environment variable
export CONFIG=$(<config.json)- Set
"repo": "hub.getdbt.com-test"withinconfig.json(or specify some other non-production repository). - Optional: set
"push_branches": falsewithinconfig.json.
Run:
python3 hubcap.pyWARNING: Use with caution -- will modify state.
- Set
"repo": "hub.getdbt.com"withinconfig.json(since hub.getdbt.com is the production repository). - Set
"push_branches": truewithinconfig.json.
Run:
python3 hubcap.pypython -m pytestOr just:
toxDownload and install act then:
actFor Apple M1 Mac users, might need to do this:
act --container-architecture linux/amd64Put any first degree dependencies within requirements.in, then run:
pip-compileIt will generate a new version of requirements.txt with each transitive dependency pinned to a specific version.