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

Update QC Branch #47

Merged
merged 0 commits into from
Mar 9, 2021
Merged

Update QC Branch #47

merged 0 commits into from
Mar 9, 2021

Conversation

C-SELLERS
Copy link

@C-SELLERS C-SELLERS commented Feb 15, 2021

What does this implement/fix? Explain your changes.

Get QC PythonNet up to date with root repo.

Related to QuantConnect/Lean#452

To do this I needed to reflect a lot of our custom changes onto the root repo in order to keep QuantConnect functionality as desired.

QuantConnect Changes Reflected onto Root repo:

Patches to address failures in Lean:

  • MethodBinder changes to allow implicit conversion. This one was particularly tricky and seemed impossible to patch together with the MethodBinder.cs in the root. Unfortunately it involved tearing apart a lot of it and rebuilding only what was needed. It may be possible to refactor this to look more like the root and still pass our tests. ( 58d5df0 , 44e089a , 108eacf , 6379568 , 9f2796a )
  • Revert PythonNet PR Wrap returned objects in interface if method return type is interface pythonnet/pythonnet#1240 ; this PR broke fetching interface derived classes data members that weren't defined in the interface. ( ed6ab18 )
  • Converting PyObject to Int fix; this reflects the way PythonNet used to convert values to Int32, 64, unsigned etc, with PyNumber_Long but still keeps the use of Runtime.PyLong_AsSignedSize_t to finish the conversion. The bug that discovered this was trying to convert a Python float to int, this used to work but was failing until this refactor. Reference the added test in bd94e49. ( d87584b )

Tests added:

  • TimeDelta and DateTime Conversion Tests ( 508db2e )
  • List Conversion tests ( 5839d21 )
  • Dictionary Tests ( 101624e )
  • MethodBinder Tests ( bf1755d )
  • OperatorInequality Test ( b0aca5c )
  • PrimitiveIntConversion Test ( bd94e49 )
  • Interface Classes Test ( cd06d10 )

Some tests had to be adjusted for behavior changes caused by our commits. I have adjusted enough to have all PythonNet embedded tests passing, but there are still some issues with PyTests that need to be addressed/resolved.

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