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

feature/mx-1381 prepare database model rework #69

Merged
merged 45 commits into from
Mar 4, 2024

Conversation

cutoffthetop
Copy link
Contributor

@cutoffthetop cutoffthetop commented Jan 23, 2024

PR Context

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)

@cutoffthetop cutoffthetop self-assigned this Jan 23, 2024
@cutoffthetop cutoffthetop changed the base branch from main to feature/mx-1562-code-maintenance February 21, 2024 15:11
Base automatically changed from feature/mx-1562-code-maintenance to main February 22, 2024 16:24
cutoffthetop added a commit that referenced this pull request Feb 22, 2024
# PR Context

- preparation for mx-1381 and to keep
#69 smaller
- already removing public-api module for mx-1562, not closing that
ticket yet though

# Changes

- update cruft and dev dependencies
- randomize test order by default

# Removed

- remove `mex.common.public_api` module and the correlating sinks
- remove `PathWrapper.resolve` and `PathWrapper.raw` methods

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@cutoffthetop cutoffthetop changed the title feature/mx-1381 prepare create rule endpoint feature/mx-1381 prepare database model rework Feb 23, 2024
@erichesse erichesse self-requested a review March 1, 2024 09:30
erichesse
erichesse previously approved these changes Mar 4, 2024
Copy link
Contributor

@erichesse erichesse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Copy link
Contributor

@erichesse erichesse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to go

@cutoffthetop cutoffthetop merged commit 6030a3a into main Mar 4, 2024
7 checks passed
@cutoffthetop cutoffthetop deleted the feature/mx-1381-prep-rule-endpoint branch March 4, 2024 17:24
cutoffthetop added a commit to robert-koch-institut/mex-extractors that referenced this pull request Mar 5, 2024
# PR Context
- establish compatibility to
robert-koch-institut/mex-common#69

# Changes

- update cruft template with new linters
- utilize new, more precise Identifier subclasses
- make pyodbc a soft dependency (only pipelines that use it may fail)

# Removed

- remove sync-persons pipeline, stopgap mx-1572
- remove `public` as a valid sink option

# Fixed

- fix some docstring indents and typings
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