comparison webapollo.py @ 17:d91f4bc313d3 draft default tip

planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 12282c16658b37858f49944796fd95515ef0fc0b
author gga
date Wed, 11 Jan 2023 11:48:24 +0000
parents dca2fb399ee6
children
comparison
equal deleted inserted replaced
16:654af4ba76bc 17:d91f4bc313d3
3 import argparse 3 import argparse
4 import collections 4 import collections
5 import json 5 import json
6 import logging 6 import logging
7 import os 7 import os
8 import sys
8 import time 9 import time
9 from abc import abstractmethod 10 from abc import abstractmethod
11
12 if sys.version_info.major == 3 and sys.version_info.minor >= 10:
13 from collections.abc import MutableMapping
14 else:
15 from collections import MutableMapping
10 16
11 import requests 17 import requests
12 18
13 from six.moves.builtins import next 19 from six.moves.builtins import next
14 from six.moves.builtins import object 20 from six.moves.builtins import object
27 # available in rev. # 33 # available in rev. #
28 # e27332bc82f4e327aedaec17c9b656ae719322ed # 34 # e27332bc82f4e327aedaec17c9b656ae719322ed #
29 # of https://github.com/tkem/cachetools/ # 35 # of https://github.com/tkem/cachetools/ #
30 ############################################# 36 #############################################
31 37
32 class DefaultMapping(collections.MutableMapping): 38 class DefaultMapping(MutableMapping):
33 39
34 __slots__ = () 40 __slots__ = ()
35 41
36 @abstractmethod 42 @abstractmethod
37 def __contains__(self, key): # pragma: nocover 43 def __contains__(self, key): # pragma: nocover
434 class WebApolloInstance(object): 440 class WebApolloInstance(object):
435 441
436 def __init__(self): 442 def __init__(self):
437 443
438 if 'ARROW_GLOBAL_CONFIG_PATH' in os.environ: 444 if 'ARROW_GLOBAL_CONFIG_PATH' in os.environ:
439
440 with open(os.environ['ARROW_GLOBAL_CONFIG_PATH'], 'r') as config: 445 with open(os.environ['ARROW_GLOBAL_CONFIG_PATH'], 'r') as config:
441 conf = yaml.safe_load(config) 446 conf = yaml.safe_load(config)
442 try: 447 try:
443 instance_name = conf['__default'] 448 instance_name = conf['__default']
444 except KeyError: 449 except KeyError: