Commit 1cd8462
Add bulk document upload and pre-commit hook for knowledge base (#72)
## Summary
This PR introduces bulk document upload functionality to the
`DocumentClient` and adds a new model for document list items,
supporting the knowledge base feature. A Git pre-commit hook is also
added to enforce code quality checks before commits.
## Key Accomplishments
- **Bulk Document Upload**: Extended `DocumentClient` with a new method
to support uploading multiple documents in a single operation,
streamlining batch ingestion workflows for the knowledge base.
- **New Document List Item Model**: Added the `DocumentListItem` model
to represent individual documents within a collection, providing a
structured data type for list/bulk operations.
- **Pre-commit Hook**: Introduced a `.githooks/pre-commit` hook to
automate code quality checks as part of the local development workflow,
catching issues before they reach the remote repository.
## Changes Breakdown
| File | Change Type | Description |
|------|-------------|-------------|
| `robosystems_client/extensions/document_client.py` | Modified | Added
bulk upload method to `DocumentClient` |
| `robosystems_client/models/document_list_item.py` | Modified | Added
`DocumentListItem` model with document metadata fields |
| `.githooks/pre-commit` | Added | New pre-commit hook for automated
code quality enforcement |
## Breaking Changes
None. This is a purely additive change — existing APIs and models remain
unaffected.
## Testing Notes
- Verify that the new bulk upload method correctly handles multiple
document payloads and returns expected responses.
- Test edge cases for bulk uploads: empty lists, large batches, and
mixed valid/invalid documents.
- Confirm that `DocumentListItem` serializes and deserializes correctly
when used in API responses.
- Ensure the pre-commit hook executes successfully in a local
development environment and does not block valid commits.
## Infrastructure Considerations
- Developers should configure their local Git installation to use the
project's hooks directory to benefit from the newly added pre-commit
hook. This may require a one-time local setup step.
- The bulk upload endpoint should be evaluated for payload size limits
and timeout configurations on the server side to ensure it handles large
batch requests gracefully.
---
🤖 Generated with [Claude Code](https://claude.ai/code)
**Branch Info:**
- Source: `feature/knowledge-base`
- Target: `main`
- Type: feature
Co-Authored-By: Claude <noreply@anthropic.com>File tree
3 files changed
+54
-0
lines changed- .githooks
- robosystems_client
- extensions
- models
3 files changed
+54
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| 21 | + | |
| 22 | + | |
20 | 23 | | |
21 | 24 | | |
22 | 25 | | |
| |||
154 | 157 | | |
155 | 158 | | |
156 | 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 | + | |
157 | 196 | | |
158 | 197 | | |
159 | 198 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
| 38 | + | |
| 39 | + | |
36 | 40 | | |
37 | 41 | | |
38 | 42 | | |
| |||
64 | 68 | | |
65 | 69 | | |
66 | 70 | | |
| 71 | + | |
67 | 72 | | |
68 | 73 | | |
69 | 74 | | |
| |||
81 | 86 | | |
82 | 87 | | |
83 | 88 | | |
| 89 | + | |
| 90 | + | |
84 | 91 | | |
85 | 92 | | |
86 | 93 | | |
| |||
123 | 130 | | |
124 | 131 | | |
125 | 132 | | |
| 133 | + | |
126 | 134 | | |
127 | 135 | | |
128 | 136 | | |
| |||
0 commit comments