Commit 6358ac9
committed
refactor(data): unify URL+headers cache key + document redaction
Follow-up to #529:
* Extract a single url_cache_key(url, headers) helper in
base_url.py so the in-memory provider dict on Context and the
on-disk cache filename hash use the exact same canonical
serialization. Prevents future drift where an in-memory hit
could read the wrong on-disk file.
* Add a note to the headers= docstrings on Context.fetch_csv /
fetch_json / fetch_parquet and DataSource.from_csv / from_json /
from_parquet documenting that header values are redacted to
'***' in to_dict() so secrets do not leak into diagnostic
payloads.1 parent 4c4d8ae commit 6358ac9
3 files changed
Lines changed: 46 additions & 13 deletions
File tree
- investing_algorithm_framework
- app
- domain/models/data
- infrastructure/data_providers
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2383 | 2383 | | |
2384 | 2384 | | |
2385 | 2385 | | |
2386 | | - | |
2387 | | - | |
2388 | | - | |
2389 | | - | |
2390 | | - | |
2391 | | - | |
2392 | | - | |
| 2386 | + | |
| 2387 | + | |
| 2388 | + | |
| 2389 | + | |
| 2390 | + | |
| 2391 | + | |
2393 | 2392 | | |
2394 | 2393 | | |
2395 | 2394 | | |
| |||
2419 | 2418 | | |
2420 | 2419 | | |
2421 | 2420 | | |
2422 | | - | |
| 2421 | + | |
| 2422 | + | |
| 2423 | + | |
2423 | 2424 | | |
2424 | 2425 | | |
2425 | 2426 | | |
| |||
2492 | 2493 | | |
2493 | 2494 | | |
2494 | 2495 | | |
2495 | | - | |
| 2496 | + | |
| 2497 | + | |
| 2498 | + | |
2496 | 2499 | | |
2497 | 2500 | | |
2498 | 2501 | | |
| |||
2560 | 2563 | | |
2561 | 2564 | | |
2562 | 2565 | | |
2563 | | - | |
| 2566 | + | |
| 2567 | + | |
| 2568 | + | |
2564 | 2569 | | |
2565 | 2570 | | |
2566 | 2571 | | |
| |||
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
155 | 158 | | |
156 | 159 | | |
157 | 160 | | |
| |||
215 | 218 | | |
216 | 219 | | |
217 | 220 | | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
218 | 224 | | |
219 | 225 | | |
220 | 226 | | |
| |||
271 | 277 | | |
272 | 278 | | |
273 | 279 | | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
274 | 283 | | |
275 | 284 | | |
276 | 285 | | |
| |||
Lines changed: 22 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
28 | 49 | | |
29 | 50 | | |
30 | 51 | | |
| |||
357 | 378 | | |
358 | 379 | | |
359 | 380 | | |
360 | | - | |
361 | | - | |
362 | | - | |
| 381 | + | |
363 | 382 | | |
364 | 383 | | |
365 | 384 | | |
| |||
0 commit comments