Skip to content
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: test refactor #214

Draft
wants to merge 41 commits into
base: main
Choose a base branch
from
Draft

feat: test refactor #214

wants to merge 41 commits into from

Conversation

cofin
Copy link
Member

@cofin cofin commented Jun 10, 2024

Description

Another try at test refactoring.

Closes

Base automatically changed from proto to main June 10, 2024 16:10
@cofin cofin changed the base branch from main to typing-updates-schema June 25, 2024 18:21
Base automatically changed from typing-updates-schema to main June 26, 2024 03:00
cofin and others added 7 commits June 26, 2024 23:47
* feat: services accept BaseModels and Structs

* fix: adds tests for converting struct and basemodel classes

* fix: correct configuration

* feat: tweak to_dict
* feat: services accept BaseModels and Structs

* fix: adds tests for converting struct and basemodel classes

* fix: correct configuration

* feat: tweak to_dict

* feat: add a `to_schema` parameter to services

* chore: linting

* fix: type checking

* feat: assert model

---------

Signed-off-by: Cody Fincher <[email protected]>
* feat: improved typing

* chore: bump version

* feat: i think this is better for linters

* chore: revert changes

* feat: use type guard

* feat: type ignore

* feat: precommit hook

* fix: updated dict type signature

* chore: linting fixes

* chore: limit concurrency per branch

* feat: lint fix

* fix: add missing returns

* fix: don't assign an extra variable

* feat: allow filters in single row queries (#222)

* wip

* feat: allow single row operations to filter

* fix: remove deprecation test
- Reverts the previous `to_schema` implementation in the service layer.  This will need to be rethought as it requires too many overloads to any customized service function.  
- Ensures that the filter values for `upsert_many` is a unique list.  This is useful when you are merging a large amount of objects on a foreign key.  The lookup will only contain a single unique entry for each key instead of one for each row.
- Adds a `schema_to_dict` method to convert incoming Pydantic or Msgspec models to dictionaries
- Adds additional type guard helpers to check for a field in a dictionary, Struct, or BaseModel
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