Skip to content

Commit

Permalink
pytest drmaa import fix
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelzwiers committed Nov 8, 2023
1 parent 7bd231f commit a53e53d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 1 addition & 3 deletions bidscoin/bcoin.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
from importlib.util import spec_from_file_location, module_from_spec
from pathlib import Path
from typing import Tuple, Union, List

import drmaa.session
from ruamel.yaml import YAML
from tqdm import tqdm
from tqdm.contrib.logging import logging_redirect_tqdm
Expand Down Expand Up @@ -49,7 +47,7 @@ def update_to(self, b=1, bsize=1, tsize=None):
self.update(b * bsize - self.n) # will also set self.n = b * bsize


def synchronize(pbatch: drmaa.session.Session, jobids: list, wait: int=15):
def synchronize(pbatch, jobids: list, wait: int=15):
"""
Shows tqdm progress bars for queued and running DRMAA jobs. Waits until all jobs have finished +
some extra wait time to give NAS systems the opportunity to fully synchronize
Expand Down
1 change: 1 addition & 0 deletions bidscoin/bidscoiner.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ def bidscoiner(rawfolder: str, bidsfolder: str, subjects: list=(), force: bool=F

from drmaa import Session as drmaasession # NB: Importing drmaa for non-HPC users may cause import errors

LOGGER.info('')
LOGGER.info('============== HPC START ==============')
LOGGER.info('')
with drmaasession() as pbatch:
Expand Down

0 comments on commit a53e53d

Please sign in to comment.