mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-27 19:53:17 +00:00
@@ -16,7 +16,12 @@ def get_package_version(package: str):
|
||||
except pkg_resources.DistributionNotFound:
|
||||
package += "-nightly"
|
||||
is_nightly = True
|
||||
version = pkg_resources.get_distribution(package).version
|
||||
try:
|
||||
version = pkg_resources.get_distribution(package).version
|
||||
except pkg_resources.DistributionNotFound:
|
||||
package = "openbb-core"
|
||||
version = pkg_resources.get_distribution(package).version
|
||||
version += "core"
|
||||
|
||||
if is_git_repo(Path(__file__).parent.resolve()) and not is_nightly:
|
||||
version += "dev"
|
||||
@@ -42,4 +47,7 @@ def is_git_repo(path: Path):
|
||||
return False
|
||||
|
||||
|
||||
VERSION = get_package_version(PACKAGE)
|
||||
try:
|
||||
VERSION = get_package_version(PACKAGE)
|
||||
except pkg_resources.DistributionNotFound:
|
||||
VERSION = "unknown"
|
||||
|
||||
@@ -4,7 +4,7 @@ __docformat__ = "numpy"
|
||||
# pylint: disable=no-member, too-many-branches, too-many-arguments
|
||||
# pylint: disable=inconsistent-return-statements
|
||||
# pylint: disable=consider-using-dict-items
|
||||
|
||||
# pylint: disable=too-many-lines
|
||||
import logging
|
||||
import os
|
||||
from copy import deepcopy
|
||||
|
||||
Reference in New Issue
Block a user