Skip to content

Commit

Permalink
fix(hyfi): add global_hyfi initialization method to HyFI
Browse files Browse the repository at this point in the history
  • Loading branch information
entelecheia committed Jul 23, 2023
1 parent 6bd168f commit 81c8f6f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/hyfi/main/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from hyfi.copier import Copier
from hyfi.core import (
__app_version__,
__global_hyfi__,
__home_path__,
__hyfi_path__,
__hyfi_version__,
Expand Down Expand Up @@ -98,6 +99,18 @@ class HyFI(
def __init__(self) -> None:
raise NotImplementedError("Use one of the static construction functions")

@staticmethod
def initialize_global_hyfi(
package_name: str,
version: str,
) -> None:
"""
Initializes the global HyFI instance.
This function should be called before any other HyFI function.
"""
__global_hyfi__.initialize(package_name=package_name, version=version)

@staticmethod
def about(**args) -> None:
"""Print the about information"""
Expand Down

0 comments on commit 81c8f6f

Please sign in to comment.