mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-27 12:40:35 +00:00
Moving exports into openbb_terminal folder. (#2859)
* Move export * Black Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt>
This commit is contained in:
@@ -12,6 +12,7 @@ import pandas as pd
|
||||
from pandas import DataFrame
|
||||
import numpy as np
|
||||
|
||||
from openbb_terminal.core.config.paths import MISCELLANEOUS_DIRECTORY
|
||||
from openbb_terminal.decorators import log_start_end
|
||||
from openbb_terminal.rich_config import console
|
||||
|
||||
@@ -22,7 +23,7 @@ default_files = {
|
||||
filepath.name: filepath
|
||||
for file_type in ["csv", "xlsx"]
|
||||
for filepath in chain(
|
||||
Path("exports").rglob(f"*.{file_type}"),
|
||||
(MISCELLANEOUS_DIRECTORY / "exports").rglob(f"*.{file_type}"),
|
||||
Path("custom_imports").rglob(f"*.{file_type}"),
|
||||
)
|
||||
if filepath.is_file()
|
||||
|
||||
@@ -21,6 +21,7 @@ from scipy.stats import binom
|
||||
import openbb_terminal.config_plot as cfp
|
||||
from openbb_terminal.config_plot import PLOT_DPI
|
||||
from openbb_terminal.config_terminal import theme
|
||||
from openbb_terminal.core.config.paths import MISCELLANEOUS_DIRECTORY
|
||||
from openbb_terminal.decorators import log_start_end
|
||||
from openbb_terminal.helper_funcs import (
|
||||
excel_columns,
|
||||
@@ -1049,12 +1050,12 @@ def export_binomial_calcs(
|
||||
for j, _ in enumerate(opt_vals[i]):
|
||||
ws[f"{opts[i]}{j+8+days}"] = opt_vals[i][j]
|
||||
|
||||
trypath = os.path.join(
|
||||
os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "..")),
|
||||
"exports",
|
||||
"stocks",
|
||||
"options",
|
||||
f"{symbol} {datetime.now()}.xlsx",
|
||||
trypath = str(
|
||||
MISCELLANEOUS_DIRECTORY
|
||||
/ "exports"
|
||||
/ "stocks"
|
||||
/ "options"
|
||||
/ f"{symbol} {datetime.now()}.xlsx"
|
||||
)
|
||||
wb.save(trypath)
|
||||
console.print(
|
||||
|
||||
Reference in New Issue
Block a user