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 install
Follow 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": false
withinconfig.json
.
Run:
python3 hubcap/hubcap.py
WARNING: Use with caution -- will modify state.
- Set
"repo": "hub.getdbt.com"
withinconfig.json
(since hub.getdbt.com is the production repository). - Set
"push_branches": true
withinconfig.json
.
Run:
python3 hubcap/hubcap.py
python -m pytest
Or just:
tox
Download and install act
then:
act
For Apple M1 Mac users, might need to do this:
act --container-architecture linux/amd64
Put any first degree dependencies within requirements.in
, then run:
pip-compile
It will generate a new version of requirements.txt
with each transitive dependency pinned to a specific version.