-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature/mx-1381 prepare database model rework (#69)
# PR Context - preparatory changes required for robert-koch-institut/mex-backend#25 # Added - add `entityType` type hint to `MExModel` (now `BaseEntity`) - add types for `AnyBaseModel`, `AnyExtractedModel` and `AnyMergedModel` - create more specific subclasses of `Identifier` (for extracted and merged) - expose unions, lists and lookups for `Identifier` subclasses in `mex.common.types` # Changes - swap `contextvars.ContextVar` for `mex.common.context.ContextStore` - move `stableTargetId` property from base models to extracted models - update typing of identifiers to specific subclasses - use `Annotated[..., Field(...)]` notation for pydantic field configs - split up `mex.common.models.base` and move out `MExModel` and `JsonSchemaGenerator` - rename `MExModel` to `BaseEntity` with only type hints an model config - declare `hadPrimarySource`, `identifier` and `identifierInPrimarySource` as frozen # Removed - absorb unused `BaseExtractedData` into `ExtractedData` - remove `stableTargetId` property from merged models - drop support for sinks to accept merged items (now only for extracted data) --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
- Loading branch information
1 parent
ade6e17
commit 6030a3a
Showing
65 changed files
with
1,393 additions
and
899 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Review | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
workflow_dispatch: | ||
|
||
jobs: | ||
assignee: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
if: >- | ||
github.event.pull_request.user.login != ${{ vars.MEX_BOT_USER }} && | ||
github.event.pull_request.user.login != 'dependabot[bot]' | ||
steps: | ||
- name: Add assignee | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
if [[ -z "${{ github.event.pull_request.assignee.login }}" ]]; then | ||
echo assigning to ${{ github.event.pull_request.user.login }} | ||
gh pr edit ${{ github.event.pull_request.html_url }} --add-assignee ${{ github.event.pull_request.user.login }} | ||
else | ||
echo already assigned | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -100,6 +100,10 @@ dmypy.json | |
# ruff | ||
.ruff_cache | ||
|
||
# cruft | ||
.cruft-pr-body | ||
*.rej | ||
|
||
# PyCharm | ||
.idea/ | ||
.idea_modules/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.