Skip to content

Commit

Permalink
Merge pull request #278 from kipoi/add-singularity-tests
Browse files Browse the repository at this point in the history
Add tests with singularity containers
  • Loading branch information
haimasree authored Nov 12, 2021
2 parents 7b14405 + 0f8a548 commit e4787a1
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 3 deletions.
69 changes: 69 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ variables:
run:
name: Install hdf5 and pkgconfig
command: conda install --yes -c conda-forge hdf5=1.10.6 pkgconfig
install_singularity: &install_singularity
run:
name: Install Singularity
command: |
conda install --yes -c conda-forge singularity
restore_cache: &restore_cache
restore_cache:
keys:
Expand Down Expand Up @@ -71,6 +76,24 @@ jobs:
command: kipoi test-source kipoi --git-range master HEAD --common_env
no_output_timeout: 60m
- *store_artifacts

# test only the newly added model with singularity
test_new_models_singularity:
<<: *defaults
steps:
- checkout
- *install_conda
# - *install_sys_deps
- *install_gitlfs
- *install_additional_pkgs
- *install_singularity
# - *restore_cache
- *setup
- run:
name: run tests
command: kipoi test-source kipoi --git-range master HEAD --verbose --singularity
no_output_timeout: 60m
- *store_artifacts

# test all models in the repo
test_all_models:
Expand All @@ -95,6 +118,31 @@ jobs:
command: kipoi test-source kipoi --all --num_of_shards << parameters.num_of_shards >> --shard_id << parameters.shard_id >>
- *store_artifacts

# test all models in the repo
test_all_models_singularity:
parameters:
num_of_shards:
type: integer
shard_id:
type: integer
<<: *defaults
steps:
- checkout
- *install_conda
# - *install_sys_deps
- *install_gitlfs
- *install_additional_pkgs
- *install_singularity
# - *restore_cache
- *setup
- run:
name: run tests
# Use --clean_env to remove the environment of each model
no_output_timeout: 60m
command: kipoi test-source kipoi --all --num_of_shards << parameters.num_of_shards >> --shard_id << parameters.shard_id >> --singularity
- *store_artifacts


test_all_models_common_env:
<<: *defaults
steps:
Expand Down Expand Up @@ -134,6 +182,12 @@ workflows:
ignore:
- master
- test_all
- test_new_models_singularity:
filters:
branches:
ignore:
- master
- test_all
test-all-branch:
jobs:
- test_all_models:
Expand All @@ -146,6 +200,16 @@ workflows:
only:
- master
- test_all
- test_all_models_singularity:
matrix:
parameters:
num_of_shards: [4]
shard_id: [0, 1, 2, 3]
filters:
branches:
only:
- master
- test_all
- test_all_models_common_env:
filters:
branches:
Expand All @@ -169,6 +233,11 @@ workflows:
parameters:
num_of_shards: [4]
shard_id: [0, 1, 2, 3]
- test_all_models_singularity:
matrix:
parameters:
num_of_shards: [4]
shard_id: [0, 1, 2, 3]
- test_all_models_common_env


Expand Down
6 changes: 3 additions & 3 deletions shared/containers/model-to-singularity.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"DeepCpG_DNA": {
"url": "https://zenodo.org/record/5644007/files/kipoi-docker_sharedpy3keras2.sif?download=1",
"name": "kipoi-docker_sharedpy3keras2",
"md5": "0e5354145f54c2c8c7efc3bb265aebac"
"url": "https://zenodo.org/record/5644005/files/kipoi-docker_sharedpy3keras1.2.sif?download=1",
"name": "kipoi-docker_sharedpy3keras1.2",
"md5": "cd748bae471b6af0b2cdaecca1e1c6ac"
},
"CpGenie": {
"url": "https://zenodo.org/record/5644005/files/kipoi-docker_sharedpy3keras1.2.sif?download=1",
Expand Down

0 comments on commit e4787a1

Please sign in to comment.