Skip to content

Commit

Permalink
Dotnet 9
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin-Molinero committed Dec 12, 2024
1 parent 8febb9a commit 1e7a0de
Show file tree
Hide file tree
Showing 31 changed files with 41 additions and 45 deletions.
2 changes: 1 addition & 1 deletion Algorithm.CSharp/QuantConnect.Algorithm.CSharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<RootNamespace>QuantConnect.Algorithm.CSharp</RootNamespace>
<AssemblyName>QuantConnect.Algorithm.CSharp</AssemblyName>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<OutputPath>bin\$(Configuration)\</OutputPath>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<RootNamespace>QuantConnect.Algorithm.Framework</RootNamespace>
<AssemblyName>QuantConnect.Algorithm.Framework</AssemblyName>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<OutputPath>bin\$(Configuration)\</OutputPath>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
Expand Down
2 changes: 1 addition & 1 deletion Algorithm.Python/QuantConnect.Algorithm.Python.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<RootNamespace>QuantConnect.Algorithm.Python</RootNamespace>
<AssemblyName>QuantConnect.Algorithm.Python</AssemblyName>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
<OutputPath>bin\$(Configuration)\</OutputPath>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
Expand Down
2 changes: 1 addition & 1 deletion Algorithm/QuantConnect.Algorithm.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<RootNamespace>QuantConnect.Algorithm</RootNamespace>
<AssemblyName>QuantConnect.Algorithm</AssemblyName>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
Expand Down
2 changes: 1 addition & 1 deletion AlgorithmFactory/QuantConnect.AlgorithmFactory.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<RootNamespace>QuantConnect.AlgorithmFactory</RootNamespace>
<AssemblyName>QuantConnect.AlgorithmFactory</AssemblyName>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<OutputPath>bin\$(Configuration)\</OutputPath>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
Expand Down
2 changes: 1 addition & 1 deletion Api/QuantConnect.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<RootNamespace>QuantConnect.Api</RootNamespace>
<AssemblyName>QuantConnect.Api</AssemblyName>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<RestorePackages>true</RestorePackages>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
Expand Down
2 changes: 1 addition & 1 deletion Brokerages/QuantConnect.Brokerages.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<RootNamespace>QuantConnect.Brokerages</RootNamespace>
<AssemblyName>QuantConnect.Brokerages</AssemblyName>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<OutputPath>bin\$(Configuration)\</OutputPath>
Expand Down
1 change: 1 addition & 0 deletions Common/Brokerages/BybitBrokerageModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

using System;
using System.Collections.Generic;
using System.Linq;
using QuantConnect.Benchmarks;
using QuantConnect.Orders;
using QuantConnect.Orders.Fees;
Expand Down
2 changes: 1 addition & 1 deletion Common/QuantConnect.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<AssemblyName>QuantConnect.Common</AssemblyName>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<RestorePackages>true</RestorePackages>
Expand Down
12 changes: 0 additions & 12 deletions Common/Util/LinqExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,6 @@ namespace QuantConnect.Util
/// </summary>
public static class LinqExtensions
{
/// <summary>
/// Creates a dictionary enumerable of key value pairs
/// </summary>
/// <typeparam name="K">The key type</typeparam>
/// <typeparam name="V">The value type</typeparam>
/// <param name="enumerable">The IEnumerable of KeyValuePair instances to convert to a dictionary</param>
/// <returns>A dictionary holding the same data as the enumerable</returns>
public static Dictionary<K, V> ToDictionary<K, V>(this IEnumerable<KeyValuePair<K, V>> enumerable)
{
return enumerable.ToDictionary(kvp => kvp.Key, kvp => kvp.Value);
}

/// <summary>
/// Creates a new read-only dictionary from the key value pairs
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion Compression/QuantConnect.Compression.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<RootNamespace>QuantConnect.Compression</RootNamespace>
<AssemblyName>QuantConnect.Compression</AssemblyName>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<OutputPath>bin\$(Configuration)\</OutputPath>
Expand Down
2 changes: 1 addition & 1 deletion Configuration/QuantConnect.Configuration.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<RootNamespace>QuantConnect.Configuration</RootNamespace>
<AssemblyName>QuantConnect.Configuration</AssemblyName>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<RestorePackages>true</RestorePackages>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
Expand Down
3 changes: 0 additions & 3 deletions DockerfileJupyter
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ ENV PYTHONPATH=${WORK}:${PYTHONPATH}
RUN mkdir -p /root/.ipython/profile_default/startup/ && \
ln -s /Lean/Launcher/bin/Debug/start.py /root/.ipython/profile_default/startup/start.py

# conda libc is old and causes issues in research we want to use the hosts version which is updated
RUN mkdir -p /opt/miniconda3/lib/ && ln -vsf /lib/x86_64-linux-gnu/libstdc++.so.6 /opt/miniconda3/lib/libstdc++.so.6

RUN find ${WORK} -type f -not -name '*.py*' -not -name '*.xml' -not -name '*.exe.config' -not -name '*.exe' -not -name '*.so' -not -name '*.dll' -not -name '*.ipynb' -not -name '*.csx' -not -name 'QuantConnect.Lean.Launcher.runtimeconfig.json' -not -name 'decimal.py' -delete

# Create initialize script
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<OutputType>Exe</OutputType>
<RootNamespace>QuantConnect.DownloaderDataProvider.Launcher</RootNamespace>
<AssemblyName>QuantConnect.DownloaderDataProvider.Launcher</AssemblyName>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<OutputPath>bin\$(Configuration)\</OutputPath>
Expand Down
5 changes: 4 additions & 1 deletion Engine/DataFeeds/Enumerators/RefreshEnumerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ public bool MoveNext()
try
{
moveNext = _enumerator.MoveNext();
_current = _enumerator.Current;
if (moveNext || _current != null)
{
_current = _enumerator.Current;
}
}
catch (IOException exception)
{
Expand Down
2 changes: 1 addition & 1 deletion Engine/QuantConnect.Lean.Engine.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<RootNamespace>QuantConnect.Lean.Engine</RootNamespace>
<AssemblyName>QuantConnect.Lean.Engine</AssemblyName>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<RestorePackages>true</RestorePackages>
<PublishUrl>publish\</PublishUrl>
Expand Down
2 changes: 1 addition & 1 deletion Indicators/QuantConnect.Indicators.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<RootNamespace>QuantConnect.Indicators</RootNamespace>
<AssemblyName>QuantConnect.Indicators</AssemblyName>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<OutputPath>bin\$(Configuration)\</OutputPath>
Expand Down
2 changes: 1 addition & 1 deletion Launcher/QuantConnect.Lean.Launcher.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<OutputType>Exe</OutputType>
<RootNamespace>QuantConnect.Lean.Launcher</RootNamespace>
<AssemblyName>QuantConnect.Lean.Launcher</AssemblyName>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<OutputPath>bin\$(Configuration)\</OutputPath>
Expand Down
2 changes: 1 addition & 1 deletion Logging/QuantConnect.Logging.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<RootNamespace>QuantConnect.Logging</RootNamespace>
<AssemblyName>QuantConnect.Logging</AssemblyName>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<RestorePackages>true</RestorePackages>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
Expand Down
2 changes: 1 addition & 1 deletion Messaging/QuantConnect.Messaging.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<RootNamespace>QuantConnect.Messaging</RootNamespace>
<AssemblyName>QuantConnect.Messaging</AssemblyName>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<OutputPath>bin\$(Configuration)\</OutputPath>
Expand Down
2 changes: 1 addition & 1 deletion Optimizer.Launcher/QuantConnect.Optimizer.Launcher.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<OutputType>Exe</OutputType>
<RootNamespace>QuantConnect.Optimizer.Launcher</RootNamespace>
<AssemblyName>QuantConnect.Optimizer.Launcher</AssemblyName>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<OutputPath>bin\$(Configuration)\</OutputPath>
Expand Down
2 changes: 1 addition & 1 deletion Optimizer/QuantConnect.Optimizer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<RootNamespace>QuantConnect.Optimizer</RootNamespace>
<AssemblyName>QuantConnect.Optimizer</AssemblyName>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<OutputPath>bin\$(Configuration)\</OutputPath>
Expand Down
2 changes: 1 addition & 1 deletion Queues/QuantConnect.Queues.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<RootNamespace>QuantConnect.Queues</RootNamespace>
<AssemblyName>QuantConnect.Queues</AssemblyName>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<OutputPath>bin\$(Configuration)\</OutputPath>
<DocumentationFile>bin\$(Configuration)\QuantConnect.Queues.xml</DocumentationFile>
Expand Down
2 changes: 1 addition & 1 deletion Report/QuantConnect.Report.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<OutputType>Exe</OutputType>
<RootNamespace>QuantConnect.Report</RootNamespace>
<AssemblyName>QuantConnect.Report</AssemblyName>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<OutputPath>bin\$(Configuration)\</OutputPath>
Expand Down
2 changes: 1 addition & 1 deletion Research/QuantConnect.Research.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<RootNamespace>QuantConnect.Research</RootNamespace>
<AssemblyName>QuantConnect.Research</AssemblyName>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
<OutputPath>bin\$(Configuration)\</OutputPath>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
Expand Down
2 changes: 1 addition & 1 deletion Tests/Indicators/PythonIndicatorNoinheritanceTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ protected override void RunTestIndicator(IndicatorBase<IBaseData> indicator)
}
if (closeIndex * targetIndex < 0)
{
Assert.Fail($"Didn't find one of 'Close' or '{line}' in the header: ", TestColumnName);
Assert.Fail($"Didn't find one of 'Close' or '{TestColumnName}' in the header: {line}");
}

continue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ protected override void RunTestIndicator(IndicatorBase<IBaseData> indicator)
}
if (closeIndex * targetIndex < 0)
{
Assert.Fail($"Didn't find one of 'Close' or '{line}' in the header: ", TestColumnName);
Assert.Fail($"Didn't find one of 'Close' or '{TestColumnName}' in the header: {line}");
}

continue;
Expand Down
2 changes: 1 addition & 1 deletion Tests/Indicators/PythonIndicatorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ protected override void RunTestIndicator(IndicatorBase<IBaseData> indicator)
}
if (closeIndex * targetIndex < 0)
{
Assert.Fail($"Didn't find one of 'Close' or '{line}' in the header: ", TestColumnName);
Assert.Fail($"Didn't find one of 'Close' or '{TestColumnName}' in the header: {line}");
}

continue;
Expand Down
2 changes: 1 addition & 1 deletion Tests/Indicators/TestHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public static void TestIndicator(IndicatorBase<IndicatorDataPoint> indicator, st
{
if (!(parts.ContainsKey("Close") && parts.ContainsKey(targetColumn)))
{
Assert.Fail("Didn't find one of 'Close' or '{0}' in the header.", targetColumn);
Assert.Fail($"Didn't find one of 'Close' or '{targetColumn}' in the header.");
break;
}

Expand Down
13 changes: 10 additions & 3 deletions Tests/QuantConnect.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<RootNamespace>QuantConnect.Tests</RootNamespace>
<AssemblyName>QuantConnect.Tests</AssemblyName>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
Expand Down Expand Up @@ -45,13 +45,20 @@
<PackageReference Include="NetMQ" Version="4.0.1.6" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
<PackageReference Include="NodaTime" Version="3.0.5" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1">
<PackageReference Include="NUnit" Version="4.2.2" />
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="protobuf-net" Version="3.1.33" />
<PackageReference Include="RestSharp" Version="106.12.0" />
</ItemGroup>
<ItemGroup>
<Using Include="NUnit.Framework.Legacy.ClassicAssert" Alias="Assert" />
<Using Include="NUnit.Framework.Legacy.CollectionAssert" Alias="CollectionAssert" />
<Using Include="NUnit.Framework.Legacy.StringAssert" Alias="StringAssert" />
<Using Include="NUnit.Framework.Legacy.DirectoryAssert" Alias="DirectoryAssert" />
<Using Include="NUnit.Framework.Legacy.FileAssert" Alias="FileAssert" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\Common\Properties\SharedAssemblyInfo.cs" Link="Properties\SharedAssemblyInfo.cs" />
<Content Include="Research\RegressionScripts\Test_QuantBookIndicator.py">
Expand Down
2 changes: 1 addition & 1 deletion ToolBox/QuantConnect.ToolBox.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<OutputType>Exe</OutputType>
<RootNamespace>QuantConnect.ToolBox</RootNamespace>
<AssemblyName>QuantConnect.ToolBox</AssemblyName>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<OutputPath>bin\$(Configuration)\</OutputPath>
Expand Down

0 comments on commit 1e7a0de

Please sign in to comment.