From 20a72fb3ca6eae7d7684628ac74966c9b7a4d967 Mon Sep 17 00:00:00 2001 From: Per Unneberg Date: Thu, 20 Jul 2023 10:04:33 +0200 Subject: [PATCH] Update test architecture - patch sys.modules to test cookies - update snakemake version - base test environment on conda lock file --- .github/workflows/slurm.yaml | 22 ++-- conda-linux-64.lock | 225 +++++++++++++++++++++++++++++++++++ pytest.ini | 2 + test-environment.yml | 2 +- tests/deploystack.sh | 2 +- tests/docker-compose.yaml | 2 +- tests/test_cookie.py | 43 ++++--- 7 files changed, 271 insertions(+), 27 deletions(-) create mode 100644 conda-linux-64.lock create mode 100644 pytest.ini diff --git a/.github/workflows/slurm.yaml b/.github/workflows/slurm.yaml index ba24bc7..b719d65 100644 --- a/.github/workflows/slurm.yaml +++ b/.github/workflows/slurm.yaml @@ -1,6 +1,6 @@ name: Test SnakemakeProfiles/slurm env: - SNAKEMAKE_IMAGE: quay.io/biocontainers/snakemake:7.3.2--hdfd78af_0 + SNAKEMAKE_IMAGE: quay.io/biocontainers/snakemake:7.30.1--hdfd78af_0 SLURM_IMAGE: giovtorres/docker-centos7-slurm:20.11.8 DOCKER_COMPOSE: tests/docker-compose.yaml @@ -12,17 +12,21 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 30 steps: - - uses: actions/checkout@v2 + - name: Checkout repository + uses: actions/checkout@v3 + - run: mkdir -p ~/image-cache - - name: cache-conda - uses: actions/cache@v2 + + - name: cache conda environment + uses: actions/cache@v3 env: CACHE_NUMBER: 0 with: path: ~/conda_pkgs_dir - key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('test-environment.yml') }} + key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('conda-linux-64.lock') }} - - uses: actions/cache@v2 + - name: cache images + uses: actions/cache@v3 id: cache-images env: CACHE_NUMBER: 0 @@ -33,10 +37,8 @@ jobs: - name: install miniconda uses: conda-incubator/setup-miniconda@v2 with: - mamba-version: "*" - channels: conda-forge,bioconda,default - channel-priority: true - environment-file: test-environment.yml + miniconda-version: "latest" + environment-file: conda-linux-64.lock use-only-tar-bz2: true - name: docker swarm init diff --git a/conda-linux-64.lock b/conda-linux-64.lock new file mode 100644 index 0000000..46b0a32 --- /dev/null +++ b/conda-linux-64.lock @@ -0,0 +1,225 @@ +# Generated by conda-lock. +# platform: linux-64 +# input_hash: 318585a628d99fa5342d4410e695b4875dca619eed2d1cb91040b1853096db01 +@EXPLICIT +https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2#d7c89558ba9fa0495403155b64376d81 +https://conda.anaconda.org/conda-forge/linux-64/ca-certificates-2023.7.22-hbcca054_0.conda#a73ecd2988327ad4c8f2c331482917f2 +https://conda.anaconda.org/conda-forge/linux-64/ld_impl_linux-64-2.40-h41732ed_0.conda#7aca3059a1729aa76c597603f10b0dd3 +https://conda.anaconda.org/conda-forge/linux-64/libgfortran5-13.1.0-h15d22d2_0.conda#afb656a334c409dd9805508af1c89c7a +https://conda.anaconda.org/conda-forge/linux-64/libstdcxx-ng-13.1.0-hfd8a6a1_0.conda#067bcc23164642f4c226da631f2a2e1d +https://conda.anaconda.org/conda-forge/noarch/pybind11-abi-4-hd8ed1ab_3.tar.bz2#878f923dd6acc8aeb47a75da6c4098be +https://conda.anaconda.org/conda-forge/linux-64/python_abi-3.11-3_cp311.conda#c2e2630ddb68cf52eec74dc7dfab20b5 +https://conda.anaconda.org/conda-forge/noarch/tzdata-2023c-h71feb2d_0.conda#939e3e74d8be4dac89ce83b20de2492a +https://conda.anaconda.org/conda-forge/linux-64/libgfortran-ng-13.1.0-h69a702a_0.conda#506dc07710dd5b0ba63cbf134897fc10 +https://conda.anaconda.org/conda-forge/linux-64/libgomp-13.1.0-he5830b7_0.conda#56ca14d57ac29a75d23a39eb3ee0ddeb +https://conda.anaconda.org/conda-forge/linux-64/_openmp_mutex-4.5-2_gnu.tar.bz2#73aaf86a425cc6e73fcf236a5a46396d +https://conda.anaconda.org/conda-forge/linux-64/libgcc-ng-13.1.0-he5830b7_0.conda#cd93f779ff018dd85c7544c015c9db3c +https://conda.anaconda.org/conda-forge/linux-64/bzip2-1.0.8-h7f98852_4.tar.bz2#a1fd65c7ccbf10880423d82bca54eb54 +https://conda.anaconda.org/conda-forge/linux-64/c-ares-1.19.1-hd590300_0.conda#e8c18d865be43e2fb3f7a145b6adf1f5 +https://conda.anaconda.org/conda-forge/linux-64/fmt-9.1.0-h924138e_0.tar.bz2#b57864c85261a0fbc7132d2cc17478c7 +https://conda.anaconda.org/conda-forge/linux-64/icu-72.1-hcb278e6_0.conda#7c8d20d847bb45f56bd941578fcfa146 +https://conda.anaconda.org/conda-forge/linux-64/keyutils-1.6.1-h166bdaf_0.tar.bz2#30186d27e2c9fa62b45fb1476b7200e3 +https://conda.anaconda.org/conda-forge/linux-64/libabseil-20230125.3-cxx17_h59595ed_0.conda#d1db1b8be7c3a8983dcbbbfe4f0765de +https://conda.anaconda.org/conda-forge/linux-64/libcrc32c-1.1.2-h9c3ff4c_0.tar.bz2#c965a5aa0d5c1c37ffc62dff36e28400 +https://conda.anaconda.org/conda-forge/linux-64/libev-4.33-h516909a_1.tar.bz2#6f8720dff19e17ce5d48cfe7f3d2f0a3 +https://conda.anaconda.org/conda-forge/linux-64/libexpat-2.5.0-hcb278e6_1.conda#6305a3dd2752c76335295da4e581f2fd +https://conda.anaconda.org/conda-forge/linux-64/libffi-3.4.2-h7f98852_5.tar.bz2#d645c6d2ac96843a2bfaccd2d62b3ac3 +https://conda.anaconda.org/conda-forge/linux-64/libiconv-1.17-h166bdaf_0.tar.bz2#b62b52da46c39ee2bc3c162ac7f1804d +https://conda.anaconda.org/conda-forge/linux-64/libnsl-2.0.0-h7f98852_0.tar.bz2#39b1328babf85c7c3a61636d9cd50206 +https://conda.anaconda.org/conda-forge/linux-64/libopenblas-0.3.23-pthreads_h80387f5_0.conda#9c5ea51ccb8ffae7d06c645869d24ce6 +https://conda.anaconda.org/conda-forge/linux-64/libsodium-1.0.18-h36c2ea0_1.tar.bz2#c3788462a6fbddafdb413a9f9053e58d +https://conda.anaconda.org/conda-forge/linux-64/libuuid-2.38.1-h0b41bf4_0.conda#40b61aab5c7ba9ff276c41cfffe6b80b +https://conda.anaconda.org/conda-forge/linux-64/libzlib-1.2.13-hd590300_5.conda#f36c115f1ee199da648e0597ec2047ad +https://conda.anaconda.org/conda-forge/linux-64/lz4-c-1.9.4-hcb278e6_0.conda#318b08df404f9c9be5712aaa5a6f0bb0 +https://conda.anaconda.org/conda-forge/linux-64/lzo-2.10-h516909a_1000.tar.bz2#bb14fcb13341b81d5eb386423b9d2bac +https://conda.anaconda.org/conda-forge/linux-64/ncurses-6.4-hcb278e6_0.conda#681105bccc2a3f7f1a837d47d39c9179 +https://conda.anaconda.org/conda-forge/linux-64/openssl-3.1.1-hd590300_1.conda#2e1d7b458ac8f1e3ca4e18b77add6277 +https://conda.anaconda.org/conda-forge/linux-64/re2-2023.03.02-h8c504da_0.conda#206f8fa808748f6e90599c3368a1114e +https://conda.anaconda.org/conda-forge/linux-64/reproc-14.2.4-h0b41bf4_0.conda#0f51393e019df1f0047ef864cd9ddeec +https://conda.anaconda.org/conda-forge/linux-64/xz-5.2.6-h166bdaf_0.tar.bz2#2161070d867d1b1204ea749c8eec4ef0 +https://conda.anaconda.org/conda-forge/linux-64/yaml-0.2.5-h7f98852_2.tar.bz2#4cb3ad778ec2d5a7acbdf254eb1c42ae +https://conda.anaconda.org/conda-forge/linux-64/yaml-cpp-0.7.0-h27087fc_2.tar.bz2#0449d47d8457feaa3720d4779616dde2 +https://conda.anaconda.org/conda-forge/linux-64/libblas-3.9.0-17_linux64_openblas.conda#57fb44770b1bc832fb2dbefa1bd502de +https://conda.anaconda.org/conda-forge/linux-64/libedit-3.1.20191231-he28a2e2_2.tar.bz2#4d331e44109e3f0e19b4cb8f9b82f3e1 +https://conda.anaconda.org/conda-forge/linux-64/libnghttp2-1.52.0-h61bc06f_0.conda#613955a50485812985c059e7b269f42e +https://conda.anaconda.org/conda-forge/linux-64/libprotobuf-4.23.3-hd1fb520_0.conda#c8da7f04073ed0fabcb60885a4c1a722 +https://conda.anaconda.org/conda-forge/linux-64/libsolv-0.7.24-hfc55251_1.conda#9d2787f2fdcf65661e2416b2dffdb668 +https://conda.anaconda.org/conda-forge/linux-64/libsqlite-3.42.0-h2797004_0.conda#fdaae20a1cf7cd62130a0973190a31b7 +https://conda.anaconda.org/conda-forge/linux-64/libssh2-1.11.0-h0841786_0.conda#1f5a58e686b13bcfde88b93f547d23fe +https://conda.anaconda.org/conda-forge/linux-64/libxml2-2.11.4-h0d562d8_0.conda#e46fad17d5fb57316b956f88dca765e4 +https://conda.anaconda.org/conda-forge/linux-64/readline-8.2-h8228510_1.conda#47d31b792659ce70f470b5c82fdfb7a4 +https://conda.anaconda.org/conda-forge/linux-64/reproc-cpp-14.2.4-hcb278e6_0.conda#ede8e0f849f2fee2f78cb488b4ea3b33 +https://conda.anaconda.org/conda-forge/linux-64/tk-8.6.12-h27826a3_0.tar.bz2#5b8c42eb62e9fc961af70bdd6a26e168 +https://conda.anaconda.org/conda-forge/linux-64/zstd-1.5.2-hfc55251_7.conda#32ae18eb2a687912fc9e92a501c0a11b +https://conda.anaconda.org/conda-forge/linux-64/krb5-1.21.1-h659d440_0.conda#1b5126ec25763eb17ef74c8763d26e84 +https://conda.anaconda.org/conda-forge/linux-64/libarchive-3.6.2-h039dbb9_1.conda#29cf970521d30d113f3425b84cb250f6 +https://conda.anaconda.org/conda-forge/linux-64/libcblas-3.9.0-17_linux64_openblas.conda#7ef0969b00fe3d6eef56a8151d3afb29 +https://conda.anaconda.org/conda-forge/linux-64/libgrpc-1.56.2-h3905398_0.conda#a87e780f3d9cc7cf432e47ced83a67ce +https://conda.anaconda.org/conda-forge/linux-64/liblapack-3.9.0-17_linux64_openblas.conda#a2103882c46492e26500fcb56c03de8b +https://conda.anaconda.org/conda-forge/linux-64/python-3.11.4-hab00c5b_0_cpython.conda#1c628861a2a126b9fc9363ca1b7d014e +https://conda.anaconda.org/conda-forge/noarch/appdirs-1.4.4-pyh9f0ad1d_0.tar.bz2#5f095bc6454094e96f146491fd03633b +https://conda.anaconda.org/conda-forge/noarch/attrs-23.1.0-pyh71513ae_1.conda#3edfead7cedd1ab4400a6c588f3e75f8 +https://conda.anaconda.org/conda-forge/noarch/backports-1.0-pyhd8ed1ab_3.conda#54ca2e08b3220c148a1d8329c2678e02 +https://conda.anaconda.org/conda-forge/noarch/boltons-23.0.0-pyhd8ed1ab_0.conda#033eb25fffd222aceeca6d58cd953680 +https://conda.anaconda.org/conda-forge/noarch/cachetools-5.3.1-pyhd8ed1ab_0.conda#60b5eb16d9a7a5482ba37f67aa49db5b +https://conda.anaconda.org/conda-forge/noarch/certifi-2023.7.22-pyhd8ed1ab_0.conda#7f3dbc9179b4dde7da98dfb151d0ad22 +https://conda.anaconda.org/conda-forge/linux-64/chardet-5.1.0-py311h38be061_0.conda#9ad842c86331f98301ac1d3e4af26843 +https://conda.anaconda.org/conda-forge/noarch/charset-normalizer-3.2.0-pyhd8ed1ab_0.conda#313516e9a4b08b12dfb1e1cd390a96e3 +https://conda.anaconda.org/conda-forge/noarch/click-8.1.6-unix_pyh707e725_0.conda#64dbb3b205546691a61204d1cfb208e3 +https://conda.anaconda.org/conda-forge/noarch/colorama-0.4.6-pyhd8ed1ab_0.tar.bz2#3faab06a954c2a04039983f2c4a50d99 +https://conda.anaconda.org/conda-forge/noarch/configargparse-1.5.5-pyhd8ed1ab_0.conda#adf4d935302cd12f96f8f5e5b2edda49 +https://conda.anaconda.org/conda-forge/noarch/connection_pool-0.0.3-pyhd3deb0d_0.tar.bz2#e270fff08907db8691c02a0eda8d38ae +https://conda.anaconda.org/conda-forge/linux-64/datrie-0.8.2-py311hd4cff14_6.tar.bz2#e0562fa461ef51325463fb044dc1a2a0 +https://conda.anaconda.org/conda-forge/noarch/defusedxml-0.7.1-pyhd8ed1ab_0.tar.bz2#961b3a227b437d82ad7054484cfa71b2 +https://conda.anaconda.org/conda-forge/linux-64/docutils-0.20.1-py311h38be061_0.conda#207175b7d514d42f977ec505800d6824 +https://conda.anaconda.org/conda-forge/noarch/dpath-2.1.6-pyha770c72_0.conda#5b4bc44a847dea93ee9666e4bcd22220 +https://conda.anaconda.org/conda-forge/noarch/exceptiongroup-1.1.2-pyhd8ed1ab_0.conda#de4cb3384374e1411f0454edcf546cdb +https://conda.anaconda.org/conda-forge/noarch/filechunkio-1.8-py_2.tar.bz2#5e721173512c05bb5973ceb5616f8c03 +https://conda.anaconda.org/conda-forge/noarch/filelock-3.12.2-pyhd8ed1ab_0.conda#53522ec72e6adae42bd373ef58357230 +https://conda.anaconda.org/conda-forge/linux-64/frozenlist-1.4.0-py311h459d7ec_0.conda#54bd8f0776418b17a8eccd6f10181f95 +https://conda.anaconda.org/conda-forge/noarch/ftputil-5.0.4-pyhd8ed1ab_0.tar.bz2#83ae47fd5bd9306281db44d85d5813a5 +https://conda.anaconda.org/conda-forge/linux-64/grpcio-1.56.2-py311ha6695c7_0.conda#c91ce03a039bed1cb0d48cc27e02a316 +https://conda.anaconda.org/conda-forge/linux-64/humanfriendly-10.0-py311h38be061_4.tar.bz2#5c4f38a9e482f00a7bf23fe479c8ca29 +https://conda.anaconda.org/conda-forge/noarch/idna-3.4-pyhd8ed1ab_0.tar.bz2#34272b248891bddccc64479f9a7fffed +https://conda.anaconda.org/conda-forge/noarch/iniconfig-2.0.0-pyhd8ed1ab_0.conda#f800d2da156d08e289b14e87e43c1ae5 +https://conda.anaconda.org/conda-forge/noarch/jmespath-1.0.1-pyhd8ed1ab_0.tar.bz2#2cfa3e1cf3fb51bb9b17acc5b5e9ea11 +https://conda.anaconda.org/conda-forge/noarch/jsonpointer-2.0-py_0.tar.bz2#07d85c22a3beb102a48cd123df84c2a6 +https://conda.anaconda.org/conda-forge/linux-64/libcurl-8.2.0-hca28451_0.conda#73d6b3c8d9a8f7f2703ef9163ab92b0e +https://conda.anaconda.org/conda-forge/linux-64/liblapacke-3.9.0-17_linux64_openblas.conda#949709aa6ee6a2dcdb3de6dd99147d17 +https://conda.anaconda.org/conda-forge/noarch/logmuse-0.2.6-pyh8c360ce_0.tar.bz2#58adb9b2a7f4b0622217868a532eeb95 +https://conda.anaconda.org/conda-forge/linux-64/markupsafe-2.1.3-py311h459d7ec_0.conda#9904dc4adb5d547cb21e136f98cb24b0 +https://conda.anaconda.org/conda-forge/noarch/mdurl-0.1.0-pyhd8ed1ab_0.tar.bz2#f8dab71fdc13b1bf29a01248b156d268 +https://conda.anaconda.org/conda-forge/linux-64/multidict-6.0.4-py311h2582759_0.conda#8f581c14b50f2df47a2c6bd8d230a579 +https://conda.anaconda.org/conda-forge/linux-64/numpy-1.25.1-py311h64a7726_0.conda#b32456e3b3b4d375860ce12163f20122 +https://conda.anaconda.org/conda-forge/noarch/packaging-23.1-pyhd8ed1ab_0.conda#91cda59e66e1e4afe9476f8ef98f5c30 +https://conda.anaconda.org/conda-forge/noarch/pep8-1.7.1-py_0.tar.bz2#d0b5bc3aebbffcb175bf8a1d419acb79 +https://conda.anaconda.org/conda-forge/noarch/pkgutil-resolve-name-1.3.10-pyhd8ed1ab_0.tar.bz2#89e3c7cdde7d3aaa2aee933b604dd07f +https://conda.anaconda.org/conda-forge/noarch/plac-1.3.5-pyhd8ed1ab_0.tar.bz2#2a2a3d9ccee1a4c2530374e29add74bc +https://conda.anaconda.org/conda-forge/noarch/pluggy-1.2.0-pyhd8ed1ab_0.conda#7263924c642d22e311d9e59b839f1b33 +https://conda.anaconda.org/conda-forge/noarch/ply-3.11-py_1.tar.bz2#7205635cd71531943440fbfe3b6b5727 +https://conda.anaconda.org/conda-forge/linux-64/psutil-5.9.5-py311h2582759_0.conda#a90f8e278c1cd7064b2713e6b7db87e6 +https://conda.anaconda.org/conda-forge/noarch/pyasn1-0.4.8-py_0.tar.bz2#06d04c9f8f72ac77911db942eda24fb9 +https://conda.anaconda.org/conda-forge/linux-64/pycosat-0.6.4-py311hd4cff14_1.tar.bz2#17399f8b68b4592f098ab18d4fdb0ac4 +https://conda.anaconda.org/conda-forge/noarch/pycparser-2.21-pyhd8ed1ab_0.tar.bz2#076becd9e05608f8dc72757d5f3a91ff +https://conda.anaconda.org/conda-forge/noarch/pyflakes-3.0.1-pyhd8ed1ab_0.conda#44b7d77d96560c93e0e11437a3c35254 +https://conda.anaconda.org/conda-forge/noarch/pygments-2.15.1-pyhd8ed1ab_0.conda#d316679235612869eba305aa7d41d9bf +https://conda.anaconda.org/conda-forge/noarch/pyparsing-3.1.0-pyhd8ed1ab_0.conda#d3ed087d1f7f8f5590e8e87b57a8ce64 +https://conda.anaconda.org/conda-forge/noarch/pysocks-1.7.1-pyha2e5f31_6.tar.bz2#2a7de29fb590ca14b5243c4c812c8025 +https://conda.anaconda.org/conda-forge/noarch/python-fastjsonschema-2.17.1-pyhd8ed1ab_0.conda#dd4f393d857e9283eef2442234bd05e3 +https://conda.anaconda.org/conda-forge/noarch/python-tzdata-2023.3-pyhd8ed1ab_0.conda#2590495f608a63625e165915fb4e2e34 +https://conda.anaconda.org/conda-forge/noarch/pytz-2023.3-pyhd8ed1ab_0.conda#d3076b483092a435832603243567bc31 +https://conda.anaconda.org/conda-forge/noarch/pywin32-on-windows-0.1.0-pyh1179c8e_3.tar.bz2#2807a0becd1d986fe1ef9b7f8135f215 +https://conda.anaconda.org/conda-forge/linux-64/pyyaml-6.0-py311hd4cff14_5.tar.bz2#da8769492e423103c59f469f4f17f8d9 +https://conda.anaconda.org/conda-forge/noarch/reretry-0.11.8-pyhd8ed1ab_0.conda#b8a877fba9cfe5d5dc2fef9d951316dd +https://conda.anaconda.org/conda-forge/linux-64/rpds-py-0.9.2-py311h46250e7_0.conda#bcf66b5abaec47198b42cdd0bb968540 +https://conda.anaconda.org/conda-forge/linux-64/ruamel.yaml.clib-0.2.7-py311h2582759_1.conda#5e997292429a22ad50c11af0a2cb0f08 +https://conda.anaconda.org/conda-forge/noarch/setuptools-68.0.0-pyhd8ed1ab_0.conda#5a7739d0f57ee64133c9d32e6507c46d +https://conda.anaconda.org/conda-forge/noarch/six-1.16.0-pyh6c4a22f_0.tar.bz2#e5f25f8dbc060e9a8d912e432202afc2 +https://conda.anaconda.org/conda-forge/noarch/smart_open-6.3.0-pyhd8ed1ab_1.conda#5ace9ea29eb3a47516a866a529a36c66 +https://conda.anaconda.org/conda-forge/noarch/smmap-3.0.5-pyh44b312d_0.tar.bz2#3a8dc70789709aa315325d5df06fb7e4 +https://conda.anaconda.org/conda-forge/noarch/tabulate-0.9.0-pyhd8ed1ab_1.tar.bz2#4759805cce2d914c38472f70bf4d8bcb +https://conda.anaconda.org/conda-forge/noarch/text-unidecode-1.3-py_0.tar.bz2#afcf07cba949f797ac96c5e13e745cc7 +https://conda.anaconda.org/conda-forge/noarch/throttler-1.2.1-pyhd8ed1ab_0.tar.bz2#c8f6bde557bb74cdbbd1fc14ad1d0bf7 +https://conda.anaconda.org/conda-forge/noarch/tomli-2.0.1-pyhd8ed1ab_0.tar.bz2#5844808ffab9ebdb694585b50ba02a96 +https://conda.anaconda.org/conda-forge/noarch/toolz-0.12.0-pyhd8ed1ab_0.tar.bz2#92facfec94bc02d6ccf42e7173831a36 +https://conda.anaconda.org/conda-forge/noarch/toposort-1.10-pyhd8ed1ab_0.conda#aeef653e20028f19a3c2cc70e166b509 +https://conda.anaconda.org/conda-forge/noarch/traitlets-5.9.0-pyhd8ed1ab_0.conda#d0b4f5c87cd35ac3fb3d47b223263a64 +https://conda.anaconda.org/conda-forge/noarch/typing_extensions-4.7.1-pyha770c72_0.conda#c39d6a09fe819de4951c2642629d9115 +https://conda.anaconda.org/conda-forge/noarch/unidecode-1.3.6-pyhd8ed1ab_0.tar.bz2#e8f24401b17802df5f82f66a88cee29e +https://conda.anaconda.org/conda-forge/noarch/uritemplate-4.1.1-pyhd8ed1ab_0.tar.bz2#0c4beeff1cbaba9b1a494c6b3dfc5bcc +https://conda.anaconda.org/conda-forge/noarch/websocket-client-1.6.1-pyhd8ed1ab_0.conda#c34d9325a609381a0b0e8a5b4f325147 +https://conda.anaconda.org/conda-forge/noarch/wheel-0.41.0-pyhd8ed1ab_0.conda#66beb36a1fa7e0dc9d9bf843a80eb82c +https://conda.anaconda.org/conda-forge/linux-64/wrapt-1.15.0-py311h2582759_0.conda#15565d8602a78c6a994e4d9fcb391920 +https://conda.anaconda.org/conda-forge/noarch/zipp-3.16.2-pyhd8ed1ab_0.conda#2da0451b54c4563c32490cb1b7cf68a1 +https://conda.anaconda.org/conda-forge/noarch/aiosignal-1.3.1-pyhd8ed1ab_0.tar.bz2#d1e1eb7e21a9e2c74279d87dafb68156 +https://conda.anaconda.org/conda-forge/noarch/amply-0.1.6-pyhd8ed1ab_0.conda#a45a9cc65a438f465845ebff49c6fbf9 +https://conda.anaconda.org/conda-forge/noarch/backports.functools_lru_cache-1.6.5-pyhd8ed1ab_0.conda#6b1b907661838a75d067a22f87996b2e +https://conda.anaconda.org/conda-forge/noarch/binaryornot-0.4.4-py_1.tar.bz2#a556fa60840fcb9dd739d186bfd252f7 +https://conda.anaconda.org/conda-forge/linux-64/cffi-1.15.1-py311h409f033_3.conda#9025d0786dbbe4bc91fd8e85502decce +https://conda.anaconda.org/conda-forge/linux-64/coin-or-utils-2.11.9-hee58242_0.conda#0f5e6a4d88aac3fa5fcd2fa929862711 +https://conda.anaconda.org/conda-forge/noarch/gitdb-4.0.10-pyhd8ed1ab_0.conda#3706d2f3d7cb5dae600c833345a76132 +https://conda.anaconda.org/conda-forge/noarch/httplib2-0.22.0-pyhd8ed1ab_0.conda#75362ef538813bab1cfec370bb09e41f +https://conda.anaconda.org/conda-forge/noarch/importlib_resources-6.0.0-pyhd8ed1ab_1.conda#a08b6be5bf18b9d2a927d3457750f82e +https://conda.anaconda.org/conda-forge/noarch/jinja2-3.1.2-pyhd8ed1ab_1.tar.bz2#c8490ed5c70966d232fdd389d0dbed37 +https://conda.anaconda.org/conda-forge/noarch/jsonpatch-1.32-pyhd8ed1ab_0.tar.bz2#09150b51b0528a31a0f6500b96fdde82 +https://conda.anaconda.org/conda-forge/linux-64/libmamba-1.4.9-h658169a_0.conda#903a241189a2fd9d7e6a33ee2505a49c +https://conda.anaconda.org/conda-forge/noarch/markdown-it-py-3.0.0-pyhd8ed1ab_0.conda#93a8e71256479c62074356ef6ebf501b +https://conda.anaconda.org/conda-forge/noarch/pip-23.2.1-pyhd8ed1ab_0.conda#e2783aa3f9235225eec92f9081c5b801 +https://conda.anaconda.org/conda-forge/linux-64/protobuf-4.23.3-py311hbec7ed6_0.conda#58f90badf016d9055c71387dc6571366 +https://conda.anaconda.org/conda-forge/noarch/pyasn1-modules-0.2.7-py_0.tar.bz2#ad1e886d09700b2304975335f714bd9c +https://conda.anaconda.org/conda-forge/noarch/pytest-7.4.0-pyhd8ed1ab_0.conda#3cfe9b9e958e7238a386933c75d190db +https://conda.anaconda.org/conda-forge/noarch/python-dateutil-2.8.2-pyhd8ed1ab_0.tar.bz2#dd999d1cc9f79e67dbb855c8924c7984 +https://conda.anaconda.org/conda-forge/noarch/python-slugify-8.0.1-pyhd8ed1ab_1.conda#23edf59370e3e2f3db17304278f4d679 +https://conda.anaconda.org/conda-forge/noarch/pyu2f-0.1.5-pyhd8ed1ab_0.tar.bz2#caabbeaa83928d0c3e3949261daa18eb +https://conda.anaconda.org/conda-forge/noarch/referencing-0.30.0-pyhd8ed1ab_0.conda#13bf095e3ecd18999d65b4d3ac5b15d5 +https://conda.anaconda.org/conda-forge/noarch/rsa-4.9-pyhd8ed1ab_0.tar.bz2#03bf410858b2cefc267316408a77c436 +https://conda.anaconda.org/conda-forge/linux-64/ruamel.yaml-0.17.32-py311h459d7ec_0.conda#628868dc17f9bd39a2eb77846e35980c +https://conda.anaconda.org/conda-forge/noarch/stone-3.3.1-pyhd8ed1ab_0.tar.bz2#aa3301a0ebb3473e48544528dadf911e +https://conda.anaconda.org/conda-forge/noarch/stopit-1.1.2-py_0.tar.bz2#a07ae164291cd456aa3012f44654a950 +https://conda.anaconda.org/conda-forge/noarch/tqdm-4.65.0-pyhd8ed1ab_1.conda#ed792aff3acb977d09c7013358097f83 +https://conda.anaconda.org/conda-forge/noarch/typing-extensions-4.7.1-hd8ed1ab_0.conda#f96688577f1faa58096d06a45136afa2 +https://conda.anaconda.org/conda-forge/linux-64/yarl-1.9.2-py311h459d7ec_0.conda#4d738187d20e0a3be66973860f134e0a +https://conda.anaconda.org/conda-forge/noarch/yte-1.5.1-pyha770c72_2.conda#30e41490f250f6a63aaa2f282e078812 +https://conda.anaconda.org/conda-forge/noarch/arrow-1.2.3-pyhd8ed1ab_0.tar.bz2#fd1967c76eda3a3dd9e8e6cb7a15a028 +https://conda.anaconda.org/conda-forge/noarch/async-timeout-4.0.2-pyhd8ed1ab_0.tar.bz2#25e79f9a1133556671becbd65a170c78 +https://conda.anaconda.org/conda-forge/linux-64/bcrypt-3.2.2-py311hd4cff14_1.tar.bz2#a0dcc7542547bc73d1cdcb5a7874318b +https://conda.anaconda.org/conda-forge/linux-64/brotlipy-0.7.0-py311hd4cff14_1005.tar.bz2#9bdac7084ecfc08338bae1b976535724 +https://conda.anaconda.org/conda-forge/linux-64/coin-or-osi-0.108.8-ha2443b9_0.conda#7e4adb609b8bf87746d6fab1062348c8 +https://conda.anaconda.org/conda-forge/linux-64/cryptography-41.0.2-py311h63ff55d_0.conda#90e9e96dd807c2613a163c197192da6c +https://conda.anaconda.org/conda-forge/noarch/gitpython-3.1.32-pyhd8ed1ab_0.conda#5809a12901d57388444c3293c975d0bb +https://conda.anaconda.org/conda-forge/linux-64/google-crc32c-1.1.2-py311h98db957_4.tar.bz2#30fc7e9e67651173963320d38fb3cb12 +https://conda.anaconda.org/conda-forge/noarch/googleapis-common-protos-1.59.1-pyhd8ed1ab_0.conda#594299acfb3908a5c2b67bf600399212 +https://conda.anaconda.org/conda-forge/noarch/jsonschema-specifications-2023.7.1-pyhd8ed1ab_0.conda#7c27ea1bdbe520bb830dcadd59f55cbf +https://conda.anaconda.org/conda-forge/linux-64/libmambapy-1.4.9-py311h527f279_0.conda#f16b9947a4614e335bdbcf17280989c5 +https://conda.anaconda.org/conda-forge/noarch/oauth2client-4.1.3-py_0.tar.bz2#aafb86ecdbfea40c909719e3a6c72a04 +https://conda.anaconda.org/conda-forge/linux-64/pandas-2.0.3-py311h320fe9a_1.conda#5f92f46bd33917832a99d1660b4075ac +https://conda.anaconda.org/conda-forge/noarch/platformdirs-3.9.1-pyhd8ed1ab_0.conda#044e7a1e0ad42c4e67110bd078150a63 +https://conda.anaconda.org/conda-forge/linux-64/pynacl-1.5.0-py311hd4cff14_2.tar.bz2#8557e0732900a008d8b72e3effbd8521 +https://conda.anaconda.org/conda-forge/noarch/pytest-runner-6.0.0-pyhd8ed1ab_0.tar.bz2#3056f6bfd156f865af4ead3a91066370 +https://conda.anaconda.org/conda-forge/noarch/pytest-timeout-2.1.0-pyhd8ed1ab_0.tar.bz2#2b23b25991cbc6886b95942704fc5c62 +https://conda.anaconda.org/conda-forge/noarch/rich-13.4.2-pyhd8ed1ab_0.conda#f993baacc175e83fafd6b846e9c4c8a2 +https://conda.anaconda.org/conda-forge/noarch/setuptools-scm-7.1.0-pyhd8ed1ab_0.conda#6613dbb3b25cc648a107f33ca9f80fc1 +https://conda.anaconda.org/conda-forge/noarch/veracitools-0.1.3-py_0.tar.bz2#f2c8d44ea78cf639ab4810aedba43ab5 +https://conda.anaconda.org/conda-forge/noarch/wcwidth-0.2.6-pyhd8ed1ab_0.conda#078979d33523cb477bd1916ce41aacc9 +https://conda.anaconda.org/conda-forge/linux-64/zstandard-0.19.0-py311haa97af0_2.conda#10b11630d87e0a1d4abce705bc4e0b55 +https://conda.anaconda.org/conda-forge/linux-64/aiohttp-3.8.5-py311h459d7ec_0.conda#82a817c46ac339c0166f043f56492f33 +https://conda.anaconda.org/conda-forge/linux-64/coin-or-clp-1.17.8-h1ee7a9c_0.conda#a2d4935dc3955aa906c17136039db06c +https://conda.anaconda.org/conda-forge/noarch/conda-package-streaming-0.8.0-pyhd8ed1ab_0.conda#ebe3230a4c1e135954eee4fb6ef8cded +https://conda.anaconda.org/conda-forge/noarch/google-resumable-media-2.5.0-pyhd8ed1ab_0.conda#8e3e61214972084c44e79fff589ce58d +https://conda.anaconda.org/conda-forge/noarch/jsonschema-4.18.4-pyhd8ed1ab_0.conda#7356151a32ebd9a20158d2f26d224bfa +https://conda.anaconda.org/conda-forge/linux-64/jupyter_core-5.3.1-py311h38be061_0.conda#0cf8259b01ede82c76007996f73f89ed +https://conda.anaconda.org/conda-forge/noarch/paramiko-3.2.0-pyhd8ed1ab_0.conda#f212c7eb95e909df4795297f73690993 +https://conda.anaconda.org/conda-forge/noarch/prettytable-3.8.0-pyhd8ed1ab_0.conda#4f42cfa564f1cddc899859ea6e1e878a +https://conda.anaconda.org/conda-forge/noarch/pyopenssl-23.2.0-pyhd8ed1ab_1.conda#34f7d568bf59d18e3fef8c405cbece21 +https://conda.anaconda.org/conda-forge/noarch/ubiquerg-0.6.2-pyhd8ed1ab_0.tar.bz2#bac4db8c74dddfca4a9c38be23de50db +https://conda.anaconda.org/conda-forge/noarch/aioeasywebdav-2.4.0-pyha770c72_0.tar.bz2#dd5bf8931da06c21f9ea03e9621acfc7 +https://conda.anaconda.org/conda-forge/noarch/attmap-0.13.2-pyhd8ed1ab_0.tar.bz2#f7e348eb6bd53f544fd7cde87a7ba3c8 +https://conda.anaconda.org/conda-forge/linux-64/coin-or-cgl-0.60.7-h516709c_0.conda#9170a2b48868d5a340d7076979a775f8 +https://conda.anaconda.org/conda-forge/noarch/conda-package-handling-2.0.2-pyh38be061_0.conda#44800e9bd13143292097c65e57323038 +https://conda.anaconda.org/conda-forge/noarch/nbformat-5.9.1-pyhd8ed1ab_0.conda#3ec35d84fc1775215061517eb4660693 +https://conda.anaconda.org/conda-forge/noarch/pysftp-0.2.9-py_1.tar.bz2#3172621a36e00ef8711a393784d8fa7f +https://conda.anaconda.org/conda-forge/noarch/python-irodsclient-1.1.8-pyhd8ed1ab_0.conda#6060206be44d98f1c69c9afa50c1f2f9 +https://conda.anaconda.org/conda-forge/noarch/urllib3-1.26.15-pyhd8ed1ab_0.conda#27db656619a55d727eaf5a6ece3d2fd6 +https://conda.anaconda.org/conda-forge/noarch/botocore-1.31.9-pyhd8ed1ab_0.conda#56da26822dd2953c46acc6f17b833eda +https://conda.anaconda.org/conda-forge/linux-64/coin-or-cbc-2.10.10-h9002f0b_0.conda#f004ee86906bc133df1775e4b3be00ce +https://conda.anaconda.org/conda-forge/noarch/peppy-0.35.7-pyhd8ed1ab_0.conda#63f9fc55644fe1221a45fe6e1721dc4e +https://conda.anaconda.org/conda-forge/noarch/requests-2.31.0-pyhd8ed1ab_0.conda#a30144e4156cdbb236f99ebb49828f8b +https://conda.anaconda.org/conda-forge/noarch/coincbc-2.10.10-0_metapackage.conda#f1170e44b26962b3e8adade2dd0f3902 +https://conda.anaconda.org/conda-forge/linux-64/conda-23.5.2-py311h38be061_0.conda#3590ab5cde172ce9eaecea45cf6ca302 +https://conda.anaconda.org/conda-forge/noarch/cookiecutter-2.2.3-pyh1a96a4e_0.conda#6bc9af75431aa50a19cd0f6e8fa7a71c +https://conda.anaconda.org/conda-forge/noarch/docker-py-6.1.3-pyhd8ed1ab_0.conda#c95d23d8bae7e21491868cc7772d7c73 +https://conda.anaconda.org/conda-forge/noarch/dropbox-11.36.2-pyhd8ed1ab_0.conda#fca123f91fbe61e0c52a325326f4d8ce +https://conda.anaconda.org/conda-forge/noarch/google-auth-2.22.0-pyh1a96a4e_0.conda#5583192796d1ebcf39b1e3e0958aa259 +https://conda.anaconda.org/conda-forge/noarch/s3transfer-0.6.1-pyhd8ed1ab_0.conda#b19a857ac845097e9c823c9f4d35f80e +https://conda.anaconda.org/conda-forge/noarch/slacker-0.14.0-py_0.tar.bz2#ea6b3b3b8babd487cdbcccb7f42c2ccf +https://conda.anaconda.org/conda-forge/noarch/boto3-1.28.9-pyhd8ed1ab_0.conda#65e551dfc0128306444b906d22c6bcb4 +https://conda.anaconda.org/conda-forge/noarch/google-api-core-2.11.1-pyhd8ed1ab_0.conda#4c8af2e873e7253fa6f66d52fc60808a +https://conda.anaconda.org/conda-forge/noarch/google-auth-httplib2-0.1.0-pyhd8ed1ab_1.tar.bz2#829c632fd23d1d4dd0adeb461a4e6a13 +https://conda.anaconda.org/conda-forge/linux-64/mamba-1.4.9-py311h3072747_0.conda#f089b0415d7c4b26cb2f95eef2cefff0 +https://conda.anaconda.org/conda-forge/linux-64/pulp-2.7.0-py311h38be061_0.tar.bz2#75f9daf6092d5a213dd9260eb09c8db8 +https://conda.anaconda.org/conda-forge/noarch/pytest-cookies-0.7.0-pyhd8ed1ab_0.conda#fab32765845c0213cf85346685b56cf5 +https://conda.anaconda.org/conda-forge/noarch/google-api-python-client-2.94.0-pyhd8ed1ab_0.conda#abb58e44ec39aba26a40a60a098d83fc +https://conda.anaconda.org/conda-forge/noarch/google-cloud-core-2.3.3-pyhd8ed1ab_0.conda#a26b1fa8555cc1d2f0f7ff9985303e66 +https://conda.anaconda.org/bioconda/noarch/snakemake-minimal-7.30.2-pyhdfd78af_0.tar.bz2#5f92330c4148e755639e56f75893ed49 +https://conda.anaconda.org/conda-forge/noarch/google-cloud-storage-2.10.0-pyh1a96a4e_0.conda#e113b399d73f545911546b1227adb105 +https://conda.anaconda.org/bioconda/noarch/snakemake-7.30.2-hdfd78af_0.tar.bz2#e91d09a15e8b732bcc71c897db38fd60 diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 0000000..ca57470 --- /dev/null +++ b/pytest.ini @@ -0,0 +1,2 @@ +[pytest] +addopts = --keep-baked-projects -v -s diff --git a/test-environment.yml b/test-environment.yml index 5dba0de..2e6208c 100644 --- a/test-environment.yml +++ b/test-environment.yml @@ -15,4 +15,4 @@ dependencies: - pyflakes - snakemake - urllib3 - - cryptography <=37.0.0 + - cryptography diff --git a/tests/deploystack.sh b/tests/deploystack.sh index 411d874..5aa804a 100755 --- a/tests/deploystack.sh +++ b/tests/deploystack.sh @@ -6,7 +6,7 @@ DOCKER_COMPOSE=${DOCKER_COMPOSE:=docker-compose.yaml} # Images -SNAKEMAKE_IMAGE=${SNAKEMAKE_IMAGE:=quay.io/biocontainers/snakemake:7.3.2--hdfd78af_0} +SNAKEMAKE_IMAGE=${SNAKEMAKE_IMAGE:=quay.io/biocontainers/snakemake:7.30.1--hdfd78af_0} SLURM_IMAGE=${SLURM_IMAGE:=giovtorres/docker-centos7-slurm:20.11.8} docker pull $SNAKEMAKE_IMAGE diff --git a/tests/docker-compose.yaml b/tests/docker-compose.yaml index 568f318..39967cb 100644 --- a/tests/docker-compose.yaml +++ b/tests/docker-compose.yaml @@ -1,7 +1,7 @@ version: '3' services: snakemake: - image: quay.io/biocontainers/snakemake:7.3.2--hdfd78af_0 + image: quay.io/biocontainers/snakemake:7.30.1--hdfd78af_0 hostname: slurmctl command: /bin/bash deploy: diff --git a/tests/test_cookie.py b/tests/test_cookie.py index c2f43ce..b53cb67 100644 --- a/tests/test_cookie.py +++ b/tests/test_cookie.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 import sys import pytest +from unittest.mock import patch @pytest.mark.parametrize("sidecar", ["yes", "no"]) @@ -20,13 +21,20 @@ def test_bake_project(cookies, sidecar): def test_cookiecutter(cookies, monkeypatch): result = cookies.bake(template=str(pytest.cookie_template)) - monkeypatch.syspath_prepend(str(result.project_path)) - from CookieCutter import CookieCutter - assert CookieCutter.SBATCH_DEFAULTS == "" - assert CookieCutter.CLUSTER_NAME == "" - assert CookieCutter.CLUSTER_CONFIG == "" - assert CookieCutter.get_cluster_option() == "" - sys.modules.pop("CookieCutter") + assert result.exit_code == 0 + assert result.exception is None + + assert result.project_path.name == "slurm" + assert result.project_path.is_dir() + with patch.dict(sys.modules): + if "CookieCutter" in sys.modules: + del sys.modules["CookieCutter"] + monkeypatch.syspath_prepend(str(result.project_path)) + from CookieCutter import CookieCutter + assert CookieCutter.SBATCH_DEFAULTS == "" + assert CookieCutter.CLUSTER_NAME == "" + assert CookieCutter.CLUSTER_CONFIG == "" + assert CookieCutter.get_cluster_option() == "" def test_cookiecutter_extra_context(cookies, monkeypatch): @@ -34,10 +42,17 @@ def test_cookiecutter_extra_context(cookies, monkeypatch): extra_context={"sbatch_defaults": "account=foo", "cluster_name": "dusk", "cluster_config": "slurm.yaml"}) - monkeypatch.syspath_prepend(str(result.project_path)) - from CookieCutter import CookieCutter - assert CookieCutter.SBATCH_DEFAULTS == "account=foo" - assert CookieCutter.CLUSTER_NAME == "dusk" - assert CookieCutter.CLUSTER_CONFIG == "slurm.yaml" - assert CookieCutter.get_cluster_option() == "--cluster=dusk" - sys.modules.pop("CookieCutter") + assert result.exit_code == 0 + assert result.exception is None + + assert result.project_path.name == "slurm" + assert result.project_path.is_dir() + with patch.dict(sys.modules): + if "CookieCutter" in sys.modules: + del sys.modules["CookieCutter"] + monkeypatch.syspath_prepend(str(result.project_path)) + from CookieCutter import CookieCutter + assert CookieCutter.SBATCH_DEFAULTS == "account=foo" + assert CookieCutter.CLUSTER_NAME == "dusk" + assert CookieCutter.CLUSTER_CONFIG == "slurm.yaml" + assert CookieCutter.get_cluster_option() == "--cluster=dusk"