Commit 0b988ea
Improve directory and startup (#29)
* Upgrade to use class object instead of json
-> Before we were using the json which introduced some potential confusion
now it uses the directory object
-> Move functions inside class
-> Move default setting inside here... the API returning default in that way still not best but working in existing pattern
* Seperate concerns and improve startup
-> move default dir and label setting to optional
and more cleanly define at init instead of inside auth
-> use new directory class
-> use new get_directory_list()
-> get dir now checks if none
-> Added print statements for now since still so much changing but those can be optional log statements in future of course
* Align with schema direction
only schema is needed not directory id
(changing API side too)
* Align with new pattern
* opencv should be optional
only needed in some cases, heavy requirement to put here
* Fix init bug - this was preventing to_tensorflow() from working
init_file_ids asumes the id was already set
but for now refresh_from_dict pattern means the id is set after init
so refactor `init_files()` and call it after...
We will need to work on this more
Luckily at least now it's refactored to `convert_json_to_sdk_object()` so we have it only in one place
* fix: dir initialization
Co-authored-by: Pablo <pjestradac@gmail.com>1 parent 2931576 commit 0b988ea
File tree
6 files changed
+159
-144
lines changed- sdk
- diffgram
- brain
- core
- file
6 files changed
+159
-144
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
8 | 12 | | |
9 | 13 | | |
10 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | 6 | | |
9 | 7 | | |
10 | 8 | | |
| |||
29 | 27 | | |
30 | 28 | | |
31 | 29 | | |
32 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
53 | | - | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
60 | | - | |
61 | 59 | | |
62 | 60 | | |
63 | | - | |
| 61 | + | |
64 | 62 | | |
65 | 63 | | |
66 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
69 | 84 | | |
70 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
71 | 89 | | |
72 | 90 | | |
73 | 91 | | |
| |||
216 | 234 | | |
217 | 235 | | |
218 | 236 | | |
219 | | - | |
220 | | - | |
221 | | - | |
| 237 | + | |
222 | 238 | | |
223 | 239 | | |
224 | 240 | | |
| |||
242 | 258 | | |
243 | 259 | | |
244 | 260 | | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | 261 | | |
252 | | - | |
253 | | - | |
| 262 | + | |
254 | 263 | | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | 264 | | |
259 | 265 | | |
260 | | - | |
| 266 | + | |
| 267 | + | |
261 | 268 | | |
262 | | - | |
263 | | - | |
| 269 | + | |
264 | 270 | | |
265 | | - | |
266 | | - | |
| 271 | + | |
| 272 | + | |
267 | 273 | | |
268 | | - | |
| 274 | + | |
269 | 275 | | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
276 | 281 | | |
277 | | - | |
| 282 | + | |
278 | 283 | | |
279 | | - | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
280 | 303 | | |
281 | | - | |
282 | | - | |
283 | | - | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
284 | 313 | | |
285 | | - | |
286 | 314 | | |
287 | 315 | | |
288 | 316 | | |
289 | 317 | | |
290 | 318 | | |
291 | 319 | | |
292 | 320 | | |
293 | | - | |
294 | 321 | | |
295 | 322 | | |
296 | | - | |
| |||
0 commit comments