feat(CONV-001): add GLD launch date validation, feat(DATA-DB-003): add cache CLI
CONV-001: - Add GLD_LAUNCH_DATE constant (November 18, 2004) - Validate reference_date in gld_ounces_per_share() - Raise ValueError for dates before GLD launch - Update docstring with valid date range - Add comprehensive test coverage for edge cases DATA-DB-003: - Create scripts/cache_cli.py with three commands: - vault-dash cache stats: Show cache statistics - vault-dash cache list: List cached entries - vault-dash cache clear: Clear all cache files - Add Makefile targets: cache-stats, cache-list, cache-clear - Integrate with DatabentoHistoricalPriceSource methods
This commit is contained in:
@@ -315,11 +315,13 @@ class BacktestPageService:
|
||||
source_info = self.DATA_SOURCE_INFO.get(data_source, self.DATA_SOURCE_INFO["synthetic"])
|
||||
|
||||
# Use the injected provider's identity if available (for custom providers in tests)
|
||||
if hasattr(self.backtest_service, 'provider'):
|
||||
injected_provider_id = getattr(self.backtest_service.provider, 'provider_id', None)
|
||||
injected_pricing_mode = getattr(self.backtest_service.provider, 'pricing_mode', None)
|
||||
if hasattr(self.backtest_service, "provider"):
|
||||
injected_provider_id = getattr(self.backtest_service.provider, "provider_id", None)
|
||||
injected_pricing_mode = getattr(self.backtest_service.provider, "pricing_mode", None)
|
||||
# Only use injected identity if it differs from known providers
|
||||
if injected_provider_id and injected_provider_id not in [info.provider_id for info in self.DATA_SOURCE_INFO.values()]:
|
||||
if injected_provider_id and injected_provider_id not in [
|
||||
info.provider_id for info in self.DATA_SOURCE_INFO.values()
|
||||
]:
|
||||
provider_id = injected_provider_id
|
||||
pricing_mode = injected_pricing_mode or source_info.pricing_mode
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user