Skip to main content

PyBEL Git utilities

Project description

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

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.6
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.6
  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.6

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pybel_git-0.0.2.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

pybel_git-0.0.2-py36-none-any.whl (8.3 kB view details)

Uploaded Python 3.6

File details

Details for the file pybel_git-0.0.2.tar.gz.

File metadata

  • Download URL: pybel_git-0.0.2.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0

File hashes

Hashes for pybel_git-0.0.2.tar.gz
Algorithm Hash digest
SHA256 3bd01d403959d1d7376f7be76e21c20cf8fc2fdf71ee56afb25b89c30f1ea2ee
MD5 7aefb87789e8331eb9db6e7e808b3e3e
BLAKE2b-256 0887aa4225038f20c12a4669a43961dfa3d80b9b45557f8c15c602f14c85f731

See more details on using hashes here.

Provenance

File details

Details for the file pybel_git-0.0.2-py36-none-any.whl.

File metadata

  • Download URL: pybel_git-0.0.2-py36-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3.6
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0

File hashes

Hashes for pybel_git-0.0.2-py36-none-any.whl
Algorithm Hash digest
SHA256 beed5068879d0931bffcf8259ac364a3196b8a2b191b51b972c1826a8b1524db
MD5 e734fc07f50f2702013f64b0ac95b6e8
BLAKE2b-256 180fe285811bbd029a834b219502b8075904b6747c8a303d3b3f9dbaf94ddb71

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page