Skip to content

Commit

Permalink
Adds SharedAssemblyInfo to common
Browse files Browse the repository at this point in the history
This allows all projects to use the same version number which is used to see if jobs are the same version as the node to process them
  • Loading branch information
mchandschuh committed Apr 28, 2015
1 parent c1b62d8 commit 6fdca88
Show file tree
Hide file tree
Showing 31 changed files with 183 additions and 144 deletions.
19 changes: 9 additions & 10 deletions Algorithm/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("QuantConnect.Server.Algorithm")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("QuantConnect.Server.Algorithm")]
[assembly: AssemblyCopyright("Copyright © 2012")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyTitle("QuantConnect.Algorithm")]
//[assembly: AssemblyDescription("")]
//[assembly: AssemblyConfiguration("")]
//[assembly: AssemblyCompany("")]
//[assembly: AssemblyProduct("QuantConnect.Algorithm")]
//[assembly: AssemblyCopyright("Copyright © 2015")]
//[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
Expand All @@ -32,5 +31,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
//[assembly: AssemblyVersion("1.0.0.0")]
//[assembly: AssemblyFileVersion("1.0.0.0")]
3 changes: 3 additions & 0 deletions Algorithm/QuantConnect.Algorithm.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@
<Reference Include="System.Numerics" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\Common\Properties\SharedAssemblyInfo.cs">
<Link>Properties\SharedAssemblyInfo.cs</Link>
</Compile>
<Compile Include="Examples\BenchmarkAlgorithm.cs" />
<Compile Include="Examples\BubbleAlgorithm.cs" />
<Compile Include="Examples\DividendAlgorithm.cs" />
Expand Down
19 changes: 9 additions & 10 deletions AlgorithmFactory/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Loader")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Loader")]
[assembly: AssemblyCopyright("Copyright © 2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyTitle("QuantConnect.AlgorithmFactory")]
//[assembly: AssemblyDescription("")]
//[assembly: AssemblyConfiguration("")]
//[assembly: AssemblyCompany("")]
//[assembly: AssemblyProduct("Loader")]
//[assembly: AssemblyCopyright("Copyright © 2015")]
//[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
Expand All @@ -32,5 +31,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
//[assembly: AssemblyVersion("1.0.0.0")]
//[assembly: AssemblyFileVersion("1.0.0.0")]
3 changes: 3 additions & 0 deletions AlgorithmFactory/QuantConnect.AlgorithmFactory.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\Common\Properties\SharedAssemblyInfo.cs">
<Link>Properties\SharedAssemblyInfo.cs</Link>
</Compile>
<Compile Include="Loader.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
Expand Down
19 changes: 9 additions & 10 deletions Api/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("QuantConnect.API")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("QuantConnect.API")]
[assembly: AssemblyCopyright("Copyright © 2013")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyTitle("QuantConnect.Api")]
//[assembly: AssemblyDescription("")]
//[assembly: AssemblyConfiguration("")]
//[assembly: AssemblyCompany("")]
//[assembly: AssemblyProduct("QuantConnect.Api")]
//[assembly: AssemblyCopyright("Copyright © 2015")]
//[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
Expand All @@ -32,5 +31,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
//[assembly: AssemblyVersion("1.0.0.0")]
//[assembly: AssemblyFileVersion("1.0.0.0")]
3 changes: 3 additions & 0 deletions Api/QuantConnect.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\Common\Properties\SharedAssemblyInfo.cs">
<Link>Properties\SharedAssemblyInfo.cs</Link>
</Compile>
<Compile Include="Api.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
Expand Down
19 changes: 9 additions & 10 deletions Brokerages/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Brokerages")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Brokerages")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyTitle("QuantConnect.Brokerages")]
//[assembly: AssemblyDescription("")]
//[assembly: AssemblyConfiguration("")]
//[assembly: AssemblyCompany("")]
//[assembly: AssemblyProduct("QuantConnect.Brokerages")]
//[assembly: AssemblyCopyright("Copyright © 2015")]
//[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
Expand All @@ -32,5 +31,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
//[assembly: AssemblyVersion("1.0.0.0")]
//[assembly: AssemblyFileVersion("1.0.0.0")]
3 changes: 3 additions & 0 deletions Brokerages/QuantConnect.Brokerages.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\Common\Properties\SharedAssemblyInfo.cs">
<Link>Properties\SharedAssemblyInfo.cs</Link>
</Compile>
<Compile Include="Backtesting\BacktestingBrokerage.cs" />
<Compile Include="Backtesting\BacktestingBrokerageFactory.cs" />
<Compile Include="Brokerage.cs" />
Expand Down
5 changes: 2 additions & 3 deletions Common/Packets/AlgorithmNodePacket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ public string AlgorithmId
/// <summary>
/// Version number identifier for the lean engine.
/// </summary>
[JsonProperty(PropertyName = "dtVersion")]
public DateTime Version;
[JsonProperty(PropertyName = "sVersion")]
public string Version;

/// <summary>
/// An algorithm packet which has already been run and is being redelivered on this node.
Expand Down Expand Up @@ -152,7 +152,6 @@ public string AlgorithmId
/// </summary>
[JsonProperty(PropertyName = "eRealTimeEndpoint")]
public RealTimeEndpoint RealTimeEndpoint = RealTimeEndpoint.Backtesting;

} // End Node Packet:

} // End of Namespace:
19 changes: 9 additions & 10 deletions Common/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("qc.common")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("qc.common")]
[assembly: AssemblyCopyright("Copyright © 2012")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyTitle("QuantConnect.Common")]
//[assembly: AssemblyDescription("")]
//[assembly: AssemblyConfiguration("")]
//[assembly: AssemblyCompany("")]
//[assembly: AssemblyProduct("QuantConnect.Common")]
//[assembly: AssemblyCopyright("Copyright © 2015")]
//[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
Expand All @@ -32,5 +31,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
//[assembly: AssemblyVersion("1.0.0.0")]
//[assembly: AssemblyFileVersion("1.0.0.0")]
13 changes: 13 additions & 0 deletions Common/Properties/SharedAssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using System.Reflection;

// common assembly attributes
[assembly: AssemblyDescription("Part of the QuantConnect product.")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyCompany("QuantConnect")]
[assembly: AssemblyTrademark("QuantConnect")]
[assembly: AssemblyVersion("2.1.0.1")]
#if DEBUG
[assembly: AssemblyConfiguration("Debug")]
#else
[assembly: AssemblyConfiguration("Release")]
#endif
1 change: 1 addition & 0 deletions Common/QuantConnect.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@
<Compile Include="Orders\OrderTypes.cs" />
<Compile Include="Orders\OrderError.cs" />
<Compile Include="Packets\HandledErrorPacket.cs" />
<Compile Include="Properties\SharedAssemblyInfo.cs" />
<Compile Include="Securities\Cash.cs" />
<Compile Include="Securities\CashBook.cs" />
<Compile Include="Securities\Equity\EquityMarginModel.cs" />
Expand Down
19 changes: 9 additions & 10 deletions Compression/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Compression")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Compression")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyTitle("QuantConnect.Compression")]
//[assembly: AssemblyDescription("")]
//[assembly: AssemblyConfiguration("")]
//[assembly: AssemblyCompany("")]
//[assembly: AssemblyProduct("QuantConnect.Compression")]
//[assembly: AssemblyCopyright("Copyright © 2015")]
//[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
Expand All @@ -32,5 +31,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
//[assembly: AssemblyVersion("1.0.0.0")]
//[assembly: AssemblyFileVersion("1.0.0.0")]
3 changes: 3 additions & 0 deletions Compression/QuantConnect.Compression.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\Common\Properties\SharedAssemblyInfo.cs">
<Link>Properties\SharedAssemblyInfo.cs</Link>
</Compile>
<Compile Include="Compression.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
Expand Down
19 changes: 9 additions & 10 deletions Configuration/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("QuantConnect.Config")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("QuantConnect.Config")]
[assembly: AssemblyCopyright("Copyright © 2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyTitle("QuantConnect.Configuration")]
//[assembly: AssemblyDescription("")]
//[assembly: AssemblyConfiguration("")]
//[assembly: AssemblyCompany("")]
//[assembly: AssemblyProduct("QuantConnect.Configuration")]
//[assembly: AssemblyCopyright("Copyright © 2014")]
//[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
Expand All @@ -32,5 +31,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
//[assembly: AssemblyVersion("1.0.0.0")]
//[assembly: AssemblyFileVersion("1.0.0.0")]
3 changes: 3 additions & 0 deletions Configuration/QuantConnect.Configuration.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\Common\Properties\SharedAssemblyInfo.cs">
<Link>Properties\SharedAssemblyInfo.cs</Link>
</Compile>
<Compile Include="Config.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
Expand Down
7 changes: 3 additions & 4 deletions Engine/Engine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public class Engine
*********************************************************/
private static bool _liveMode = Config.GetBool("live-mode");
private static bool _local = Config.GetBool("local");
private static DateTime _version;
private static readonly string _version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
private static IBrokerage _brokerage;
private const string _collapseMessage = "Unhandled exception breaking past controls and causing collapse of algorithm node. This is likely a memory leak of an external dependency or the underlying OS terminating the LEAN engine.";

Expand Down Expand Up @@ -119,7 +119,7 @@ public static IBrokerage Brokerage
/// Version of the engine that is running. This is required for retiring old processing
/// and live trading nodes during live trading.
/// </summary>
public static DateTime Version
public static string Version
{
get { return _version; }
}
Expand Down Expand Up @@ -188,7 +188,6 @@ public static void Main(string[] args)
var algorithm = default(IAlgorithm);
var startTime = DateTime.Now;
Log.LogHandler = Composer.Instance.GetExportedValueByTypeName<ILogHandler>(Config.Get("log-handler", "CompositeLogHandler"));
_version = DateTime.ParseExact(Config.Get("version", DateTime.Now.ToString(DateFormat.UI)), DateFormat.UI, CultureInfo.InvariantCulture);

#if DEBUG
mode = "DEBUG";
Expand Down Expand Up @@ -240,7 +239,7 @@ public static void Main(string[] args)
//-> Pull job from QuantConnect job queue, or, pull local build:
job = JobQueue.NextJob(out algorithmPath); // Blocking.

if (!IsLocal && LiveMode && (job.Version < Version || (job.Version == Version && job.Redelivered)))
if (!IsLocal && LiveMode && (job.Version != Version || (job.Version == Version && job.Redelivered)))
{
//Tiny chance there was an uncontrolled collapse of a server, resulting in an old user task circulating.
//In this event kill the old algorithm and leave a message so the user can later review.
Expand Down
18 changes: 9 additions & 9 deletions Engine/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("QuantConnect.Server.Algorithm.Worker")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("QuantConnect.Server.Algorithm.Worker")]
[assembly: AssemblyCopyright("Copyright © 2012")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyTitle("QuantConnect.Lean.Engine")]
//[assembly: AssemblyDescription("")]
//[assembly: AssemblyConfiguration("")]
//[assembly: AssemblyCompany("")]
//[assembly: AssemblyProduct("QuantConnect.Lean.Engine")]
//[assembly: AssemblyCopyright("Copyright © 2012")]
//[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
Expand All @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
//[assembly: AssemblyVersion("1.0.0.0")]
//[assembly: AssemblyFileVersion("1.0.0.0")]
Loading

0 comments on commit 6fdca88

Please sign in to comment.