Skip to content

Commit

Permalink
updating version handling and adding version to log
Browse files Browse the repository at this point in the history
  • Loading branch information
linsalrob committed Aug 17, 2020
1 parent 2435894 commit 6bea62f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
3 changes: 2 additions & 1 deletion PhiSpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import os
import sys
import gzip
import pkg_resources
from functools import reduce

from Bio import SeqIO
Expand All @@ -11,13 +12,13 @@

import PhiSpyModules


def main(argv): #organismPath, output_dir, trainingFlag, INSTALLATION_DIR, evaluateOnly, threshold_for_FN, phageWindowSize, quietMode, keep):

######################################
# parse the options #
######################################
args_parser = PhiSpyModules.get_args()
PhiSpyModules.log_and_message(f"Welcome to PhiSpy.py version {PhiSpyModules.__version__}\n")
PhiSpyModules.log_and_message(f"Starting PhiSpy.py with the following arguments\n{args_parser}")

# if we get here we need an input file
Expand Down
4 changes: 2 additions & 2 deletions PhiSpyModules/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from .search_phmms import search_phmms
from .log_and_message import log_and_message, message
from .errors import ColorNotFoundError, NoBasesCounted

from .version import __version__

__all__ = ['SeqioFilter',
Expand All @@ -26,5 +25,6 @@
'prophage_measurements_to_tbl', 'write_all_outputs', 'write_prophage_information', 'log_and_message',
'search_phmms',
'message',
'ColorNotFoundError', 'NoBasesCounted'
'ColorNotFoundError', 'NoBasesCounted',
'__version__'
]
6 changes: 1 addition & 5 deletions PhiSpyModules/helper_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@
import logging

from .log_and_message import message

try:
__version__ = pkg_resources.get_distribution('phispy').version
except Exception:
__version__ = 'unknown'
from .version import __version__

def print_list():
f = None
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.1.16
4.1.17

0 comments on commit 6bea62f

Please sign in to comment.