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

Fix type assignment in StrategyFactory for ImportableStrategyConfig #1470

Merged
merged 2 commits into from
Jan 25, 2024

Conversation

rsmb7z
Copy link
Collaborator

@rsmb7z rsmb7z commented Jan 25, 2024

Pull Request

This PR addresses a typing inconsistency observed in the ImportableStrategyConfig, a subclass of NautilusConfig. The core functionality expected from these configurations is the ability to be stored and parsed as JSON/YAML files. However, it was identified that while loading the strategy configurations as part of ImportableStrategyConfig, they were not receiving the correct type assignments.

To resolve this issue, the PR implements a fix ensuring that the strategy configuration is correctly parsed with appropriate types when creating strategies using StrategyFactory. This enhancement aligns ImportableStrategyConfig with the intended design of being fully compatible and operable with JSON/YAML file formats, thereby improving reliability and consistency in configuration handling.

Type of change

Delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How has this change been tested?

Included the test.

@cjdsellers
Copy link
Member

Hi @rsmb7z thanks for this!

Looks like the underlying issue for the test failures is something to do with:

Object of type InstrumentId is not JSON serializable

@cjdsellers cjdsellers merged commit ad11851 into nautechsystems:develop Jan 25, 2024
11 checks passed
@rsmb7z rsmb7z deleted the pr_240125 branch April 11, 2024 11:19
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.

2 participants