This repository was archived by the owner on Sep 11, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -33,12 +33,6 @@ class PVDataSource(ImageDataSource):
3333 defined by image_size_pixels and meters_per_pixel.
3434 """
3535
36- # This are just keep in for the moment, but don't do anything.
37- # THey are needed for manager.py to work
38- # TODO: #631
39- filename = None
40- metadata_filename = None
41-
4236 files_groups : List [Union [PVFiles , dict ]]
4337 # TODO: Issue #425: Use config to set start_dt and end_dt.
4438 start_datetime : Optional [datetime .datetime ] = None
@@ -54,9 +48,6 @@ class PVDataSource(ImageDataSource):
5448 def __post_init__ (self , image_size_pixels : int , meters_per_pixel : int ):
5549 """Post Init"""
5650
57- assert self .filename is None
58- assert self .metadata_filename is None
59-
6051 if type (self .files_groups [0 ]) == dict :
6152 self .files_groups = [PVFiles (** files ) for files in self .files_groups ]
6253
Original file line number Diff line number Diff line change @@ -69,11 +69,20 @@ def initialize_data_sources(
6969 config_for_data_source , pattern_to_remove = f"^{ data_source_name } _"
7070 )
7171
72+ # TODO: #631 remove
73+ if data_source_name == "pv" :
74+ config_for_data_source .pop ("filename" )
75+ config_for_data_source .pop ("metadata_filename" )
76+
7277 data_source_class = MAP_DATA_SOURCE_NAME_TO_CLASS [data_source_name ]
7378 try :
7479 data_source = data_source_class (** config_for_data_source )
7580 except Exception :
76- logger .exception (f"Exception whilst instantiating { data_source_name } !" )
81+ logger .exception (
82+ f"Exception whilst instantiating { data_source_name } ! "
83+ f"Tried with configuration { config_for_data_source } "
84+ f"in { data_source_class } "
85+ )
7786 raise
7887 self .data_sources [data_source_name ] = data_source
7988
You can’t perform that action at this time.
0 commit comments