Git Product home page Git Product logo

birg_ci's Introduction

bioconda_recipe_gen_ci

CI tools for managing the repository: https://github.com/Hogfeldt/bioconda_recipe_gen

This repo contains multiple scripts that together makes up our testing pipeline. The flow is:

  1. git_differ
  2. cmake_filter
  3. br_build_filter
  4. Two different ways to run the tests
    • command_builder and then brg_buildtest (uses from-args flag)
    • depedency_tester (uses from-files flag)

If you don't need a the pipeline to run as a cron job, but just need to run it a single time (where you know the packages you will run on) you only need br_build_filter and depedency_tester. How this works is described in next section.

Main scripts and how to use them

br_build_filter.py

This script takes one required argument and two optional arguments:

  • (Required) Path to the bioconda-recipe/recipes folder.
  • (Optional) Path to a yaml file of the following format:
sha: <sha for file>
packages:
    <pkg_name_1>: <url_to_download_source_code>
    <pkg_name_2>: <url_to_download_source_code>
    <pkg_name_3>: <url_to_download_source_code>
    ...
  • (Optional) Path to where the output file should be placed

The output file has the same format as the input yaml file, but does only contain the packages that can be built with bioconda-utils.

dependency_tester.py

This script takes two arguments:

  • (Required) Path to the bioconda-recipe/recipes folder
  • (Optional) Path to the output file from running br_build_filter.py

This script runs bioconda-recipe-gen on all the packages in the input file. The output is saved in a folder called test_result that will be created in the current working directory.

General info about the two scrips

If you don't give the optional flags, the program will load/save in a folder, that it creates, called .bri_ci. This is used for when running all scripts together as a pipeline.

Since the 'full' pipeline was designed to only work if the previous step has changed, you will need to manually make sure that the SHA in each file gets changed (just remove it) if you want to run on the same input twice. Otherwise, the script will just output that it found no changes to process.

Other scripts

The other scripts doesn't allow for the optional flags. They assume they are being run after each other (in the order described earlier). Here is a short description of the scrips:

  • git_differ: is used to see if there are any new packages on bioconda-recipes that needs to be built
  • cmake_filter: takes the output from git_differ as input and returns a list of packages that make use of cmake. (Note: we don't have a python_filter yet, but that would be a good PR)
  • command_builder: first part in the alternative to dependency_tester. Creates a list of commands that can be used as input to brg_buildtest
  • brg_buildtest: does the same as dependecy_parser, but takes another input

birg_ci's People

Contributors

hogfeldt avatar jesperbrink avatar

Watchers

 avatar  avatar  avatar

birg_ci's Issues

List packages with errors

To help Bioconda, it could be nice to create a log of packages, which we have to skip because of errors in the recipe. An example of an error could be duplicate keys like having two about sections in the recipe.

Duplicated keys in meta.yaml

The bioconda-util.Recipe class cannot handle duplicate keys.
An example of a duplicated key is in the package Mira, where there is an url for linux and an url for mac:

package:
  name: mira
  version: '4.0.2'

build:
  number: 3
  # TODO - this ought to work on osx as well
  skip: True # [not linux]

source:
  url: https://downloads.sourceforge.net/project/mira-assembler/MIRA/stable/mira_4.0.2_linux-gnu_x86_64_static.tar.bz2 # [linux]
  sha256: d3c74a6b402192e01d10adb8dbdc3450d4033fa0e7662ce5ce5de4f8c1967813 # [linux]
  url: https://downloads.sourceforge.net/project/mira-assembler/MIRA/stable/mira_4.0.2_darwin13.1.0_x86_64_static.tar.bz2 # [osx]
  sha256: 3cdfba4be7bde1a97b15259b9fd3216c4369d906ea20f5f360f30dc0d83e7b8e # [osx]

# No build requirements as using the author's binaries.
requirements:
  build:
  run:

test:
  commands:
    - mira --help

about:
  home: https://sourceforge.net/p/mira-assembler/wiki/Home/
  license: 'GNU General Public License v2 or later (GPLv2+)'
  license_file: LICENCE
  summary: 'MIRA is a whole genome shotgun and EST sequence assembler for Sanger, 454, Solexa (Illumina), IonTorrent data and PacBio (the later at the moment only CCS and error-corrected CLR reads)'

extra:
  identifiers:
    - biotools:mira

Create a checksum system to check if packages have changed

When we download and try to build packages to decide rather the package can be use as a test for bioconda-recipe-gen, it could be nice if we only look at packages that have changed since last time.
This could probably be achieved by making an md5 checksum on all folders in bioconda-recipe/recipes or maybe we can use git to find the differences from the last time we ran a test.

Refactor filter_candidates

Filter_candidates uses code from the bioconda_recipe_gen project, but by duplicating it. Instead we would like to use bioconda_recipe_gen as a library.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.