Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minor: setup_configuration() cleanup #1938

Merged
merged 2 commits into from Jun 17, 2019

Conversation

hroff-1902
Copy link
Member

@hroff-1902 hroff-1902 commented Jun 16, 2019

  • slip in a comment fixed
  • setup_configuration() from utils.py renamed to setup_utils_configuration();
  • setting dry_run = True added to it;
  • use it in optimize/__init__.py to avoid duplication of the code;
  • test adjusted

This function is intended for the use in all other new utility subcommands that require configuration in the dry_run mode without real exchange key and secret (i.e. all besides simple list-exchanges which runs without configuration).

@coveralls
Copy link

coveralls commented Jun 16, 2019

Coverage Status

Coverage decreased (-0.002%) to 96.823% when pulling 195bf5a on hroff-1902:cleanup-setup-configuration into 2369161 on freqtrade:develop.

Copy link
Member

@xmatthias xmatthias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

We maybe should extract the "secret-clearing" for the configuration dict (probably to configuration??) since it's not just used for utils, but also for backtesting/hyperopt/edgecli ...

assert "exchange" in config
assert config['exchange']['dry_run'] is True
assert config['exchange']['key'] == ''
assert config['exchange']['secret'] == ''
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On a side note (just realized this now) we should also zero "password" and "uid" here, depending on the exchange these options can be exchange "secrets" too (see exchange.py - L162ff).

@xmatthias xmatthias merged commit b0c5286 into freqtrade:develop Jun 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants