• I understand that local setup here is quite challenging because of the need for mono, pythonnet and any of a number of other components. 
  • I also understand (after reading every related forum post) that you'd like us to just use CLI Jared Broad 😊 

That said, I simply can't run untested code managing real money. I need to be able to break aspects of the algo down into modules, and pytest them thoroughly. 

So I've been working on a devcontainer setup that hopefully others with the same needs could also use. Here it is:

To use this, just:

  1. Install the DevContainers extension from Microsoft in VSCode: https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers
  2. `git clone https://github.com/jeffdeville/qc_dev_containers`
  3. open the folder in vscode
  4. VSCode should ask if you want to reopen the folder in a container in a popup at bottom-right. Do that
  5. In an integrated terminal (you should be the root users in /workspaces/qc_dev_containers), run poetry install to install the dependencies. (Which you can see in pyproject.toml)
  6. Now, just run `python main.py`

The error is:

Traceback (most recent call last):
  File "main.py", line 1, in <module>
    from AlgorithmImports import Resolution
ImportError: cannot import name 'Resolution' from 'AlgorithmImports' (unknown location)

Now, pylance can see it and link to it. And my docker image has successfully installed python3.8, mono, and pythonnet. The dependencies are just quantconnect and friends.

So obviously, what I'd love is for someone to tell me how to fix it, or fork it to your github, fix it, and then make it available to the community.

But what could also help would be:

  • Any suggestions about alternative approaches? I see several Dockerfiles in the Lean project. Might one of those be a better starting point that would then be kept up to date more or less automatically?
  • My AlogorithmImports package is just a .pyi file that appears to be looking for .dlls in the same directory as the file I'm loading. Does this mean I need to compile the Lean projects, place the dlls with my code at runtime?