Skip to content
This repository has been archived by the owner on Sep 7, 2023. It is now read-only.

Commit

Permalink
Add version info
Browse files Browse the repository at this point in the history
  • Loading branch information
moshi4 committed Sep 4, 2022
1 parent b7ae6b5 commit 4af7136
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "FastDTLmapper"
version = "0.0.0"
version = "0.3.3"
description = "Fast genome-wide DTL(Duplication-Transfer-Loss) event mapping tool"
authors = ["moshi"]
license = "GPL-3.0-only"
Expand Down
1 change: 1 addition & 0 deletions src/fastdtlmapper/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "0.3.3"
18 changes: 17 additions & 1 deletion src/fastdtlmapper/args.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
from pathlib import Path
from typing import List, Optional, Union

from fastdtlmapper import __version__


@dataclass
class Args:
Expand Down Expand Up @@ -86,7 +88,8 @@ def get_args(argv: Optional[List[str]] = None) -> Args:
Args: Args Class
"""
parser = argparse.ArgumentParser(
description="Fast genome-wide DTL event mapping tool"
description=f"Fast genome-wide DTL event mapping tool (v{__version__})",
add_help=False,
)

parser.add_argument(
Expand Down Expand Up @@ -169,6 +172,19 @@ def get_args(argv: Optional[List[str]] = None) -> Args:
default=default_rseed,
metavar="",
)
parser.add_argument(
"-v",
"--version",
version=f"v{__version__}",
help="Print version information",
action="version",
)
parser.add_argument(
"-h",
"--help",
help="Show this help message and exit",
action="help",
)
#######################################################
# Hidden test option for developer
#######################################################
Expand Down

0 comments on commit 4af7136

Please sign in to comment.