Skip to content

Commit 43c55f2

Browse files
committed
version in command line argument
1 parent e81786f commit 43c55f2

3 files changed

Lines changed: 14 additions & 3 deletions

File tree

deepEMhancer/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__="0.13"

deepEMhancer/applyProcessVol/cmdParserOptionsDeepEMHancer.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
import pkg_resources
2+
3+
import deepEMhancer
14
from ..config import BATCH_SIZE
25

36
processVolOptions= [
@@ -88,8 +91,12 @@
8891
"nargs": None,
8992
"required": False,
9093
"default": BATCH_SIZE,
91-
"help": "Number of cubes to process simultaneously. Lower it if CUDA Out Of Memory error happens and increase it if low GPU performance observed. Default: %(default)s"
94+
"help": "Number of cubes to process simultaneously. Lower it if CUDA Out Of Memory error happens and increase it if low GPU performance observed. Warning, for some inputs it may crash if --gpus > . Use only 1 gpus in that case. 1Default: %(default)s"
9295
}),
9396

97+
("--version", {
98+
"action": "version",
99+
"version": deepEMhancer.__version__, #pkg_resources.require("deepEMhancer")[0].version,
100+
}),
94101

95102
]

setup.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1+
import importlib
12
import os
23

34
import setuptools
45
from setuptools import setup
56

6-
VERSION="0.13"
7+
def version():
8+
version = importlib.import_module("deepEMhancer").__version__
9+
return version
710

811
def readme():
912
readmePath = os.path.abspath(os.path.join(__file__, "..", "README.md"))
@@ -40,7 +43,7 @@ def readme():
4043
]
4144

4245
setup(name='deepEMhancer',
43-
version=VERSION,
46+
version=version(),
4447
description='Deep learning for cryo-EM maps post-processing',
4548
long_description=readme(),
4649
long_description_content_type="text/markdown",

0 commit comments

Comments
 (0)