ai-cfia / ai-cfia/ailab-datastore

Refactor Fertiscan Pydantic Models

Offen
#138 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Python
Sterne
3
Forks
0
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

## Description
The current Fertiscan Pydantic models need to be better aligned with our database schema. There is also a naming conflict between the `Inspection` Pydantic model, which is designed as an overarching object containing other models, and the `Inspection` database table, which primarily contains references (IDs) to other tables. Additionally, the `Inspection` model is missing few attributes like `PictureSet` and `Sample`.

## Tasks
- Review and update all Fertiscan Pydantic models to ensure they closely mirror their corresponding database tables, including adding an `id` field where necessary.
- Create a new Pydantic model for the `Inspection` database table that accurately represents its structure.
- Rename the existing `Inspection` model to avoid conflict with the `Inspection` database table.
- Revise the `Inspection` model to include the missing attributes such as `PictureSet` and `Sample`.
- Create the `PictureSet` and `Sample` models, along with any other models needed for existing database tables.
- Update the `build_inspection_import` and `build_inspection_export` functions to reflect the changes in the `Inspection` model and other related models.
- Update all references in the codebase to use the newly named and updated models.
- Ensure all models are correctly linked and reflect the changes made.
- Write tests to confirm that the new and updated models and functions work correctly.
- Ensure all tests pass after making these changes.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.