mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-29 13:32:08 +00:00
* Update trailmap.py (#4300) * Fixes Failing AutoDocs (#4304) * Fixes Failing AutoDocs * Update test_print_help.txt * Release 2.5.0 (#4355) * Rename SDK folder * Fixing all the tests I hope * Depreciate the sia menu * Fix routine script * Update SDK generation scripts * This needed fixing anyways * Regenerate SDK files * Update paths in sdk helpers * Regenerate the remains of the SDK * Fix candle not working with symbol via the sdk * Fix pydocstyle errors * deps * Add in Docstrings * Push to website since I need to upload images * typos * Add in Fixed Income Guide * Tests : fix cassette * changes to layout and adding more content * trailmap * poetry * updates to requirements files * add `_try_to_login` to sdk generation, fix `_chart` in `about()` url * sentiment analysis * refactor * changing to base model default * rounding * renewing poetry * fixed poetry * spacing * black * adds selectable models for realized volatility calculations * fixes line too long * Add intro guides to Fixed Income * Fix some missing docstrings * Fix website not working * missed a few * fix /economy/test_yfinance_view tests * fix etf/test_stockanalysis_model.py * fix etf/test_stockanalysis_view.py * fix test_stocks_controller * deprecating non used function * update financedatabase to 2.0.4 * Delete SIA from OpenBB Docs and SDK * Searching was not done properly for short name and index * changes the default data source for crypto.load * Fix tests I broke * Little fixy fix to remove duplicates * Fix tests * typo * adds check for empty dataframe * Patch Equity Report * Update so that image links to website * linting v2 * silly imports * adding tempfile * add imap unordered * reordering imports * Adding databento as a source (#4293) * First commit * Baby steps * Keys and sdk * Fix import for api key * Add SDK endpoints * Test + api checks * tests * roque print of api key * Changes * minor * custom timeout * improve timeouts --------- Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> * Tests * Integration test * frozendict remove * update spec * rename sdk faq to troubleshooting * add hidden import * add hidden imports * imports again * valid url check * new lines and prompt * split imports * more spec * adds cones to the crypto-ta menu * Fix tests * Update code to reflect new changes to FinanceDatabase * Small bugfix for DCF if you have no ticker loaded * remove yfinance from news * add reverse fx choices * black * ruff * Add options greeks to the SDK * Linting * Delete rogue file and update test and add fixedincome to en.yml * fix for options screener * ruff * updates tests for options screener * reqs * updates more test files * rewrite for test_github_model * rewrite test for test_syncretism_view * removes test_view_available_presets[] * black * coverage * adds option screener preset * Update directories.py * len & set * set all list * adds unit testing for cones * ruff * pylint * adds options screener endpoint to SDK * test markers * Testing draft PR mode * Update package to v2.0.7 * Remove etf/screener and tests * Updated * Merge reqs * Updated readme * hook test for pyinstaller * Little fixy fix * Remove etf/scr from SDK * Update tests * Update hook-whisper.py * oops lol * Update sdk * update * Etf * removed old trailmap csv's * Update fixedincome text * add greeks to trail * rouge file * merge killed it * fix test * fix build failure * catch for error message * fix for frozendict * caching search and prompting on hub * whisper model prompts * Fix long/short issue and fix transform issue * separates volatility models from cones function * Introduce CPI functionality * improves error handling for volatility models when window length is too small * ur welcome <3 * additional sanity check for volatility_view * updates volatility_model test * black * Fix linting * Make cpi a little bit more robust * Add in missing value * sdk updates * update dep files * Update trail_map_forecasting.csv * import ordering pylint? * fix trailing comma * sorted trailmaps * remove one test artifact * rewrite test * Adds the missing pieces. * adds clickable URL in keys + Databento * adds databento images * adds images for Databento * update deps * req files * swap order in databento * ruff * mypy * lint * sdk * makes requested changes * ruff v2.. * replaces screenshot. * Removed because it shouldn't have been in this PR. * ruff v3 * Minor edit, move installation to position 2 instead of last * util linting changes * linting for controller * fix test * test * Revert some tests * Guess not * see if this sticks * fixes * Fix linters. Add --video if not provided * Checkout develop tests for keys * Release time * Revert papermill and update gh pages action * Fix shortname (#4356) * uninstall brotli on conda test * Fix issue 4316 (#4357) * Fix issue 4316 * Updating polygon_model + options_controller * Tests : FRED * ruff --------- Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> Co-authored-by: Jeroen Bouma <jer.bouma@gmail.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> Co-authored-by: Chavithra PARANA <chavithra@gmail.com> Co-authored-by: teh_coderer <me@tehcoderer.com> Co-authored-by: martinb-bb <105685594+martinb-bb@users.noreply.github.com> Co-authored-by: Diogo Sousa <montezdesousa@gmail.com> Co-authored-by: northern-64bit <75195383+northern-64bit@users.noreply.github.com> Co-authored-by: luqazino@gmail.com <luqazino@gmail.com> Co-authored-by: colin99d <colin99delahunty@gmail.com> Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com> Co-authored-by: andrewkenreich <andrew.kenreich@gmail.com> * Add pydantic to reqs and get ffmpeg in docker image * Merge deps * Update release files --------- Co-authored-by: teh_coderer <me@tehcoderer.com> Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> Co-authored-by: Jeroen Bouma <jer.bouma@gmail.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> Co-authored-by: Chavithra PARANA <chavithra@gmail.com> Co-authored-by: martinb-bb <105685594+martinb-bb@users.noreply.github.com> Co-authored-by: Diogo Sousa <montezdesousa@gmail.com> Co-authored-by: northern-64bit <75195383+northern-64bit@users.noreply.github.com> Co-authored-by: luqazino@gmail.com <luqazino@gmail.com> Co-authored-by: colin99d <colin99delahunty@gmail.com> Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com> Co-authored-by: andrewkenreich <andrew.kenreich@gmail.com>
192 lines
5.4 KiB
Python
192 lines
5.4 KiB
Python
# IMPORTATION STANDARD
|
|
import os
|
|
import os.path
|
|
|
|
# IMPORTATION THIRDPARTY
|
|
import i18n
|
|
|
|
from openbb_terminal.base_helpers import load_env_vars, strtobool
|
|
from openbb_terminal.core.config import paths_helper
|
|
|
|
# IMPORTATION INTERNAL
|
|
from openbb_terminal.core.config.paths import (
|
|
MISCELLANEOUS_DIRECTORY,
|
|
USER_DATA_SOURCES_DEFAULT_FILE,
|
|
)
|
|
|
|
paths_helper.init_userdata()
|
|
|
|
# pylint: disable=no-member,c-extension-no-member
|
|
|
|
try:
|
|
__import__("git")
|
|
except ImportError:
|
|
WITH_GIT = False
|
|
else:
|
|
WITH_GIT = True
|
|
|
|
# Sync with OpenBB server
|
|
SYNC_ENABLED = load_env_vars("OPENBB_SYNC_ENABLED", strtobool, True, "featflags")
|
|
|
|
# Always overwrite exported files
|
|
FILE_OVERWITE = load_env_vars("OPENBB_FILE_OVERWRITE", strtobool, False, "featflags")
|
|
|
|
# Retry unknown commands with `load`
|
|
RETRY_WITH_LOAD = load_env_vars("OPENBB_RETRY_WITH_LOAD", strtobool, False, "featflags")
|
|
|
|
# Use tabulate to print dataframes
|
|
USE_TABULATE_DF = load_env_vars("OPENBB_USE_TABULATE_DF", strtobool, True, "featflags")
|
|
|
|
# Use clear console after each command
|
|
USE_CLEAR_AFTER_CMD = load_env_vars(
|
|
"OPENBB_USE_CLEAR_AFTER_CMD", strtobool, False, "featflags"
|
|
)
|
|
|
|
# Use coloring features
|
|
USE_COLOR = load_env_vars("OPENBB_USE_COLOR", strtobool, True, "featflags")
|
|
|
|
# Add date and time to command line
|
|
USE_DATETIME = load_env_vars("OPENBB_USE_DATETIME", strtobool, True, "featflags")
|
|
|
|
# Enable interactive matplotlib mode
|
|
USE_ION = load_env_vars("OPENBB_USE_ION", strtobool, True, "featflags")
|
|
|
|
# Enable watermark in the figures
|
|
USE_WATERMARK = load_env_vars("OPENBB_USE_WATERMARK", strtobool, True, "featflags")
|
|
|
|
# Enable command and source in the figures
|
|
USE_CMD_LOCATION_FIGURE = load_env_vars(
|
|
"OPENBB_USE_CMD_LOCATION_FIGURE", strtobool, True, "featflags"
|
|
)
|
|
|
|
# Enable Prompt Toolkit
|
|
USE_PROMPT_TOOLKIT = load_env_vars(
|
|
"OPENBB_USE_PROMPT_TOOLKIT", strtobool, True, "featflags"
|
|
)
|
|
|
|
# Enable plot autoscaling
|
|
USE_PLOT_AUTOSCALING = load_env_vars(
|
|
"OPENBB_USE_PLOT_AUTOSCALING", strtobool, False, "featflags"
|
|
)
|
|
|
|
# Enable thoughts of the day
|
|
ENABLE_THOUGHTS_DAY = load_env_vars(
|
|
"OPENBB_ENABLE_THOUGHTS_DAY", strtobool, False, "featflags"
|
|
)
|
|
|
|
# Quick exit for testing
|
|
ENABLE_QUICK_EXIT = load_env_vars(
|
|
"OPENBB_ENABLE_QUICK_EXIT", strtobool, False, "featflags"
|
|
)
|
|
|
|
# Open report as HTML, otherwise notebook
|
|
OPEN_REPORT_AS_HTML = load_env_vars(
|
|
"OPENBB_OPEN_REPORT_AS_HTML", strtobool, True, "featflags"
|
|
)
|
|
|
|
# Enable auto print_help when exiting menus
|
|
ENABLE_EXIT_AUTO_HELP = load_env_vars(
|
|
"OPENBB_ENABLE_EXIT_AUTO_HELP", strtobool, True, "featflags"
|
|
)
|
|
|
|
# Remember contexts during session
|
|
REMEMBER_CONTEXTS = load_env_vars(
|
|
"OPENBB_REMEMBER_CONTEXTS", strtobool, True, "featflags"
|
|
)
|
|
|
|
# Use the colorful rich terminal
|
|
ENABLE_RICH = load_env_vars("OPENBB_ENABLE_RICH", strtobool, True, "featflags")
|
|
|
|
# Use the colorful rich terminal
|
|
ENABLE_RICH_PANEL = load_env_vars(
|
|
"OPENBB_ENABLE_RICH_PANEL", strtobool, True, "featflags"
|
|
)
|
|
|
|
# Check API KEYS before running a command
|
|
ENABLE_CHECK_API = load_env_vars(
|
|
"OPENBB_ENABLE_CHECK_API", strtobool, True, "featflags"
|
|
)
|
|
|
|
# Send logs to data lake
|
|
LOG_COLLECTION = load_env_vars("OPENBB_LOG_COLLECT", strtobool, True, "featflags")
|
|
|
|
# Provide export folder path. If empty that means default.
|
|
EXPORT_FOLDER_PATH = str(os.getenv("OPENBB_EXPORT_FOLDER_PATH", ""))
|
|
|
|
# Toolbar hint
|
|
TOOLBAR_HINT = load_env_vars("OPENBB_TOOLBAR_HINT", strtobool, True, "featflags")
|
|
|
|
# Toolbar Twitter news
|
|
TOOLBAR_TWEET_NEWS = load_env_vars(
|
|
"OPENBB_TOOLBAR_TWEET_NEWS", strtobool, False, "featflags"
|
|
)
|
|
|
|
# Toolbar Twitter news seconds between updates being checked
|
|
TOOLBAR_TWEET_NEWS_SECONDS_BETWEEN_UPDATES = load_env_vars(
|
|
"OPENBB_TOOLBAR_TWEET_NEWS_SECONDS_BETWEEN_UPDATES", int, 300, "settings"
|
|
)
|
|
|
|
# Toolbar Twitter news accounts to track
|
|
TOOLBAR_TWEET_NEWS_ACCOUNTS_TO_TRACK = load_env_vars(
|
|
"OPENBB_TOOLBAR_TWEET_NEWS_ACCOUNTS_TO_TRACK",
|
|
str,
|
|
"WatcherGuru,unusual_whales,gurgavin,CBSNews",
|
|
"settings",
|
|
)
|
|
|
|
# Toolbar Twitter news keywords to look for
|
|
TOOLBAR_TWEET_NEWS_KEYWORDS = load_env_vars(
|
|
"OPENBB_TOOLBAR_TWEET_NEWS_KEYWORDS",
|
|
str,
|
|
"BREAKING,JUST IN",
|
|
"settings",
|
|
)
|
|
|
|
|
|
# Toolbar Twitter news number of last tweets to read
|
|
TOOLBAR_TWEET_NEWS_NUM_LAST_TWEETS_TO_READ = load_env_vars(
|
|
"OPENBB_TOOLBAR_TWEET_NEWS_NUM_LAST_TWEETS_TO_READ", int, 3, "settings"
|
|
)
|
|
|
|
# Select language to be used
|
|
USE_LANGUAGE = str(os.getenv("OPENBB_USE_LANGUAGE", "en"))
|
|
|
|
# File that contains a JSON dictionary of preferred sources for commands
|
|
PREFERRED_DATA_SOURCE_FILE = str(
|
|
os.getenv(
|
|
"OPENBB_PREFERRED_DATA_SOURCE_FILE",
|
|
USER_DATA_SOURCES_DEFAULT_FILE,
|
|
)
|
|
)
|
|
|
|
# Timezone
|
|
TIMEZONE = str(os.getenv("OPENBB_TIMEZONE", "America/New_York"))
|
|
|
|
# Select console flair (choose from config_terminal.py list)
|
|
USE_FLAIR = str(os.getenv("OPENBB_USE_FLAIR", ":openbb"))
|
|
|
|
# Guess file
|
|
GUESS_EASTER_EGG_FILE = str(
|
|
os.getenv(
|
|
"OPENBB_GUESS_EASTER_EGG_FILE",
|
|
os.getcwd() + os.path.sep + "guess_game.json",
|
|
)
|
|
)
|
|
|
|
try:
|
|
if not WITH_GIT:
|
|
import pkg_resources
|
|
|
|
version = pkg_resources.get_distribution("OpenBB").version
|
|
else:
|
|
raise Exception("Using git")
|
|
except Exception:
|
|
version = "2.5.1"
|
|
VERSION = str(os.getenv("OPENBB_VERSION", version))
|
|
|
|
# Select the terminal translation language
|
|
i18n_dict_location = MISCELLANEOUS_DIRECTORY / "i18n"
|
|
i18n.load_path.append(i18n_dict_location)
|
|
i18n.set("locale", USE_LANGUAGE)
|
|
i18n.set("filename_format", "{locale}.{format}")
|