Rename --custom-hyperopt to --hyperopt

This commit is contained in:
Matthias 2019-10-14 19:42:28 +02:00
parent 2c200873c1
commit 89283ef486
6 changed files with 13 additions and 13 deletions

View File

@ -32,7 +32,7 @@ jobs:
name: backtest
- script:
- cp config.json.example config.json
- freqtrade hyperopt --datadir tests/testdata -e 5 --strategy DefaultStrategy --customhyperopt DefaultHyperOpts
- freqtrade hyperopt --datadir tests/testdata -e 5 --strategy DefaultStrategy --hyperopt DefaultHyperOpts
name: hyperopt
- script: flake8
name: flake8

View File

@ -266,7 +266,7 @@ usage: freqtrade hyperopt [-h] [-v] [--logfile FILE] [-V] [-c PATH] [-d PATH]
[-i TICKER_INTERVAL] [--timerange TIMERANGE]
[--max_open_trades INT]
[--stake_amount STAKE_AMOUNT]
[--customhyperopt NAME] [--hyperopt-path PATH]
[--hyperopt NAME] [--hyperopt-path PATH]
[--eps] [-e INT]
[--spaces {all,buy,sell,roi,stoploss} [{all,buy,sell,roi,stoploss} ...]]
[--dmmp] [--print-all] [--no-color] [--print-json]
@ -284,7 +284,7 @@ optional arguments:
Specify max_open_trades to use.
--stake_amount STAKE_AMOUNT
Specify stake_amount.
--customhyperopt NAME
--hyperopt NAME
Specify hyperopt class name which will be used by the
bot.
--hyperopt-path PATH Specify additional lookup path for Hyperopts and

View File

@ -239,7 +239,7 @@ Because hyperopt tries a lot of combinations to find the best parameters it will
We strongly recommend to use `screen` or `tmux` to prevent any connection loss.
```bash
freqtrade hyperopt --config config.json --customhyperopt <hyperoptname> -e 5000 --spaces all
freqtrade hyperopt --config config.json --hyperopt <hyperoptname> -e 5000 --spaces all
```
Use `<hyperoptname>` as the name of the custom hyperopt used.

View File

@ -152,7 +152,7 @@ AVAILABLE_CLI_OPTIONS = {
),
# Hyperopt
"hyperopt": Arg(
'--customhyperopt',
'--hyperopt',
help='Specify hyperopt class name which will be used by the bot.',
metavar='NAME',
),

View File

@ -28,7 +28,7 @@ class HyperOptResolver(IResolver):
:param config: configuration dictionary
"""
if not config.get('hyperopt'):
raise OperationalException("No Hyperopt set. Please use `--customhyperopt` to specify "
raise OperationalException("No Hyperopt set. Please use `--hyperopt` to specify "
"the Hyperopt class to use.")
hyperopt_name = config['hyperopt']

View File

@ -73,7 +73,7 @@ def test_setup_hyperopt_configuration_without_arguments(mocker, default_conf, ca
args = [
'hyperopt',
'--config', 'config.json',
'--customhyperopt', 'DefaultHyperOpts',
'--hyperopt', 'DefaultHyperOpts',
]
config = setup_configuration(get_args(args), RunMode.HYPEROPT)
@ -105,7 +105,7 @@ def test_setup_hyperopt_configuration_with_arguments(mocker, default_conf, caplo
args = [
'hyperopt',
'--config', 'config.json',
'--customhyperopt', 'DefaultHyperOpts',
'--hyperopt', 'DefaultHyperOpts',
'--datadir', '/foo/bar',
'--ticker-interval', '1m',
'--timerange', ':100',
@ -181,7 +181,7 @@ def test_hyperoptresolver_wrongname(mocker, default_conf, caplog) -> None:
def test_hyperoptresolver_noname(default_conf):
default_conf['hyperopt'] = ''
with pytest.raises(OperationalException,
match="No Hyperopt set. Please use `--customhyperopt` to specify "
match="No Hyperopt set. Please use `--hyperopt` to specify "
"the Hyperopt class to use."):
HyperOptResolver(default_conf)
@ -214,7 +214,7 @@ def test_start_not_installed(mocker, default_conf, caplog, import_fails) -> None
args = [
'hyperopt',
'--config', 'config.json',
'--customhyperopt', 'DefaultHyperOpts',
'--hyperopt', 'DefaultHyperOpts',
'--epochs', '5'
]
args = get_args(args)
@ -232,7 +232,7 @@ def test_start(mocker, default_conf, caplog) -> None:
args = [
'hyperopt',
'--config', 'config.json',
'--customhyperopt', 'DefaultHyperOpts',
'--hyperopt', 'DefaultHyperOpts',
'--epochs', '5'
]
args = get_args(args)
@ -255,7 +255,7 @@ def test_start_no_data(mocker, default_conf, caplog) -> None:
args = [
'hyperopt',
'--config', 'config.json',
'--customhyperopt', 'DefaultHyperOpts',
'--hyperopt', 'DefaultHyperOpts',
'--epochs', '5'
]
args = get_args(args)
@ -273,7 +273,7 @@ def test_start_filelock(mocker, default_conf, caplog) -> None:
args = [
'hyperopt',
'--config', 'config.json',
'--customhyperopt', 'DefaultHyperOpts',
'--hyperopt', 'DefaultHyperOpts',
'--epochs', '5'
]
args = get_args(args)