Merge pull request #2377 from freqtrade/aligncustomoptions

Rename --custom-hyperopt to --hyperopt
This commit is contained in:
hroff-1902 2019-10-15 14:18:05 +03:00 committed by GitHub
commit cb4d6efb29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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

@ -267,7 +267,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]
@ -285,7 +285,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

@ -157,7 +157,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)