sharing_kachery.py
kachery_download_file(uri, dest, kachery_zone_name)
¶
Set the kachery resource url and attempt to download.
Source code in src/spyglass/sharing/sharing_kachery.py
KacheryZone
¶
Bases: SpyglassMixin
, Manual
Source code in src/spyglass/sharing/sharing_kachery.py
set_zone(key)
staticmethod
¶
Set the kachery zone based on the key to KacheryZone
Parameters:
Name | Type | Description | Default |
---|---|---|---|
key |
dict
|
key defining a single KacheryZone |
required |
Source code in src/spyglass/sharing/sharing_kachery.py
reset_zone()
staticmethod
¶
Resets the kachery zone environment variable to the default values.
Source code in src/spyglass/sharing/sharing_kachery.py
set_resource_url(key)
staticmethod
¶
Sets the KACHERY_RESOURCE_URL based on the key corresponding to a single Kachery Zone
Parameters:
Name | Type | Description | Default |
---|---|---|---|
key |
dict
|
key to retrieve a single kachery zone |
required |
Source code in src/spyglass/sharing/sharing_kachery.py
reset_resource_url()
staticmethod
¶
Resets the KACHERY_RESOURCE_URL to the default value.
Source code in src/spyglass/sharing/sharing_kachery.py
AnalysisNwbfileKachery
¶
Bases: SpyglassMixin
, Computed
Source code in src/spyglass/sharing/sharing_kachery.py
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 |
|
make(key)
¶
Populate with the uri of the analysis file
Source code in src/spyglass/sharing/sharing_kachery.py
download_file(analysis_file_name, permit_fail=False)
staticmethod
¶
Download the specified analysis file and associated linked files from kachery-cloud if possible
Parameters:
Name | Type | Description | Default |
---|---|---|---|
analysis_file_name |
str
|
The name of the analysis file |
required |
Returns:
Name | Type | Description |
---|---|---|
is_success |
bool
|
True if the file was successfully downloaded, False otherwise |
Source code in src/spyglass/sharing/sharing_kachery.py
share_data_to_kachery(restriction={}, table_list=[], zone_name=None)
¶
Share data to kachery
Parameters:
Name | Type | Description | Default |
---|---|---|---|
restriction |
dict
|
restriction to select what data should be shared from table, by default {} |
{}
|
table_list |
list
|
List of tables to share data from, by default [] |
[]
|
zone_name |
str
|
What kachery zone to share the data to, by default zone in spyglass.settings.config,
which looks for |
None
|
Raises:
Type | Description |
---|---|
ValueError
|
Does not allow sharing of all data in table |