QuantConnect / Documentation

QuantConnect Wiki Style Documentation Behind QuantConnect
https://www.quantconnect.com/docs/v2/
Apache License 2.0
171 stars 135 forks source link

Creating Alternative Data Using Python CLRImports #1554

Closed DerekMelchin closed 4 months ago

DerekMelchin commented 9 months ago

Expected Behavior

This code snippet

map_file_provider = LocalZipMapFileProvider()
map_file_provider.Initialize(DefaultDataProvider())

includes from CLRImports import *

The script should run in the bin folder where we compile the files

Console.WriteLine("This data processor uses the Python script process.py");



#### Actual Behavior
<!--- Required. Describe the actual behavior for your case. -->
The code snippet doesn't work as-is

#### Checklist
<!--- Confirm that you've provided all the required information. -->
<!--- Required fields --->
- [x] I have completely filled out this template
- [x] I have confirmed that this issue exists on the current `master` branch
- [x] I have confirmed that this is not a duplicate issue by searching [issues](https://github.com/QuantConnect/Lean/issues)
<!--- Template inspired by https://github.com/stevemao/github-issue-templates -->
AlexCatarino commented 8 months ago

Most of these topics have been addressed.

is already covered by

In the Lean.DataSource. / DataProcessing / Program.cs file, remove the statements of the Main method

The only step missing is:

It should be step 12, because after we create the script, we got to bin, copy the script and run:

cd bin\Debug\net6.0\
cp ..\..\..\process.py .
python process.py