diff --git a/gamestonk_terminal/config_terminal.py b/gamestonk_terminal/config_terminal.py index ffd1a702ecb..dd4092eb45d 100644 --- a/gamestonk_terminal/config_terminal.py +++ b/gamestonk_terminal/config_terminal.py @@ -3,6 +3,9 @@ from dotenv import load_dotenv load_dotenv() +# By default the jupyter notebook will be run on port 8888 +PAPERMILL_NOTEBOOK_REPORT_PORT = "8888" + # https://www.alphavantage.co API_KEY_ALPHAVANTAGE = os.getenv("GT_API_KEY_ALPHAVANTAGE") or "REPLACE_ME" diff --git a/gamestonk_terminal/papermill/due_diligence_view.py b/gamestonk_terminal/papermill/due_diligence_view.py index 769b8db7230..51c58089c99 100644 --- a/gamestonk_terminal/papermill/due_diligence_view.py +++ b/gamestonk_terminal/papermill/due_diligence_view.py @@ -4,6 +4,7 @@ __docformat__ = "numpy" import argparse from typing import List from datetime import datetime +from gamestonk_terminal import config_terminal as cfg import os import webbrowser import papermill as pm @@ -65,5 +66,7 @@ def due_diligence(other_args: List[str]): print("") return - webbrowser.open(f"http://localhost:8888/notebooks/{analysis_notebook}") + webbrowser.open( + f"http://localhost:{cfg.PAPERMILL_NOTEBOOK_REPORT_PORT}/notebooks/{analysis_notebook}" + ) print("") diff --git a/gamestonk_terminal/papermill/econ_data_view.py b/gamestonk_terminal/papermill/econ_data_view.py index bab7757d13d..7eeebf6fb79 100644 --- a/gamestonk_terminal/papermill/econ_data_view.py +++ b/gamestonk_terminal/papermill/econ_data_view.py @@ -4,6 +4,7 @@ __docformat__ = "numpy" import argparse from typing import List from datetime import datetime +from gamestonk_terminal import config_terminal as cfg import os import webbrowser import papermill as pm @@ -54,5 +55,7 @@ def econ_data(other_args: List[str]): print("") return - webbrowser.open(f"http://localhost:8888/notebooks/{analysis_notebook}") + webbrowser.open( + f"http://localhost:{cfg.PAPERMILL_NOTEBOOK_REPORT_PORT}/notebooks/{analysis_notebook}" + ) print("")