Skip to main content

Git and continuous integration tools for PyBEL to assist in curating BEL.

If you’ve found pybel-git useful in your work, please consider citing [1]:

Usage with Continuous Integration

Below are examples on using pybel-git within the configuration of several continuous integration services. Additonaly, the -r option can be used to specify required annotations. For example, -r Confidence can be used during re-curation.

Using GitHub and Travis-CI

To configure Travis-CI to evaluate the BEL files that have changed in the latest commit to a in a GitHub repository on each commit, the following travis.yml file can be used:

sudo: false
cache: pip
language: python
python:
  - '3.7'
install:
  - pip install pybel-git
script:
  - pybel-git ci

Currently, the build doesn’t use a cached resource file, so this job might take a long time. The travis_wait command can be used so the script reads travis_wait 30 pybel-git ci and the job will be allowed to run for thirty (30) minutes.

An example repository can be found at https://github.com/cthoyt/pybel-git-test. An example build for this repository can be found at https://travis-ci.com/cthoyt/pybel-git-test/builds/87612373.

Using GitLab with GitLab CI/CD

To configure GitLab CI/CD to evaluate the BEL files that have changed in the latest commit to a GitLab repository, the following .gitlab-ci.yml can be used:

test:
  image: python:3.7
  script:
    - pip install pybel-git
    - pybel-git ci

As 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 at https://gitlab.com/cthoyt/pybel-gitlab-example. An example build for this repository can be found at https://gitlab.com/cthoyt/pybel-gitlab-example/-/jobs/113454179

Using Atlassian BitBucket with Bitbucket Pipelines

To configure a BitBucket Pipelines to evaluate BEL files that have been changed in the latest commit to a BitBucket repository, the following bitbucket-pipelines.yml ca be used:

image: python:3.7

pipelines:
  default:
    - step:
        caches:
          - pip
        script:
          - pip install pybel-git
          - pybel-git ci

An example repository can be found at https://bitbucket.org/pybel/pybel-bitbucket-example. An example build for this repository can be found at https://bitbucket.org/pybel/pybel-bitbucket-example/addon/pipelines/home#!/results/2.

Usage with Git Service and Continuous Integration

Deeper Integration with GitLab

PyBEL-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-git ci_gitlab \
         --url "https://gitlab.scai.fraunhofer.de"  # the url of the desired gitlab instance \
     --project-id 449  # the gitlab project id, shown at the top of the page for the repository \

This script uses EasyConfig and can also be configured via the environment variables GITLAB_URL, GITLAB_PROJECT_ID, and GITLAB_TOKEN.

Metadata

Release files for pybel-git 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pybel-git 0.1.0
File Size Uploaded
pybel_git-0.1.0.tar.gz 8.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pybel-git 0.1.0
File Interpreter ABI Platform
pybel_git-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 17.3 kB

Release files / pybel_git-0.1.0.tar.gz

Download URL pybel_git-0.1.0.tar.gz
Size 8.7 kB
Tags Source
SHA-256 checksum
How to use checksums
83e5e00a911203c4c95a06b7a1266c3e4686c6026ea3909efb40ee20af1f0d5d
BLAKE2b-256 checksum
How to use checksums
500f7cbcfe28cfa2d81583aa3be93f280e8a11c7c822254dfe99a57cf9a80061
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.4

Release files / pybel_git-0.1.0-py3-none-any.whl

Download URL pybel_git-0.1.0-py3-none-any.whl
Size 8.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2e5606bc80befd7bbdd952b50994c211714f469357d273e84cd795d4a809a870
BLAKE2b-256 checksum
How to use checksums
25357b9cb386c26c97d134f14e14c2b9c6eeb1a5510e4d024e40de18e6086705
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.4

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page