@@ -58,7 +58,7 @@ struct DatasetVersion
5858 timestamp:: TimeZones.ZonedDateTime
5959 _blobstore_path:: String
6060
61- function DatasetVersion (json:: Dict ; owner:: AbstractString , name:: AbstractString )
61+ function DatasetVersion (json:: AbstractDict ; owner:: AbstractString , name:: AbstractString )
6262 msg = " Unable to parse dataset version info for ($owner , $name )"
6363 version = _get_json (json, " version" , Int; msg)
6464 size = _get_json (json, " size" , Int; msg)
@@ -158,9 +158,9 @@ Base.@kwdef struct Dataset
158158 _json:: Dict
159159end
160160
161- function Dataset (d:: Dict ; expected_project:: Union{UUID, Nothing} = nothing )
161+ function Dataset (d:: AbstractDict ; expected_project:: Union{UUID, Nothing} = nothing )
162162 owner = _get_json (
163- _get_json (d, " owner" , Dict ),
163+ _get_json (d, " owner" , AbstractDict ),
164164 " username" , String,
165165 )
166166 name = _get_json (d, " name" , AbstractString)
@@ -169,7 +169,7 @@ function Dataset(d::Dict; expected_project::Union{UUID, Nothing}=nothing)
169169 [DatasetVersion (json; owner, name) for json in versions_json];
170170 by= dsv -> dsv. id,
171171 )
172- _storage = let storage_json = _get_json (d, " storage" , Dict )
172+ _storage = let storage_json = _get_json (d, " storage" , AbstractDict )
173173 _DatasetStorage (;
174174 credentials_url= _get_json (d, " credentials_url" , AbstractString),
175175 region= _get_json (storage_json, " bucket_region" , AbstractString),
@@ -178,7 +178,7 @@ function Dataset(d::Dict; expected_project::Union{UUID, Nothing}=nothing)
178178 )
179179 end
180180 project = if ! isnothing (expected_project)
181- project_json = _get_json (d, " project" , Dict )
181+ project_json = _get_json (d, " project" , AbstractDict )
182182 project_json_uuid = UUIDs. UUID (
183183 _get_json (project_json, " project_id" , String)
184184 )
723723function _check_dataset_upload_config (
724724 r:: _RESTResponse , expected_dtype:: AbstractString ; newly_created_dataset:: Bool
725725)
726- upload_config, _ = _parse_response_json (r, Dict )
726+ upload_config, _ = _parse_response_json (r, AbstractDict )
727727 # Verify that the dtype of the remote dataset is what we expect it to be.
728728 if upload_config[" dataset_type" ] != expected_dtype
729729 if newly_created_dataset
@@ -899,7 +899,7 @@ storage_class =
899899 )
900900end
901901
902- function _write_rclone_config (io:: IO , upload_config:: Dict )
902+ function _write_rclone_config (io:: IO , upload_config:: AbstractDict )
903903 region = upload_config[" location" ][" region" ]
904904 access_key_id = upload_config[" credentials" ][" access_key_id" ]
905905 secret_access_key = upload_config[" credentials" ][" secret_access_key" ]
914914function _get_dataset_credentials (auth:: Authentication , dataset:: Dataset )
915915 r = @_httpcatch HTTP. get (dataset. _storage. credentials_url, _authheaders (auth))
916916 r. status == 200 || _throw_invalidresponse (r; msg= " Unable get credentials for $(dataset) " )
917- credentials, _ = _parse_response_json (r, Dict )
917+ credentials, _ = _parse_response_json (r, AbstractDict )
918918 return credentials
919919end
920920
@@ -1143,7 +1143,7 @@ end
11431143
11441144# Low-level internal function that just takes a dict of params, without caring
11451145# if they are valid or not, and returns the raw HTTP response.
1146- function _update_dataset (auth:: Authentication , dataset_name:: AbstractString , params:: Dict )
1146+ function _update_dataset (auth:: Authentication , dataset_name:: AbstractString , params:: AbstractDict )
11471147 _restcall (auth, :PATCH , (" user" , " datasets" , dataset_name), JSON. json (params))
11481148end
11491149
0 commit comments