File: test_azure_batch_executor.py

package info (click to toggle)
snakemake 7.32.4-8.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 25,836 kB
  • sloc: python: 32,846; javascript: 1,287; makefile: 247; sh: 163; ansic: 57; lisp: 9
file content (26 lines) | stat: -rw-r--r-- 717 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import sys
import os
import re

sys.path.insert(0, os.path.dirname(__file__))

from common import *


@azbatch
def test_az_batch_executor():
    # AZ_BATCH_ACCOUNT_URL=https://${batch_account_name}.${region}.batch.azure.com
    bau = os.getenv("AZ_BATCH_ACCOUNT_URL")
    prefix = os.getenv("AZ_BLOB_PREFIX")
    wdir = dpath("test_azure_batch")
    blob_account_url = os.getenv("AZ_BLOB_ACCOUNT_URL")
    assert blob_account_url is not None and blob_account_url.strip() != ""

    run(
        path=wdir,
        default_remote_prefix=prefix,
        container_image="snakemake/snakemake",
        envvars=["AZ_BLOB_ACCOUNT_URL", "AZ_BLOB_CREDENTIAL"],
        az_batch=True,
        az_batch_account_url=bau,
    )