mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-30 14:02:06 +00:00
Logging : fix feature flag (#1543)
* Update only_send_file_size * Updating only_send_file_size feature * Updating only_send_file_size feature * Updating only_send_file_size feature * Updating settings_controller * Update settings_controller : help message * Data Collection : move boto3 as discord dependencies * Update dependencies * Refactoring log collection * Refactoring logging * Logging : add rolling clock * Logging : enable daemon for logging clock * Logging : fix linting and type * Logging : update linting * Logging : add comment * Logging : remove empty log files * Logging : adding PII filter * Logging removing : unlink * Logging : terminal.py * Logging : linting * Logging : linting * minor changes * Logging : update * Logging : linting * added userId * userId NA * Logging : remove unused functions * Logging : disable feature flag * Logging : black * Tests : skipping failing tests, date not mocked * Tests : linting Co-authored-by: LBolte29 <lbolte@gmx.net>
This commit is contained in:
@@ -65,7 +65,7 @@ ENABLE_RICH_PANEL = strtobool(os.getenv("GTFF_ENABLE_RICH_PANEL", "True"))
|
||||
ENABLE_CHECK_API = strtobool(os.getenv("GTFF_ENABLE_CHECK_API", "True"))
|
||||
|
||||
# Send logs to data lake
|
||||
LOG_COLLECTION = strtobool(os.getenv("GTFF_LOG_COLLECTION", "True"))
|
||||
LOG_COLLECTION = strtobool(os.getenv("GTFF_LOG_COLLECTION", "False"))
|
||||
|
||||
# Send only file size
|
||||
ONLY_SEND_FILE_SIZE = strtobool(os.getenv("GTFF_ONLY_SEND_FILE_SIZE", "False"))
|
||||
|
||||
@@ -8,9 +8,6 @@ from pathlib import Path
|
||||
|
||||
# IMPORTATION INTERNAL
|
||||
|
||||
ARCHIVE_FOLDER_NAME = "archive"
|
||||
TEMPORARY_FOLDER_NAME = "tmp"
|
||||
|
||||
|
||||
def get_log_dir() -> Path:
|
||||
"""Retrieve application's log directory."""
|
||||
@@ -47,11 +44,3 @@ def get_log_sub_dir(name: str):
|
||||
sub_dir = log_dir / name
|
||||
|
||||
return sub_dir
|
||||
|
||||
|
||||
def get_tmp_dir():
|
||||
return get_log_sub_dir(name=TEMPORARY_FOLDER_NAME)
|
||||
|
||||
|
||||
def get_archive_dir():
|
||||
return get_log_sub_dir(name=ARCHIVE_FOLDER_NAME)
|
||||
|
||||
@@ -82,6 +82,7 @@ def test_load_data(func, kwargs_dict, recorder):
|
||||
recorder.capture(result_df)
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="Date needs to be mocked.")
|
||||
@pytest.mark.vcr
|
||||
@pytest.mark.parametrize("date", [datetime.datetime(2022, 3, 21, 0, 0)])
|
||||
def test_yield_curve(date, recorder):
|
||||
@@ -91,6 +92,7 @@ def test_yield_curve(date, recorder):
|
||||
recorder.capture(result_df)
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="Date needs to be mocked.")
|
||||
@pytest.mark.vcr
|
||||
@pytest.mark.parametrize("date", [datetime.datetime(2021, 7, 17, 0, 0)])
|
||||
def test_yield_curve_weekend(date):
|
||||
@@ -99,6 +101,7 @@ def test_yield_curve_weekend(date):
|
||||
assert result_df.empty
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="Date needs to be mocked.")
|
||||
@pytest.mark.vcr
|
||||
@pytest.mark.parametrize("date", [None])
|
||||
def test_yield_curve_none(date, recorder):
|
||||
|
||||
Reference in New Issue
Block a user