Skip to content

Commit

Permalink
add version command
Browse files Browse the repository at this point in the history
  • Loading branch information
aantn committed May 30, 2024
1 parent 9b32bc4 commit 02ccf58
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions holmes.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from holmes.config import ConfigFile, LLMType
from holmes.plugins.destinations import DestinationType
from holmes.plugins.prompts import load_prompt
from holmes import __version__

app = typer.Typer(add_completion=False, pretty_exceptions_show_locals=False)
investigate_app = typer.Typer(
Expand Down Expand Up @@ -335,6 +336,9 @@ def jira(
f"[bold]Not updating ticket {issue.url}. Use the --update-ticket option to do so.[/bold]"
)

@app.command()
def version() -> None:
typer.echo(__version__)

if __name__ == "__main__":
app()
4 changes: 3 additions & 1 deletion holmes/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# For relative imports to work in Python 3.6
# See https://stackoverflow.com/a/49375740
import os, sys; sys.path.append(os.path.dirname(os.path.realpath(__file__)))
import os, sys; sys.path.append(os.path.dirname(os.path.realpath(__file__)))

__version__ = "0.1.7"

0 comments on commit 02ccf58

Please sign in to comment.