An exception was being raised when configuring the data provider from the JSON modules. This was happening when a data provider was specified for the backtest command using the --data-provider option.
When the data provider environment is being configured from the JSON modules, the data provider configuration is picked up by JsonModule.get_configurations_env_values_from_name but LeanConfigConfigurer._configure_environment was not able to handle that type of configuration.
Two things were done:
JsonModule.get_configurations_env_values_from_name just gets the available environment from the JSON module configurations, which is always one and does not depend on a name.
LeanConfigConfigurer._configure_environment can just skip data providers instead of raising an exception.
Closes #401
Tested locally with the following:
Interactive Live Deploy.
Non Interactive Live Deploy.
Non Interactive Live Deploy using --environment option:
Having different environments in lean.json to make sure each one is used. For instance having "live-interactive" to deploy to IB and "live-interactive-polygon" (with Polygon as data queue handler and history provider) to deploy to IB using Polygon as data feed.
Backtesting and research specifing the data provider to use.
An exception was being raised when configuring the data provider from the JSON modules. This was happening when a data provider was specified for the
backtest
command using the--data-provider
option.When the data provider environment is being configured from the JSON modules, the data provider configuration is picked up by
JsonModule.get_configurations_env_values_from_name
butLeanConfigConfigurer._configure_environment
was not able to handle that type of configuration.Two things were done:
JsonModule.get_configurations_env_values_from_name
just gets the available environment from the JSON module configurations, which is always one and does not depend on a name.LeanConfigConfigurer._configure_environment
can just skip data providers instead of raising an exception.Closes #401
Tested locally with the following:
--environment
option:lean.json
to make sure each one is used. For instance having "live-interactive" to deploy to IB and "live-interactive-polygon" (with Polygon as data queue handler and history provider) to deploy to IB using Polygon as data feed.