Skip to content

Commit

Permalink
Fix arg parser and move exception to ena.py
Browse files Browse the repository at this point in the history
  • Loading branch information
mberacochea committed Jan 25, 2024
1 parent 5fcf179 commit 56fa1be
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 3 additions & 0 deletions genomeuploader/ena.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
logger = logging.getLogger(__name__)


class NoDataException(ValueError):
pass


RUN_DEFAULT_FIELDS = ','.join([
'study_accession',
Expand Down
6 changes: 1 addition & 5 deletions genomeuploader/genome_upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

import xml.etree.ElementTree as ET
import xml.dom.minidom as minidom
import requests

from .ena import ENA

Expand All @@ -37,9 +36,6 @@

ena = ENA()

class NoDataException(ValueError):
pass



'''
Expand Down Expand Up @@ -838,7 +834,7 @@ def __init__(self, argv=sys.argv[1:]):
workDir = self.args.out if self.args.out else os.getcwd()
self.upload_dir = self.generate_genomes_upload_dir(workDir, self.genomeType)

def parse_args(argv):
def parse_args(self, argv):
parser = argparse.ArgumentParser(formatter_class = argparse.ArgumentDefaultsHelpFormatter,
description="Allows to create xmls and manifest files for genome upload to ENA. " +
"--xmls and --manifests are needed to determine the action the script " +
Expand Down

0 comments on commit 56fa1be

Please sign in to comment.