Package: pybel-git
Git and continuous integration tools for PyBEL to assist in curating BEL.If you’ve foundpybel-gituseful in your work, please consider citing[1]:[1]Hoyt, C. T.,et al. (2019).Re-curation and rational enrichment of knowledge graphs in Biological Expression
Language.Database, 2019, baz068.Usage with Continuous IntegrationBelow are examples on usingpybel-gitwithin the configuration
of several continuous integration services. Additonaly, the-roption can be used to specify required annotations. For example,-rConfidencecan be used during re-curation.Using GitHub and Travis-CITo configureTravis-CIto evaluate the
BEL files that have changed in the latest commit to a in a GitHub
repository on each commit, the followingtravis.ymlfile can
be used:sudo:falsecache:piplanguage:pythonpython:-'3.7'install:-pip install pybel-gitscript:-pybel-git ciCurrently, the build doesn’t use a cached resource file, so this job
might take a long time. Thetravis_waitcommand can be used so the script readstravis_wait 30pybel-gitciand the job will be allowed to run for
thirty (30) minutes.An example repository can be found athttps://github.com/cthoyt/pybel-git-test.
An example build for this repository can be found athttps://travis-ci.com/cthoyt/pybel-git-test/builds/87612373.Using GitLab with GitLab CI/CDTo configureGitLab CI/CDto
evaluate the BEL files that have changed in the latest commit to
a GitLab repository, the following.gitlab-ci.ymlcan be used:test:image:python:3.7script:-pip install pybel-git-pybel-git ciAs with GitHub/Travis-CI, this configuration does not use a cached
resource file. GitLab CI/CD doesn’t seem to offer a wait time, but
it might also not have an issue with timing out, either.An example repository can be found athttps://gitlab.com/cthoyt/pybel-gitlab-example.
An example build for this repository can be found athttps://gitlab.com/cthoyt/pybel-gitlab-example/-/jobs/113454179Using Atlassian BitBucket with Bitbucket PipelinesTo configure a BitBucket Pipelines to evaluate BEL files that have
been changed in the latest commit to a BitBucket repository, the
followingbitbucket-pipelines.ymlca be used:image:python:3.7pipelines:default:-step:caches:-pipscript:-pip install pybel-git-pybel-git ciAn example repository can be found athttps://bitbucket.org/pybel/pybel-bitbucket-example.
An example build for this repository can be found athttps://bitbucket.org/pybel/pybel-bitbucket-example/addon/pipelines/home#!/results/2.Usage with Git Service and Continuous IntegrationDeeper Integration with GitLabPyBEL-Git contains extra scripts to assist in automatic checking and feedback
for projects residing in GitLab that are using the Git Flow workflow of branching
and making merge requests.This script checks each branch, compiles the BEL documents that have changed
compared to master, and puts comments on the merge request with the warnings
and feedback on the syntactic and semantic correctness of the BEL files.It can be run with:pybel-gitci_gitlab\--url"https://gitlab.scai.fraunhofer.de"# the url of the desired gitlab instance \--project-id449# the gitlab project id, shown at the top of the page for the repository \This script usesEasyConfigand can also be configured
via the environment variablesGITLAB_URL,GITLAB_PROJECT_ID, andGITLAB_TOKEN.