注:本文适用于非 Bioconda 成员
Step0:软件开发与GitHub操作
(1) 将开发完成的软件上传到GitHub
(2) 在本地软件目录下创建tag
$git tag v1.0.0 -m 'first version'
(3) 上传到GitHub
$git push origin v1.0.0
(4) 存档tag(非必需)
$git archive -v --format=tar v1.0.0 > v1.0.0.tar.gz
(5) 计算压缩包的"sha256"以供bioconda校验
$sha256sum v1.0.0.tar.gz
Step1:fork bioconda-recipes
(1)进入 bio-conda GitHub页;
(2)点击右上角的 “Fork”;
(3)操作完成后在用户自己的 GitHub 内得到了一份 “<USERNAME>/bioconda-recipes”,我的用户名为 “liaochenlanruo”,因此我得到的是 “liaochenlanruo/bioconda-recipes”。
Step2:将项目克隆到本地
$git clone https://github.com/liaochenlanruo/bioconda-recipes.git
Step3: Then add the main bioconda-recipes repo as an upstream remote to more easily update your branch with the upstream master branch:
$cd bioconda-recipes
$git remote add upstream https://github.com/bioconda/bioconda-recipes.git
Step4:更新 repo
$git checkout master
$git pull upstream master
$git push origin master
Step5:写自己的 recipe
例如,创建并切换到一个名字为 “pgcgap” 的 新分支
$git checkout -b pgcgap
在"bioconda-recipes/recipes/"目录下新建"pgcgap"目录,并将撰写好的"build.sh"和"meta.yaml"存入其中。
Step6:本地测试 recipe (可选,即可以直接在线测试)
在在"bioconda-recipes/"目录下依次运行如下命令:
$./bootstrap.py /tmp/miniconda
$source ~/.config/bioconda/activate
# optional linting
$bioconda-utils lint recipes config.yml --git-range master
# build and test
$bioconda-utils build recipes config.yml --docker --mulled-test --git-range master
Step7:更新 recipes
$bioconda-utils update-pinning recipes/ config.yml --packages pgcgap --create-pr
Step8:推送修改,等待测试通过,提交 pull 请求
(1) 将本地更改同步到自己的pgcgap分枝
$git push -u origin pgcgap
(2) 在“liaochenlanruo/bioconda-recipes”的“pgcgap”分支下点击“New pull request”。base repository选择“liaochenlanruo/bioconda-recipes”,base选择“pgcgap”;head repository选择“bioconda/bioconda-recipes”,compare 选择"master"。

比较完成后提交,标题自定义,内容根据提示酌情填写。若存在问题可以@其核心团队成员中的任何一位,如输入“@epruesse”,将会@ Elmar Pruesse。若想成为bioconda成员,以及要merge自己的分支,则需要@bioconda/core。
实例:
@bioconda/core
I have read the guidelines for bioconda recipes.
This PR adds a new recipe.
AFAIK, this recipe is directly relevant to the biological sciences (otherwise, please submit to the more general purpose conda-forge channel).
上述步骤完成后,可以在GitHub项目下的“Pull requests”选项卡下查看处理状态。

根据提示修改自己的recipe,再次pull,循环往复,直至修复所有错误(下图表示需要修改)。

下图所示,正在测试recipe。



常见错误
(1)If linting fails:
git checkout master
git pull upstream master
git checkout pgcgap
git merge master
网友评论