Skip to content

Commit

Permalink
output version; remove compress_pickle import for local
Browse files Browse the repository at this point in the history
  • Loading branch information
didillysquat committed Sep 7, 2020
1 parent b82fc40 commit 5c34014
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
7 changes: 2 additions & 5 deletions data_loading.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
from dbApp.models import (
DataSet, ReferenceSequence, DataSetSample, DataSetSampleSequence,
CladeCollection, DataSetSampleSequencePM, Study, User)
CladeCollection, DataSetSampleSequencePM)
import sys
import os
import shutil
import subprocess
import glob
import pandas as pd
import json
from collections import Counter
Expand All @@ -28,11 +27,9 @@
import time
from shutil import which
import sp_config
from django.core.exceptions import ObjectDoesNotExist
from django_general import CreateStudyAndAssociateUsers
import logging
import copy
import compress_pickle


class DataLoading:
# The clades refer to the phylogenetic divisions of the Symbiodiniaceae. Most of them are represented at the genera
Expand Down
9 changes: 7 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"""

__version__ = '0.3.19'


# Django specific settings
Expand Down Expand Up @@ -48,7 +48,6 @@
from bs4 import BeautifulSoup
import requests
import re
import compress_pickle
import data_analysis
from general import ThreadSafeGeneral
from django_general import CreateStudyAndAssociateUsers
Expand Down Expand Up @@ -299,6 +298,9 @@ def _define_mutually_exclusive_args(group):
'the DataSetSample names exactly. Unpopulated columns in the datasheet will be ignored.'
' I.e. existing meta-information will not be removed from the DataSetSampes if '
'information is missing in the datasheet.')
group.add_argument(
'--version', '-v', action='store_true',
help='Output version')

def start_work_flow(self):
if self.args.load:
Expand Down Expand Up @@ -358,6 +360,9 @@ def _check_for_display_arguments(self):
elif self.args.vacuum_database:
self.perform_vacuum_database()
return True
elif self.args.version:
print(__version__)
return True
# Only if we are running as remote, check for study output
if sp_config.system_type == 'remote':
if self.args.display_studies:
Expand Down

0 comments on commit 5c34014

Please sign in to comment.