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

Refactor Fertiscan Pydantic Models #138

Open
k-allagbe opened this issue Aug 31, 2024 · 0 comments
Open

Refactor Fertiscan Pydantic Models #138

k-allagbe opened this issue Aug 31, 2024 · 0 comments

Comments

@k-allagbe
Copy link
Member

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.
@k-allagbe k-allagbe added the enhancement New feature or request label Sep 5, 2024
@k-allagbe k-allagbe moved this to Todo in FertiScan Sep 5, 2024
@k-allagbe k-allagbe removed the enhancement New feature or request label Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

1 participant