Skip to content

Commit

Permalink
Merge pull request #721 from lanl/issue#719/beeflow_version_cmd
Browse files Browse the repository at this point in the history
Switch --version command from core to beeflow.
  • Loading branch information
rstyd authored Sep 18, 2023
2 parents 1fabd38 + 7c72d23 commit 160ae83
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
11 changes: 11 additions & 0 deletions beeflow/client/bee_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import tempfile
import textwrap
import time
import importlib.metadata
import jsonpickle
import requests
import typer
Expand Down Expand Up @@ -536,6 +537,16 @@ def reexecute(wf_name: str = typer.Argument(..., help='The workflow name'),
return wf_id


@app.callback(invoke_without_command=True)
def version_callback(version: bool = False):
"""Beeflow."""
# Print out the current version of the app, and then exit
# Note above docstring gets used in the help menu
if version:
version = importlib.metadata.version("hpc-beeflow")
print(version)


def main():
"""Execute bee_client."""
global _INTERACTIVE
Expand Down
11 changes: 0 additions & 11 deletions beeflow/client/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import sys
import shutil
import time
import importlib.metadata

import daemon
import typer
Expand Down Expand Up @@ -389,13 +388,3 @@ def restart(foreground: bool = typer.Option(False, '--foreground', '-F',
"""Attempt to stop and restart the beeflow daemon."""
stop()
start(foreground)


@app.callback(invoke_without_command=True)
def version_callback(version: bool = False):
"""Beeflow."""
# Print out the current version of the app, and then exit
# Note above docstring gets used in the help menu
if version:
version = importlib.metadata.version("hpc-beeflow")
print(version)

0 comments on commit 160ae83

Please sign in to comment.