renamed the package to OpenBB and added git check (#3572)

This commit is contained in:
Henrique Joaquim
2022-11-25 12:51:09 +00:00
committed by GitHub
parent dc9ae37f6a
commit d3d6bbe6f9

View File

@@ -26,6 +26,13 @@ load_dotenv(USER_ENV_FILE)
load_dotenv(REPOSITORY_ENV_FILE, override=True)
load_dotenv(PACKAGE_ENV_FILE, override=True)
try:
__import__("git")
except ImportError:
WITH_GIT = False
else:
WITH_GIT = True
# Retry unknown commands with `load`
RETRY_WITH_LOAD = load_env_vars("OPENBB_RETRY_WITH_LOAD", strtobool, False, "featflags")
@@ -135,7 +142,10 @@ GUESS_EASTER_EGG_FILE = str(
)
try:
version = pkg_resources.get_distribution("OpenBBTerminal").version
if not WITH_GIT:
version = pkg_resources.get_distribution("OpenBB").version
else:
raise Exception("Using git")
except Exception:
version = "2.0.0rc1"
VERSION = str(os.getenv("OPENBB_VERSION", version))