Skip to content

Commit

Permalink
Merge pull request #8 from jhonabreul/refactor-normalize-namespaces
Browse files Browse the repository at this point in the history
Normalize namespace to match all other Lean brokerages
  • Loading branch information
jhonabreul authored Feb 29, 2024
2 parents d6b409b + 33e47fc commit 28e7c16
Show file tree
Hide file tree
Showing 24 changed files with 45 additions and 48 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/gh-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ jobs:
run: dotnet build /p:Configuration=Release /v:quiet /p:WarningLevel=1 QuantConnect.RBI.sln

- name: Run Tests
run: dotnet test ./QuantConnect.RBI.Tests/bin/Release/QuantConnect.RBI.Tests.dll
run: dotnet test ./QuantConnect.RBI.Tests/bin/Release/QuantConnect.Brokerages.RBI.Tests.dll
7 changes: 4 additions & 3 deletions QuantConnect.RBI.Tests/QuantConnect.RBI.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@
<Copyright>Copyright © 2021</Copyright>
<TestProjectType>UnitTest</TestProjectType>
<OutputPath>bin\$(Configuration)\</OutputPath>
<Product>QuantConnect.RBI.Tests</Product>
<RootNamespace>QuantConnect.RBI.Tests</RootNamespace>
<AssemblyTitle>QuantConnect.RBI.Tests</AssemblyTitle>
<Product>QuantConnect.Brokerages.RBI.Tests</Product>
<RootNamespace>QuantConnect.Brokerages.RBI.Tests</RootNamespace>
<AssemblyTitle>QuantConnect.Brokerages.RBI.Tests</AssemblyTitle>
<AssemblyName>QuantConnect.Brokerages.RBI.Tests</AssemblyName>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion QuantConnect.RBI.Tests/RBIBrokerageFactoryTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
using QuantConnect.Interfaces;
using QuantConnect.Util;

namespace QuantConnect.RBI.Tests
namespace QuantConnect.Brokerages.RBI.Tests
{
[TestFixture]
public class RBIBrokerageFactoryTests
Expand Down
2 changes: 1 addition & 1 deletion QuantConnect.RBI.Tests/RBIBrokerageSymbolMapperTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
using NUnit.Framework;
using QuantConnect.Tests;

namespace QuantConnect.RBI.Tests
namespace QuantConnect.Brokerages.RBI.Tests
{
[TestFixture]
public class RBIBrokerageSymbolMapperTests
Expand Down
4 changes: 2 additions & 2 deletions QuantConnect.RBI.Tests/RBIBrokerageTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
using QuantConnect.Tests;
using QuantConnect.Orders;
using QuantConnect.Packets;
using QuantConnect.RBI.Fix;
using QuantConnect.Brokerages.RBI.Fix;
using QuantConnect.Tests.Brokerages;

namespace QuantConnect.RBI.Tests
namespace QuantConnect.Brokerages.RBI.Tests
{
[TestFixture]
[Ignore("Requires valid config.json")]
Expand Down
2 changes: 1 addition & 1 deletion QuantConnect.RBI.Tests/TestSetup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
using QuantConnect.Configuration;
using QuantConnect.Tests;

namespace QuantConnect.RBI.Tests
namespace QuantConnect.Brokerages.RBI.Tests
{
[TestFixture]
public class TestSetup
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
* limitations under the License.
*/

using QuantConnect.RBI.Fix.Connection.Interfaces;
using QuantConnect.Brokerages.RBI.Fix.Connection.Interfaces;
using QuickFix;

namespace QuantConnect.RBI.Fix.Connection.Implementations;
namespace QuantConnect.Brokerages.RBI.Fix.Connection.Implementations;

public class RBIFixConnection : IRBIFixConnection
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

using QuickFix;

namespace QuantConnect.RBI.Fix.Connection.Interfaces;
namespace QuantConnect.Brokerages.RBI.Fix.Connection.Interfaces;

public interface IRBIFixConnection
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@

using System.Collections.Concurrent;
using QuantConnect.Orders;
using QuantConnect.RBI.Fix.Core.Interfaces;
using QuantConnect.Brokerages.RBI.Fix.Core.Interfaces;
using QuickFix.Fields;
using QuickFix.FIX42;

namespace QuantConnect.RBI.Fix.Core.Implementations;
namespace QuantConnect.Brokerages.RBI.Fix.Core.Implementations;

public class FixBrokerageController : IFixBrokerageController
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@

using System.Collections.Concurrent;
using QuantConnect.Orders;
using QuantConnect.RBI.Fix.Connection.Implementations;
using QuantConnect.RBI.Fix.Core.Interfaces;
using QuantConnect.RBI.Fix.Utils;
using QuantConnect.Brokerages.RBI.Fix.Connection.Implementations;
using QuantConnect.Brokerages.RBI.Fix.Core.Interfaces;
using QuantConnect.Brokerages.RBI.Fix.Utils;
using QuantConnect.Securities;
using QuantConnect.Util;
using QuickFix;
Expand All @@ -26,7 +26,7 @@
using Log = QuantConnect.Logging.Log;
using Message = QuickFix.Message;

namespace QuantConnect.RBI.Fix.Core.Implementations;
namespace QuantConnect.Brokerages.RBI.Fix.Core.Implementations;

public class FixMessageHandler : MessageCracker, IFixMessageHandler
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
using System.Globalization;
using QuantConnect.Logging;
using QuantConnect.Orders;
using QuantConnect.RBI.Fix.Connection.Interfaces;
using QuantConnect.RBI.Fix.Core.Interfaces;
using QuantConnect.RBI.Fix.Utils;
using QuantConnect.Brokerages.RBI.Fix.Connection.Interfaces;
using QuantConnect.Brokerages.RBI.Fix.Core.Interfaces;
using QuantConnect.Brokerages.RBI.Fix.Utils;
using QuantConnect.Securities;
using QuickFix.Fields;
using QuickFix.FIX42;

namespace QuantConnect.RBI.Fix.Core.Implementations;
namespace QuantConnect.Brokerages.RBI.Fix.Core.Implementations;

public class FixSymbolController : IFixSymbolController
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
using QuickFix.FIX42;
using QuantConnect.Orders;

namespace QuantConnect.RBI.Fix.Core.Interfaces;
namespace QuantConnect.Brokerages.RBI.Fix.Core.Interfaces;

public interface IFixBrokerageController
{
Expand Down
2 changes: 1 addition & 1 deletion QuantConnect.RBI/Fix/Core/Interfaces/IFixMessageHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
using QuickFix.FIX42;
using Message = QuickFix.Message;

namespace QuantConnect.RBI.Fix.Core.Interfaces;
namespace QuantConnect.Brokerages.RBI.Fix.Core.Interfaces;

public interface IFixMessageHandler
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

using QuantConnect.Orders;

namespace QuantConnect.RBI.Fix.Core.Interfaces;
namespace QuantConnect.Brokerages.RBI.Fix.Core.Interfaces;

public interface IFixSymbolController
{
Expand Down
2 changes: 1 addition & 1 deletion QuantConnect.RBI/Fix/FixConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
using QuantConnect.Configuration;
using QuickFix;

namespace QuantConnect.RBI.Fix;
namespace QuantConnect.Brokerages.RBI.Fix;

public class FixConfiguration
{
Expand Down
2 changes: 1 addition & 1 deletion QuantConnect.RBI/Fix/FixError.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace QuantConnect.RBI.Fix;
namespace QuantConnect.Brokerages.RBI.Fix;

/// <summary>
/// Class is used to return error message from FIX protocol pipeline
Expand Down
4 changes: 2 additions & 2 deletions QuantConnect.RBI/Fix/FixInstance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* limitations under the License.
*/

using QuantConnect.RBI.Fix.Core.Interfaces;
using QuantConnect.Brokerages.RBI.Fix.Core.Interfaces;
using QuantConnect.Securities;
using QuantConnect.Util;
using QuickFix;
Expand All @@ -23,7 +23,7 @@
using Log = QuantConnect.Logging.Log;
using Message = QuickFix.Message;

namespace QuantConnect.RBI.Fix;
namespace QuantConnect.Brokerages.RBI.Fix;

public class FixInstance : MessageCracker, IApplication, IDisposable
{
Expand Down
2 changes: 1 addition & 1 deletion QuantConnect.RBI/Fix/LogFactory/LogFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
using System.Collections.Concurrent;
using QuickFix;

namespace QuantConnect.RBI.Fix.LogFactory;
namespace QuantConnect.Brokerages.RBI.Fix.LogFactory;

public class LogFactory : ILogFactory
{
Expand Down
2 changes: 1 addition & 1 deletion QuantConnect.RBI/Fix/LogFactory/Logger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
using QuickFix;
using Log = QuantConnect.Logging.Log;

namespace QuantConnect.RBI.Fix.LogFactory;
namespace QuantConnect.Brokerages.RBI.Fix.LogFactory;

public class Logger : ILog
{
Expand Down
2 changes: 1 addition & 1 deletion QuantConnect.RBI/Fix/Utils/Utility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
using QuickFix.FIX42;
using TimeInForce = QuantConnect.Orders.TimeInForce;

namespace QuantConnect.RBI.Fix.Utils
namespace QuantConnect.Brokerages.RBI.Fix.Utils
{
public static class Utility
{
Expand Down
8 changes: 4 additions & 4 deletions QuantConnect.RBI/QuantConnect.RBI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Product>QuantConnect.RBI</Product>
<AssemblyName>QuantConnect.RBI</AssemblyName>
<RootNamespace>QuantConnect.RBI</RootNamespace>
<AssemblyTitle>QuantConnect.RBI</AssemblyTitle>
<Product>QuantConnect.Brokerages.RBI</Product>
<AssemblyName>QuantConnect.Brokerages.RBI</AssemblyName>
<RootNamespace>QuantConnect.Brokerages.RBI</RootNamespace>
<AssemblyTitle>QuantConnect.Brokerages.RBI</AssemblyTitle>
<OutputType>Library</OutputType>
<OutputPath>bin\$(Configuration)\</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
Expand Down
12 changes: 5 additions & 7 deletions QuantConnect.RBI/RBIBrokerage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,18 @@
using QuantConnect.Packets;
using QuantConnect.Interfaces;
using QuantConnect.Securities;
using QuantConnect.Brokerages;
using QuantConnect.Configuration;
using QuantConnect.Orders.Fees;
using QuantConnect.RBI.Fix;
using QuantConnect.RBI.Fix.Core.Implementations;
using QuantConnect.RBI.Fix.Core.Interfaces;
using QuantConnect.RBI.Fix.Utils;
using QuantConnect.Brokerages.RBI.Fix;
using QuantConnect.Brokerages.RBI.Fix.Core.Implementations;
using QuantConnect.Brokerages.RBI.Fix.Core.Interfaces;
using QuantConnect.Brokerages.RBI.Fix.Utils;
using QuantConnect.Util;
using QuickFix.FIX42;
using RestSharp;
using Log = QuantConnect.Logging.Log;
using QuickFix.Fields;

namespace QuantConnect.RBI
namespace QuantConnect.Brokerages.RBI
{
[BrokerageFactory(typeof(RBIBrokerageFactory))]
public class RBIBrokerage : Brokerage
Expand Down
5 changes: 2 additions & 3 deletions QuantConnect.RBI/RBIBrokerageFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,14 @@
*/

using QuantConnect.Packets;
using QuantConnect.Brokerages;
using QuantConnect.Interfaces;
using QuantConnect.Securities;
using QuantConnect.Configuration;
using QuantConnect.Logging;
using QuantConnect.RBI.Fix;
using QuantConnect.Brokerages.RBI.Fix;
using QuantConnect.Util;

namespace QuantConnect.RBI
namespace QuantConnect.Brokerages.RBI
{
/// <summary>
/// Provides a template implementation of BrokerageFactory
Expand Down
3 changes: 1 addition & 2 deletions QuantConnect.RBI/RBISymbolMapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@
* limitations under the License.
*/

using QuantConnect.Brokerages;
using QuantConnect.Data.Auxiliary;
using QuantConnect.Interfaces;

namespace QuantConnect.RBI;
namespace QuantConnect.Brokerages.RBI;

public class RBISymbolMapper : ISymbolMapper
{
Expand Down

0 comments on commit 28e7c16

Please sign in to comment.