Commit 3dacf5e
authored
Add modern Uploads and Datasets APIs, deprecate legacy Table API (#187)
* Add modern Uploads and Datasets APIs, deprecate legacy Table API
This commit introduces the modern /v1/uploads and /v1/datasets API
endpoints while maintaining backward compatibility with the legacy
/table endpoints.
Changes:
- Add UploadsAPI with /v1/uploads/* endpoints for table management
- Add DatasetsAPI with /v1/datasets/* endpoints for dataset discovery
- Deprecate all TableAPI methods with migration guidance
- Add comprehensive response models for new APIs
- Update ExtendedAPI to include new APIs with proper MRO
- Add unit and E2E tests for new functionality
- Configure ruff to allow unittest-style assertions in tests
All existing TableAPI methods remain functional but emit deprecation
warnings pointing users to the new UploadsAPI methods.
* Fix API routes and response models for Uploads and Datasets APIs
- Remove double /v1 prefix from all routes (api_version already includes it)
- Update Dataset models to match actual API responses (full_name instead of slug/namespace)
- Update Table models to match actual API responses (full_name format)
- Change owner from id to handle+type fields
- Add nullable field to column models
- Change InsertDataResponse to use 'name' field instead of 'table_name'
- Update datasets integration tests to use full_name and required filters
- Update uploads integration tests to use DUNE_NAMESPACE env var and handle CSV upload naming
- Fix column types in test schemas (int -> integer)
* Update unit test mocks to match new API response structure
- Change Dataset mocks to use full_name instead of slug/namespace
- Update owner structure to use handle+type instead of id+handle
- Add nullable field to all column mocks
- Change metadata from description field to dict
- Update TableElement mocks to use full_name format
- Change InsertDataResponse mock to use 'name' instead of 'table_name'
- Fix all route expectations to remove /v1 prefix (already in api_version)
* Fix formatting in test_datasets_api.py
* Make next_offset optional in UploadListResponse1 parent 9f69ac7 commit 3dacf5e
File tree
11 files changed
+1022
-4
lines changed- .github/workflows
- dune_client
- api
- tests
- e2e
- unit
11 files changed
+1022
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
48 | 49 | | |
49 | | - | |
| 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 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| 24 | + | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
| |||
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
43 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
44 | 55 | | |
45 | 56 | | |
46 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
47 | 65 | | |
48 | 66 | | |
49 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
4 | 7 | | |
5 | 8 | | |
6 | 9 | | |
7 | 10 | | |
8 | 11 | | |
9 | 12 | | |
| 13 | + | |
| 14 | + | |
10 | 15 | | |
11 | 16 | | |
12 | 17 | | |
| |||
21 | 26 | | |
22 | 27 | | |
23 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
24 | 32 | | |
25 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
26 | 38 | | |
27 | 39 | | |
28 | 40 | | |
| |||
54 | 66 | | |
55 | 67 | | |
56 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
57 | 73 | | |
58 | 74 | | |
59 | 75 | | |
| |||
87 | 103 | | |
88 | 104 | | |
89 | 105 | | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
90 | 110 | | |
91 | 111 | | |
92 | 112 | | |
| |||
113 | 133 | | |
114 | 134 | | |
115 | 135 | | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
116 | 140 | | |
117 | 141 | | |
118 | 142 | | |
| |||
126 | 150 | | |
127 | 151 | | |
128 | 152 | | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
129 | 157 | | |
130 | 158 | | |
131 | 159 | | |
| |||
0 commit comments