Adds Custom ToString Method to API Classes
Expected Behavior
Be able to visualize the results from API calls with ToString method. It's particularly helpful in Jupyter Notebooks.
Actual Behavior
The string representation looks like this:
<QuantConnect.Api.Compile object at 0x7f7082330978>
Potential Solution
Implement Custom ToString
Checklist
- [x] I have completely filled out this template
- [x] I have confirmed that this issue exists on the current
masterbranch - [x] I have confirmed that this is not a duplicate issue by searching issues
Hi, can I take it ?
Hey @MaxTube-dot! yes please go ahead, suggest just implementing one at the time with it's unit test 👍
Hi @AlexCatarino, do you mean ToString Method should be added to this document below?
https://github.com/QuantConnect/Lean/blob/master/Api/Api.cs
What steps did you go through to get the message
<QuantConnect.Api.Compile object at 0x7f7082330978>
Hey @jfweonc!
The ToString methods should be added for the objects returned by the Api methods, can see them at https://github.com/QuantConnect/Lean/tree/master/Common/Api.
Suggest taking them one at the time.
What steps did you go through to get the message <QuantConnect.Api.Compile object at 0x7f7082330978>
This is just the default to string implementation that python takes from a C# class. If ToString was implemented it would use it instead