Contributor’s Guide¶
Testing new code¶
Ensure you have Docker installed and running on your system.
Make any necessary changes to
./tests/config.pyIn the root folder for bibt-gcp-scc, run the command:
$ docker build -f ./Dockerfile -t bibt-gcp-scc-test . && docker run bibt-gcp-scc-test
This will build a container and install whatever code you have in
bibt-gcp-scc/as the bibt-gcp-scc library before running any tests intests/usingpytest.Note that you will need a service account credentials file with the requisite permissions on all resources used for tests. This file should be located at:
./creds/service_account.jsonThe account will need at least the following roles in the specified GCP project in order to attempt all tests: -
Storage AdminAnd the following roles on the below resources (values specified in
./tests/config.py): -Storage AdminonTEST_BUCKET
Updating and publishing a new package¶
This project makes use of GitHub Actions and bump2version to automate publishing updates to pypi. See the Github Workflow file and bumpversion file for configuration details. See links below for more resources.
Please keep
CHANGELOG.mdup to date.Please install the following packages:
$ pip install --upgrade bump2version
Note: You cannot publish a package with the same version number as another already-published version! You must use bump2version to increment the current version for a publish to be successful.
# test documentation build
# Note: if stylesheets are not updating, do a `make clean` before building.
$ cd docs
$ make html
# see any undocumented objects
$ make html -b coverage
# Handling an open issue
# ...assign the issue to yourself in Github...
$ git checkout -b issue-1
# ...make fixes...
$ git add .
$ git commit -m "fixes issue-1"
$ git push --set-upstream origin issue-1
# ...open PR to main branch...
# ...PR merged, issue closed automatically...
$ git checkout main
$ git pull
$ git bumpversion
$ git push --tags
# Code packaged, documentation updated, and version released automatically!
$ git add .
$ git commit -m "msg"
# and to update main branch
$ git push
# to trigger a package & release
# make sure you're in the root directory of the repo before running bumpversion
$ bumpversion major|minor|patch # with bump2version, bumpversion is an alias
$ git push --tags