Skip to content

Add del update api#4

Merged
sidkos merged 7 commits intomainfrom
add-del-update-api
Oct 5, 2025
Merged

Add del update api#4
sidkos merged 7 commits intomainfrom
add-del-update-api

Conversation

@sidkos
Copy link
Copy Markdown
Owner

@sidkos sidkos commented Oct 5, 2025

This pull request introduces significant enhancements and refactoring to the Python dp-client library and its documentation, focusing on expanding the supported user API endpoints, enforcing stricter validation, and improving testability and maintainability. The changes also clarify API usage and validation rules in the documentation, and add a comprehensive test matrix for both unit and component tests.

API and Client Improvements:

  • Expanded UsersApi and DPClient to support all user CRUD operations (create, retrieve, list, update, partial_update, destroy), with strict id immutability enforced and robust endpoint validation at initialization. The client now injects the path id for PUT if omitted and rejects PATCH bodies containing id. [1] [2] [3]
  • Refactored internal typing and endpoint loading to use explicit imports, type hints, and runtime checks for endpoint presence, ensuring compatibility with the generated metadata_client and clearer error handling. [1] [2] [3] [4]
  • Improved public API surface for dp-client, including __all__ exports for top-level symbols and more precise type hints throughout.

Documentation and Usability:

  • Updated README.md to clarify the API endpoints, validation rules (notably id immutability), and usage patterns for the client, including detailed examples for all CRUD operations. [1] [2]
  • Added a comprehensive test matrix to the documentation, detailing unit and component test coverage, what each test verifies, and how to run them.

Testing and DB Helpers:

  • Improved DB driver typing and usage for component tests, ensuring correct type hints and usage of psycopg2 connections.

Grouped by Theme:

API Expansion and Validation

  • Added support for all user CRUD operations in UsersApi and DPClient, enforcing id immutability and robust endpoint validation at initialization. [1] [2] [3]
  • Improved internal typing and endpoint loading strategy, with explicit imports and runtime checks for endpoint presence. [1] [2] [3] [4]

Documentation and Testing

  • Updated documentation to clarify API endpoints, validation rules, and usage patterns, including examples for all CRUD operations. [1] [2]
  • Added a detailed test matrix to README, describing unit and component test coverage and execution instructions.

Codebase and Typing Improvements

  • Improved public API exports and type hints, enhancing maintainability and usability for downstream projects. [1] [2]

@sidkos sidkos self-assigned this Oct 5, 2025
@sidkos sidkos merged commit db7b457 into main Oct 5, 2025
5 checks passed
@sidkos sidkos deleted the add-del-update-api branch October 5, 2025 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant