Skip to content

Improved error message. #138

Improved error message.

Improved error message. #138

Workflow file for this run

# Lingfei Wang, 2022. All rights reserved.
name: "Conda package"
on:
push:
branches:
- master
- dev
paths:
- 'setup.py'
- 'src/**'
- 'bin/**'
- 'utils/conda/**'
- '.github/actions/conda-build-publish/**'
- '.github/actions/install-conda/**'
- '.github/workflows/ci-conda.yml'
- '.github/actions/zenodo-url-translate/**'
- '.github/actions/inference-test-dataset/**'
- '.github/scripts/inference-test-dataset.py'
jobs:
build:
name: Build and publish conda package with pretest suffix
if: github.repository == 'pinellolab/dictys'
runs-on: ubuntu-latest
outputs:
package: ${{ steps.publish-pretest.outputs.name }}
version: ${{ steps.publish-pretest.outputs.version }}
buildstr: ${{ steps.publish-pretest.outputs.buildstr }}
steps:
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Mask token
shell: bash
run: echo "::add-mask::${{ secrets.ANACONDA_TOKEN }}"
- name: Build and publish pretest version
uses: ./.github/actions/conda-build-publish
id: publish-pretest
with:
base-dir: utils/conda
user: lingfeiwang
token: ${{ secrets.ANACONDA_TOKEN }}
preproc: "sed -i 's/ name: dictys/ name: dictys-pretest/' meta.yaml"
options: "--force"
test-blood1:
name: Blood static network unit tests
needs: build
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9","3.10"]
steps:
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Add conda to system path
shell: bash
run: |
echo $CONDA/bin >> $GITHUB_PATH
- uses: actions/checkout@v4
- name: Install package
uses: ./.github/actions/install-conda
with:
package: ${{ needs.build.outputs.package }}=${{ needs.build.outputs.version }}=${{ needs.build.outputs.buildstr }}
python-version: ${{ matrix.python-version }}
- name: Get dataset URL
id: zenodo-url-translate
uses: ./.github/actions/zenodo-url-translate
with:
url: https://zenodo.org/record/6858494/files/inference-blood1.tar.xz?download=1
- name: Test dataset
uses: ./.github/actions/inference-test-dataset
with:
url: ${{ steps.zenodo-url-translate.outputs.url }}
test-path: ci_testspace
makefile: test_static.mk
expected-folder: test/tmp_static_expected
actual-folder: test/tmp_static
expected-h5: test/output/static_expected.h5
actual-h5: test/output/static.h5
makefile-params: '{"ENVMODE": "none", "NTH": "2", "DEVICE": "cpu", "GENOME_MACS2": "hs", "JOINT": "0", "KPARAMS-NETWORK-RECONSTRUCT+": " --nstep 10 --nstep_report 3"}'
exclusions: 'reads.bam reads.bai net_weight.tsv.gz net_covfactor.tsv.gz net_meanvar.tsv.gz net_loss.tsv.gz net_stats.tsv.gz'
build-publish:
name: Build and publish conda package
needs: [ build, test-blood1 ]
if: ( github.ref_name == 'master' ) && ( github.repository == 'pinellolab/dictys' )
runs-on: ubuntu-latest
steps:
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Mask token
shell: bash
run: echo "::add-mask::${{ secrets.ANACONDA_TOKEN }}"
- name: Get serial ID
id: serialid
shell: bash
run: |
version='${{ needs.build.outputs.version }}'
version="${version//./[.]}"
serialid=$( (conda search -c lingfeiwang --override-channels -q dictys | grep '^dictys[[:blank:]]*'"$version"'[[:blank:]]' || true ) | wc -l)
echo "serialid=$serialid" >> $GITHUB_OUTPUT
- name: Build and publish release version
uses: ./.github/actions/conda-build-publish
id: publish
with:
base-dir: utils/conda
user: lingfeiwang
serialid: ${{ steps.serialid.outputs.serialid }}
token: ${{ secrets.ANACONDA_TOKEN }}