Skip to content

Commit e59efe3

Browse files
authored
Merge pull request #14 from Romazes/rename-data-bento-provider-to-data-bento-data-provider
Rename: DataBentoProvider to DataBentoDataProvider
1 parent 1fc8bab commit e59efe3

File tree

6 files changed

+18
-18
lines changed

6 files changed

+18
-18
lines changed

QuantConnect.DataBento.Tests/DataBentoDataProviderHistoryTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ namespace QuantConnect.Lean.DataSource.DataBento.Tests;
2727
[TestFixture]
2828
public class DataBentoDataProviderHistoryTests
2929
{
30-
private DataBentoProvider _historyDataProvider;
30+
private DataBentoDataProvider _historyDataProvider;
3131

3232
[SetUp]
3333
public void SetUp()
3434
{
35-
_historyDataProvider = new DataBentoProvider();
35+
_historyDataProvider = new DataBentoDataProvider();
3636
}
3737

3838
[TearDown]

QuantConnect.DataBento.Tests/DataBentoDataQueueHandlerTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ namespace QuantConnect.Lean.DataSource.DataBento.Tests;
3333
[TestFixture]
3434
public class DataBentoDataQueueHandlerTests
3535
{
36-
private DataBentoProvider _dataProvider;
36+
private DataBentoDataProvider _dataProvider;
3737
private CancellationTokenSource _cancellationTokenSource;
3838

3939
[SetUp]

QuantConnect.DataBento.Tests/DataBentoHistoryProviderTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ namespace QuantConnect.Lean.DataSource.DataBento.Tests;
3030
[TestFixture]
3131
public class DataBentoHistoryProviderTests
3232
{
33-
private DataBentoProvider _historyDataProvider;
33+
private DataBentoDataProvider _historyDataProvider;
3434

3535
[OneTimeSetUp]
3636
public void OneTimeSetUp()
@@ -42,7 +42,7 @@ public void OneTimeSetUp()
4242
Assert.Fail("DataBento API key is not set. Please set 'databento-api-key' in the configuration to run these tests.");
4343
}
4444

45-
_historyDataProvider = new DataBentoProvider(apiKey);
45+
_historyDataProvider = new DataBentoDataProvider(apiKey);
4646
}
4747

4848
[OneTimeTearDown]

QuantConnect.DataBento/DataBentoDataDownloader.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public class DataBentoDataDownloader : IDataDownloader, IDisposable
2929
/// <summary>
3030
/// Provides access to historical market data via the DataBento service.
3131
/// </summary>
32-
private readonly DataBentoProvider _historyProvider;
32+
private readonly DataBentoDataProvider _historyProvider;
3333

3434
/// <summary>
3535
/// Provides exchange trading hours and market-specific time zone information.
@@ -52,7 +52,7 @@ public DataBentoDataDownloader()
5252
/// <param name="apiKey">The DataBento API key.</param>
5353
public DataBentoDataDownloader(string apiKey)
5454
{
55-
_historyProvider = new DataBentoProvider(apiKey);
55+
_historyProvider = new DataBentoDataProvider(apiKey);
5656
_marketHoursDatabase = MarketHoursDatabase.FromDataFolder();
5757
}
5858

QuantConnect.DataBento/DataBentoDataProvider.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ namespace QuantConnect.Lean.DataSource.DataBento;
4242
/// Handles Subscribing, Unsubscribing, and fetching historical data from DataBento.
4343
/// It will handle if a symbol is subscribable and will log errors if it is not.
4444
/// </summary>
45-
public partial class DataBentoProvider : IDataQueueHandler
45+
public partial class DataBentoDataProvider : IDataQueueHandler
4646
{
4747
private HistoricalAPIClient _historicalApiClient;
4848

@@ -72,14 +72,14 @@ public partial class DataBentoProvider : IDataQueueHandler
7272

7373

7474
/// <summary>
75-
/// Initializes a new instance of the DataBentoProvider
75+
/// Initializes a new instance of the DataBentoDataProvider
7676
/// </summary>
77-
public DataBentoProvider()
77+
public DataBentoDataProvider()
7878
: this(Config.Get("databento-api-key"))
7979
{
8080
}
8181

82-
public DataBentoProvider(string apiKey)
82+
public DataBentoDataProvider(string apiKey)
8383
{
8484
if (string.IsNullOrWhiteSpace(apiKey))
8585
{
@@ -103,7 +103,7 @@ private void Initialize(string apiKey)
103103
if (_aggregator == null)
104104
{
105105
var aggregatorName = Config.Get("data-aggregator", "QuantConnect.Lean.Engine.DataFeeds.AggregationManager");
106-
Log.Trace($"{nameof(DataBentoProvider)}.{nameof(Initialize)}: found no data aggregator instance, creating {aggregatorName}");
106+
Log.Trace($"{nameof(DataBentoDataProvider)}.{nameof(Initialize)}: found no data aggregator instance, creating {aggregatorName}");
107107
_aggregator = Composer.Instance.GetExportedValueByTypeName<IDataAggregator>(aggregatorName, forceTypeNameOnExisting: false);
108108
}
109109

@@ -127,13 +127,13 @@ private void Initialize(string apiKey)
127127

128128
private void OnConnectionLost(object? _, ConnectionLostEventArgs cle)
129129
{
130-
Log.Trace($"{nameof(DataBentoProvider)}.{nameof(OnConnectionLost)}: The connection was lost. Starting ReSubscription process");
130+
Log.Trace($"{nameof(DataBentoDataProvider)}.{nameof(OnConnectionLost)}: The connection was lost. Starting ReSubscription process");
131131

132132
var symbols = _levelOneServiceManager.GetSubscribedSymbols();
133133

134134
Subscribe(symbols);
135135

136-
Log.Trace($"{nameof(DataBentoProvider)}.{nameof(OnConnectionLost)}: Re-subscription completed successfully for {_levelOneServiceManager.Count} symbol(s).");
136+
Log.Trace($"{nameof(DataBentoDataProvider)}.{nameof(OnConnectionLost)}: Re-subscription completed successfully for {_levelOneServiceManager.Count} symbol(s).");
137137
}
138138

139139
private void OnSymbolMappingConfirmation(object? _, SymbolMappingConfirmationEventArgs smce)

QuantConnect.DataBento/DataBentoHistoryProivder.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ namespace QuantConnect.Lean.DataSource.DataBento;
2828
/// Implements a history provider for DataBento historical data.
2929
/// Uses consolidators to produce the requested resolution when necessary.
3030
/// </summary>
31-
public partial class DataBentoProvider : MappedSynchronizingHistoryProvider
31+
public partial class DataBentoDataProvider : MappedSynchronizingHistoryProvider
3232
{
3333
private static int _dataPointCount;
3434

@@ -72,7 +72,7 @@ public override void Initialize(HistoryProviderInitializeParameters parameters)
7272
if (!_invalidSecurityTypeWarningFired)
7373
{
7474
_invalidSecurityTypeWarningFired = true;
75-
Log.Trace($"{nameof(DataBentoProvider)}.{nameof(GetHistory)}:" +
75+
Log.Trace($"{nameof(DataBentoDataProvider)}.{nameof(GetHistory)}:" +
7676
$"History request not supported for symbol '{historyRequest.Symbol}' (SecurityType: {historyRequest.Symbol.SecurityType}, Canonical: {historyRequest.Symbol.IsCanonical()}).");
7777
}
7878
return null;
@@ -83,7 +83,7 @@ public override void Initialize(HistoryProviderInitializeParameters parameters)
8383
if (!_invalidStartTimeErrorFired)
8484
{
8585
_invalidStartTimeErrorFired = true;
86-
Log.Error($"{nameof(DataBentoProvider)}.{nameof(GetHistory)}: Invalid date range: the start date must be earlier than the end date.");
86+
Log.Error($"{nameof(DataBentoDataProvider)}.{nameof(GetHistory)}: Invalid date range: the start date must be earlier than the end date.");
8787
}
8888
return null;
8989
}
@@ -93,7 +93,7 @@ public override void Initialize(HistoryProviderInitializeParameters parameters)
9393
if (!_dataBentoDatasetErrorFired)
9494
{
9595
_dataBentoDatasetErrorFired = true;
96-
Log.Error($"{nameof(DataBentoProvider)}.{nameof(GetHistory)}: " +
96+
Log.Error($"{nameof(DataBentoDataProvider)}.{nameof(GetHistory)}: " +
9797
$"DataBento dataset not found for symbol '{historyRequest.Symbol.Value}, Market = {historyRequest.Symbol.ID.Market}."
9898
);
9999
}

0 commit comments

Comments
 (0)