Skip to content

Commit

Permalink
Merge pull request #7 from MannLabs/add_alphatesting
Browse files Browse the repository at this point in the history
Add alphatesting
  • Loading branch information
mschwoer authored Nov 28, 2024
2 parents e769a49 + 056dca7 commit ad0dc44
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 3 deletions.
33 changes: 31 additions & 2 deletions .github/workflows/alphatesting.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
name: AlphaX cross-projects tests

on:
workflow_dispatch:
inputs:
Expand All @@ -10,6 +12,9 @@ on:
alpharaw_ref:
description: "alpharaw version"
default: development # TODO: change to latest once properly tagged release is out
alphaviz_ref:
description: "alphaviz version"
default: latest
alphapeptdeep_ref:
description: "alphapeptdeep version"
default: latest
Expand Down Expand Up @@ -49,12 +54,14 @@ jobs:
tags: alphax:latest
context: ./alphatesting
outputs: type=docker,dest=/tmp/alphax.tar
cache-from: type=gha
cache-to: type=gha,mode=max
# cache-from: type=gha
# cache-to: type=gha,mode=max
no-cache: True
build-args: |
ALPHABASE_REF=${{ inputs.alphabase_ref }}
ALPHATIMS_REF=${{ inputs.alphatims_ref }}
ALPHARAW_REF=${{ inputs.alpharaw_ref }}
ALPHAVIZ_REF=${{ inputs.alphaviz_ref }}
ALPHAPEPTDEEP_REF=${{ inputs.alphapeptdeep_ref }}
DIRECTLFQ_REF=${{ inputs.directlfq_ref }}
ALPHADIA_REF=${{ inputs.alphadia_ref }}
Expand Down Expand Up @@ -107,6 +114,28 @@ jobs:
run: |
docker run alphax bash -c "cd alpharaw/tests && ls && python -m download_test_data && chmod +x run_tests.sh && ./run_tests.sh"
alphaviz_tests:
runs-on: AlphaDIA
needs: [ build_image ]
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: alphax
path: /tmp
- name: Load image
run: |
docker load --input /tmp/alphax.tar
docker image ls -a
- name: Print pip freeze
run: |
docker run alphax bash -c "pip freeze"
- name: alphaviz tests
id: alphaviz_tests
run: |
docker run alphax bash -c "cd alphaviz/tests && ls && python -m pytest test_io.py && python -m pytest test_preprocessing.py"
alphapeptdeep_tests:
runs-on: AlphaDIA
needs: [ build_image ]
Expand Down
13 changes: 13 additions & 0 deletions alphatesting/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,19 @@ RUN --mount=type=cache,target=/root/.cache/pip \
cd alpharaw && pip install "."


############################################################################
ARG ALPHAVIZ_REF="development"
RUN git clone https://github.com/MannLabs/alphaviz.git \
&& cd alphaviz \
&& git checkout $(../get_ref.sh $ALPHAVIZ_REF) \
&& ../replace_alphax.sh \
&& git status

RUN --mount=type=cache,target=/root/.cache/pip \
cd alphaviz && pip install "."



############################################################################
ARG ALPHAPEPTDEEP_REF="development"
RUN git clone https://github.com/MannLabs/alphapeptdeep.git \
Expand Down
2 changes: 1 addition & 1 deletion alphatesting/replace_alphax.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ fi
echo using $REQUIREMENTS_FILE

# add any alphaX packages that others depend on here
for a in alphabase alphatims alpharaw alphapeptdeep alphatims; do
for a in alphabase alphatims alpharaw alphapeptdeep alphatims alphaviz; do
sed -i "s/$a/### $a/" $REQUIREMENTS_FILE
done

Expand Down

0 comments on commit ad0dc44

Please sign in to comment.