Skip to content

Commit

Permalink
pass verbose arg to coins_to_symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
enarjord committed Nov 7, 2024
1 parent 2487ba9 commit c0b629d
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/procedures.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,14 @@ def format_config(config: dict, verbose=True, live_only=False) -> dict:
}
eligible_symbols = get_all_eligible_symbols(result["backtest"]["exchange"])
ignored_coins = coins_to_symbols(
set(flatten(result["live"]["ignored_coins"].values())), eligible_symbols=eligible_symbols
set(flatten(result["live"]["ignored_coins"].values())),
eligible_symbols=eligible_symbols,
verbose=verbose,
)
approved_coins = coins_to_symbols(
set(flatten(result["live"]["approved_coins"].values())), eligible_symbols=eligible_symbols
set(flatten(result["live"]["approved_coins"].values())),
eligible_symbols=eligible_symbols,
verbose=verbose,
)
if approved_coins:
result["backtest"]["symbols"] = [
Expand Down Expand Up @@ -377,11 +381,11 @@ def format_end_date(end_date) -> str:
return end_date[:10]


def load_config(filepath: str, live_only=False) -> dict:
def load_config(filepath: str, live_only=False, verbose=True) -> dict:
# loads hjson or json v7 config
try:
config = load_hjson_config(filepath)
config = format_config(config, live_only=live_only)
config = format_config(config, live_only=live_only, verbose=verbose)
return config
except Exception as e:
raise Exception(f"failed to load config {filepath}: {e}")
Expand Down

0 comments on commit c0b629d

Please sign in to comment.