Skip to content

Conversation

@mattt
Copy link
Contributor

@mattt mattt commented Nov 7, 2023

This removes some ambiguity with pydantic.BaseModel and Replicate models, and resolves a naming conflict with Replicate model collections.

API consumers are unlikely to interact with these symbols directly, so this change should be largely backward compatible.

mattt added 3 commits November 7, 2023 03:07
Signed-off-by: Mattt Zmuda <[email protected]>
Move Namespace to resource.py

Signed-off-by: Mattt Zmuda <[email protected]>
@mattt mattt merged commit 7a058fb into main Nov 7, 2023
@mattt mattt deleted the mattt/namespace branch November 7, 2023 11:23
mattt added a commit that referenced this pull request Nov 7, 2023
Related to #188 

API resources define a common `id` field, which requires additional
bookkeeping in `_prepare_model`. However, these fields aren't used, and
either shadow a field on the resource or can be computed. This PR
removes `id` from the base model, adds properties for subclasses that
don't have an `id` field (like `Hardware` and `Collection`), and marks
them as deprecated, for anyone who is relying on that behavior.

---------

Signed-off-by: Mattt Zmuda <[email protected]>
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.

2 participants