Commit 477bcef
committed
Add timeouts, retries, new loaders, tests & CI
Introduce request retries and a DEFAULT_TIMEOUT applied to all HTTP calls, add timeout parameters to get/post/patch/delete, and raise AuthenticationError on 401 during paginated loads. Add device auth polling timeout (max_wait), context-manager support (__enter__/__exit__), and validation for unknown kwargs in _convenience_load; change many convenience loader offsets to default to None. Add numerous new convenience loader helpers (procedurelog, subjectlog, equipment, consumablestock, behavioralassay, datastorage, setup, hardwaredevice, brainregion, species, strain, publication, laboratory). Bump package __version__ to 2.0.0 and require requests>=2.28, update tutorial to use placeholder UUIDs, add comprehensive unit tests for timeouts, auth polling, context manager, loader validation and new loaders, and add a GitHub Actions workflow to run tests on push/PR across Python versions.1 parent 08c934e commit 477bcef
File tree
6 files changed
+633
-26
lines changed- .github/workflows
- brainstem_api_tools
- tests
6 files changed
+633
-26
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
0 commit comments