Skip to content

Commit

Permalink
feature(nbia): Add pyfiglet package and display NBIAToolkit version
Browse files Browse the repository at this point in the history
  • Loading branch information
jjjermiah committed Jan 29, 2024
1 parent ad549dc commit 0007ca0
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 8 deletions.
14 changes: 12 additions & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ python = ">=3.11 || 3.12"
requests = "2.31.0"
pydicom = "^2.4.3"
tqdm = "^4.66.1"
pyfiglet = "^1.0"

[tool.poetry.dev-dependencies]

Expand Down
7 changes: 1 addition & 6 deletions src/nbiatoolkit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,9 @@
# this file is used to import all the modules in the package
# this file is used to define the __all__ variable

# set __version__ variable
__version__ = "0.12.1"

def version():
return "NBIAToolkit version: {}".format(__version__)

# import the modules
from .nbia import NBIAClient
from .nbia import NBIAClient, version
from .auth import OAuth2
from .logger.logger import setup_logger
from .utils.nbia_endpoints import NBIA_ENDPOINTS
Expand Down
12 changes: 12 additions & 0 deletions src/nbiatoolkit/nbia.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@
import io
import zipfile
from tqdm import tqdm
from pyfiglet import Figlet

# set __version__ variable
__version__ = "0.12.1"

def version():

f = Figlet(font='slant')
print(f.renderText('NBIAToolkit'))
print("Version: {}".format(__version__))
return



class NBIAClient:
Expand Down

0 comments on commit 0007ca0

Please sign in to comment.