File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 1+ 1.0.4
2+ - enh: introduce `enable_basins` in `s3cc.get_s3_dc_handle`
131.0.3
24 - enh: allow to specify resource name when creating test resource
351.0.2
Original file line number Diff line number Diff line change @@ -188,12 +188,19 @@ def get_s3_bucket_name_for_resource(resource_id):
188188
189189def get_s3_dc_handle (
190190 resource_id : str ,
191- artifact : Literal ["condensed" , "preview" , "resource" ] = "resource" ):
191+ artifact : Literal ["condensed" , "preview" , "resource" ] = "resource" ,
192+ enable_basins : bool = False ,
193+ ):
192194 """Return an instance of :class:`RTDC_S3`
193195
194196 The data are accessed directly via S3 using DCOR's access credentials.
195197 Use this if you need to access the original raw file.
196198
199+ If you set `enable_basins` to True, basins of the data on S3 will
200+ be considered. This is turned off for performance reasons. Note that
201+ since an instance of `RTDC_S3` is returned, no local basins are
202+ allowed.
203+
197204 The resource with the identifier `resource_id` must exist in the
198205 CKAN database.
199206 """
@@ -204,9 +211,7 @@ def get_s3_dc_handle(
204211 "dcor_object_store.access_key_id" ),
205212 secret_access_key = get_ckan_config_option (
206213 "dcor_object_store.secret_access_key" ),
207- # Disable basins, because they could point to files on the
208- # local file system (security).
209- enable_basins = False ,
214+ enable_basins = enable_basins ,
210215 )
211216 return ds
212217
You can’t perform that action at this time.
0 commit comments