-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: kudos
, users
and more stats
endpoints; docs/style: use_attribute_docstrings
, apply D
ruff rule set, better examples
#198
Conversation
- `use_attribute_docstrings` allows docstrings to be converted to the `description` field of pydantic `BaseModel`s, which in turn allows for that information to be propagated to the documentation - Applies `pydocstyle` (ruff rule `D`), which includes adding a large number of missing docstrings and fixing their tone, missing args and styling. - chore: fix codegen readme; ignore gen'd file - fix: don't use `open` in async example
- Removes no-longer-present args from docstrings - Formats docstrings so `griffe` (a `mkdocs` dep) can parse them
Due to the fact that hashing was being done on based on job ID, bugs would arise because `__eq__`/`__hash__` checks caused different object types to return matches between each other (e.g., `ImageGenerateStatusResponse` and `ImageGenerateAsyncResponse` matching each other on an `in` check). The revised implementation now discriminates identity based on these magic functions by also including the class name (`cls.__name__`) in the hash calculation as a fixed offset.
This reflects a philosophical shift on my part. I previously would use a `with` statement with the specified horde client but I have come to the conclusion that it should be the caller's responsibility to do this at a time of their choosing. The status quo before this change would/could cause situations where requests would be cancelled in an almost certainly unintended manner. For example, if you had two concurrent simple requests going, the requests would race to finish and the first completing would cause the second to be cancelled.
The API treats false-y values for `type` on filter `GET` requests as "no filter".
Also fixes a naming inconsistency with (now) `ImageStatsModelsResponse`
also changes the undocumented/anonymous model identifier to the const `_ANONYMOUS_MODEL `
use_attribute_docstrings
, apply D
ruff rule setkudos
, users
and more stats
endpoints; docs/style: use_attribute_docstrings
, apply D
ruff rule set, better examples
@CodiumAI-Agent /review |
PR Review 🔍
Code feedback:
|
/v2/kudos
,/v2/users
and/v2/stats
endpoints (and their variations) are now supporteduse_attribute_docstrings
allows docstrings to be converted to thedescription
field of pydanticBaseModel
s, which in turn allows for that information to be propagated to the documentationpydocstyle
(ruff ruleD
), which includes adding a large number of missing docstrings and fixing their tone, missing args and styling.examples
folder for more information.open
in async example