Rename --custom-hyperopt to --hyperopt
This commit is contained in:
		| @@ -32,7 +32,7 @@ jobs: | |||||||
|       name: backtest |       name: backtest | ||||||
|     - script: |     - script: | ||||||
|       - cp config.json.example config.json |       - 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 |       name: hyperopt | ||||||
|     - script: flake8 |     - script: flake8 | ||||||
|       name: flake8 |       name: flake8 | ||||||
|   | |||||||
| @@ -266,7 +266,7 @@ usage: freqtrade hyperopt [-h] [-v] [--logfile FILE] [-V] [-c PATH] [-d PATH] | |||||||
|                           [-i TICKER_INTERVAL] [--timerange TIMERANGE] |                           [-i TICKER_INTERVAL] [--timerange TIMERANGE] | ||||||
|                           [--max_open_trades INT] |                           [--max_open_trades INT] | ||||||
|                           [--stake_amount STAKE_AMOUNT] |                           [--stake_amount STAKE_AMOUNT] | ||||||
|                           [--customhyperopt NAME] [--hyperopt-path PATH] |                           [--hyperopt NAME] [--hyperopt-path PATH] | ||||||
|                           [--eps] [-e INT] |                           [--eps] [-e INT] | ||||||
|                           [--spaces {all,buy,sell,roi,stoploss} [{all,buy,sell,roi,stoploss} ...]] |                           [--spaces {all,buy,sell,roi,stoploss} [{all,buy,sell,roi,stoploss} ...]] | ||||||
|                           [--dmmp] [--print-all] [--no-color] [--print-json] |                           [--dmmp] [--print-all] [--no-color] [--print-json] | ||||||
| @@ -284,7 +284,7 @@ optional arguments: | |||||||
|                         Specify max_open_trades to use. |                         Specify max_open_trades to use. | ||||||
|   --stake_amount STAKE_AMOUNT |   --stake_amount STAKE_AMOUNT | ||||||
|                         Specify stake_amount. |                         Specify stake_amount. | ||||||
|   --customhyperopt NAME |   --hyperopt NAME | ||||||
|                         Specify hyperopt class name which will be used by the |                         Specify hyperopt class name which will be used by the | ||||||
|                         bot. |                         bot. | ||||||
|   --hyperopt-path PATH  Specify additional lookup path for Hyperopts and |   --hyperopt-path PATH  Specify additional lookup path for Hyperopts and | ||||||
|   | |||||||
| @@ -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. | We strongly recommend to use `screen` or `tmux` to prevent any connection loss. | ||||||
|  |  | ||||||
| ```bash | ```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. | Use  `<hyperoptname>` as the name of the custom hyperopt used. | ||||||
|   | |||||||
| @@ -152,7 +152,7 @@ AVAILABLE_CLI_OPTIONS = { | |||||||
|     ), |     ), | ||||||
|     # Hyperopt |     # Hyperopt | ||||||
|     "hyperopt": Arg( |     "hyperopt": Arg( | ||||||
|         '--customhyperopt', |         '--hyperopt', | ||||||
|         help='Specify hyperopt class name which will be used by the bot.', |         help='Specify hyperopt class name which will be used by the bot.', | ||||||
|         metavar='NAME', |         metavar='NAME', | ||||||
|     ), |     ), | ||||||
|   | |||||||
| @@ -28,7 +28,7 @@ class HyperOptResolver(IResolver): | |||||||
|         :param config: configuration dictionary |         :param config: configuration dictionary | ||||||
|         """ |         """ | ||||||
|         if not config.get('hyperopt'): |         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.") |                                        "the Hyperopt class to use.") | ||||||
|  |  | ||||||
|         hyperopt_name = config['hyperopt'] |         hyperopt_name = config['hyperopt'] | ||||||
|   | |||||||
| @@ -73,7 +73,7 @@ def test_setup_hyperopt_configuration_without_arguments(mocker, default_conf, ca | |||||||
|     args = [ |     args = [ | ||||||
|         'hyperopt', |         'hyperopt', | ||||||
|         '--config', 'config.json', |         '--config', 'config.json', | ||||||
|         '--customhyperopt', 'DefaultHyperOpts', |         '--hyperopt', 'DefaultHyperOpts', | ||||||
|     ] |     ] | ||||||
|  |  | ||||||
|     config = setup_configuration(get_args(args), RunMode.HYPEROPT) |     config = setup_configuration(get_args(args), RunMode.HYPEROPT) | ||||||
| @@ -105,7 +105,7 @@ def test_setup_hyperopt_configuration_with_arguments(mocker, default_conf, caplo | |||||||
|     args = [ |     args = [ | ||||||
|         'hyperopt', |         'hyperopt', | ||||||
|         '--config', 'config.json', |         '--config', 'config.json', | ||||||
|         '--customhyperopt', 'DefaultHyperOpts', |         '--hyperopt', 'DefaultHyperOpts', | ||||||
|         '--datadir', '/foo/bar', |         '--datadir', '/foo/bar', | ||||||
|         '--ticker-interval', '1m', |         '--ticker-interval', '1m', | ||||||
|         '--timerange', ':100', |         '--timerange', ':100', | ||||||
| @@ -181,7 +181,7 @@ def test_hyperoptresolver_wrongname(mocker, default_conf, caplog) -> None: | |||||||
| def test_hyperoptresolver_noname(default_conf): | def test_hyperoptresolver_noname(default_conf): | ||||||
|     default_conf['hyperopt'] = '' |     default_conf['hyperopt'] = '' | ||||||
|     with pytest.raises(OperationalException, |     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."): |                              "the Hyperopt class to use."): | ||||||
|         HyperOptResolver(default_conf) |         HyperOptResolver(default_conf) | ||||||
|  |  | ||||||
| @@ -214,7 +214,7 @@ def test_start_not_installed(mocker, default_conf, caplog, import_fails) -> None | |||||||
|     args = [ |     args = [ | ||||||
|         'hyperopt', |         'hyperopt', | ||||||
|         '--config', 'config.json', |         '--config', 'config.json', | ||||||
|         '--customhyperopt', 'DefaultHyperOpts', |         '--hyperopt', 'DefaultHyperOpts', | ||||||
|         '--epochs', '5' |         '--epochs', '5' | ||||||
|     ] |     ] | ||||||
|     args = get_args(args) |     args = get_args(args) | ||||||
| @@ -232,7 +232,7 @@ def test_start(mocker, default_conf, caplog) -> None: | |||||||
|     args = [ |     args = [ | ||||||
|         'hyperopt', |         'hyperopt', | ||||||
|         '--config', 'config.json', |         '--config', 'config.json', | ||||||
|         '--customhyperopt', 'DefaultHyperOpts', |         '--hyperopt', 'DefaultHyperOpts', | ||||||
|         '--epochs', '5' |         '--epochs', '5' | ||||||
|     ] |     ] | ||||||
|     args = get_args(args) |     args = get_args(args) | ||||||
| @@ -255,7 +255,7 @@ def test_start_no_data(mocker, default_conf, caplog) -> None: | |||||||
|     args = [ |     args = [ | ||||||
|         'hyperopt', |         'hyperopt', | ||||||
|         '--config', 'config.json', |         '--config', 'config.json', | ||||||
|         '--customhyperopt', 'DefaultHyperOpts', |         '--hyperopt', 'DefaultHyperOpts', | ||||||
|         '--epochs', '5' |         '--epochs', '5' | ||||||
|     ] |     ] | ||||||
|     args = get_args(args) |     args = get_args(args) | ||||||
| @@ -273,7 +273,7 @@ def test_start_filelock(mocker, default_conf, caplog) -> None: | |||||||
|     args = [ |     args = [ | ||||||
|         'hyperopt', |         'hyperopt', | ||||||
|         '--config', 'config.json', |         '--config', 'config.json', | ||||||
|         '--customhyperopt', 'DefaultHyperOpts', |         '--hyperopt', 'DefaultHyperOpts', | ||||||
|         '--epochs', '5' |         '--epochs', '5' | ||||||
|     ] |     ] | ||||||
|     args = get_args(args) |     args = get_args(args) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user