10 Commits

Author SHA1 Message Date
Jhonathan Abreu 962fcd6b58 Add exception interpreters for Python ModuleNotFoundError and multiple inheritance TypeError (#9643)
Research Regression Tests / build (push) Has been cancelled
Syntax Tests / build (push) Has been cancelled
Python Virtual Environments / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
API Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
Report Generator Tests / build (push) Has been cancelled
* Add interpreters for Python ModuleNotFoundError and multiple inheritance TypeError

* Recommend AlgorithmImports for missing C# namespaces, clr.AddReference only for local custom libraries

* Advise against importing .NET assemblies from Python algorithms, recommending equivalent Python packages

* Add the .NET assembly advice only when the missing module name is camel cased
2026-07-30 18:15:44 -03:00
Jhonathan Abreu feec818951 Fix method name parsing in NoMethodMatchPythonExceptionInterpreter (#9573)
The interpreter extracted the method name with LastIndexOf(" "), which
returned the last space-delimited token of the pythonnet message (a
fragment of the argument type list, e.g. "'QuantConnect.Resolution'>)")
instead of the actual method name. Parse the name from between the
"for " keyword and the following ":" instead.
2026-07-01 11:23:05 -04:00
Jhonathan Abreu 6bfe45dbcf PEP8 algorithms conversion (#7962)
* PEP8 algorithms conversion

* PEP8 unit tests algorithms conversion

* Minor fixes
2024-04-22 13:59:50 -03:00
Jhonathan Abreu 1df11c0c64 Add Pythonnet's ClrBubbledException interpreter (#7523)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
Python Virtual Environments / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
* Add ClrBubbleExceptionInterpreter

* Add ClrBubbledExceptionInterpreter tests

* Bump pythonnet version to 2.0.23

* Minor changes

* Minor change

* Minor fix

* Fix failing unit tests
2023-10-20 11:26:47 -03:00
Martin-Molinero 03f56481d4 Refactor python algorithm import (#5657)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
* Python research import improvements

- Improve start.py for research env
- Remove unrequired imports

* Centralize algorithm imports

* Add regression test GH action

* Unit test python import clean up

* Join research and main imports

* More python import clean up

* Fix failing skipped regression algorithm
2021-06-15 19:06:06 -03:00
Martin Molinero d9195317e3 C# decimal to Python conversion
- This commit is related to PR 19 in QC/pythonnet
   - C# decimal will be cast to C# double and converted into python
   float
- Adding new `decimal.py` into the python algorithm project. This is
required for backwards compatibility with users performing operations
over expected decimal types (like `Price`)
- Updating two python regression test algorithms using custom python
execution models to be aware and ignore floating point precision errors
when handling order sizing.
2019-01-15 12:13:42 -03:00
Stefano Raggi 5c9b81cef1 Fix Python initialization and imports for multiple tests 2018-10-02 20:28:13 +02:00
AlexCatarino 58603b1035 Fix method call name in python script 2018-08-07 19:31:22 +01:00
AlexCatarino cc1c643a78 Fixes NoMethodMatchPythonExceptionInterpreterTests
Changes the method call that should fail to `AddCash(String)`.
2018-08-07 19:22:41 +01:00
AlexCatarino 30263b2a51 Implements catch-all Python Exception Interpreter
Implements `PythonExceptionInterpreter` that works as a "catch-all" exception intrepreter for `PythonException`. Since it can interpret more specific python exceptions that are already covered by other interpreters, its `Order` is set to `int.MaxValue` to be the last to be tested.
2018-03-12 22:32:26 +00:00