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/model-improvements #164

Merged
merged 13 commits into from
Apr 1, 2024

Conversation

gecBurton
Copy link
Collaborator

@gecBurton gecBurton commented Mar 28, 2024

Context

We can make more use of pydantic's models:

  • support for UUIDs, datetimes, urls, etc
  • no need to generate fake values when defaults exist
  • can use descriptions to aid understanding

This work is incomplete, but this change is already big enough

Changes proposed in this pull request

many and various

Guidance to review

Relevant links

https://technologyprogramme.atlassian.net/browse/REDBOX-94

Things to check

  • I have added any new ENV vars in all deployed environments
  • I have tested any code added or changed
  • I have run integration tests

redbox/models/file.py Outdated Show resolved Hide resolved
redbox/models/file.py Outdated Show resolved Hide resolved
redbox/models/file.py Outdated Show resolved Hide resolved
storage_kind: str = "local"
text: str = ""
processing_status: ProcessingStatusEnum = ProcessingStatusEnum.uploaded
text: Optional[str] = Field(description="file content", default=None)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

we could set this to be a required field if we had an IngestQueueItem to reference the file rather than reusing this class?

George Burton and others added 13 commits April 1, 2024 12:46
Co-authored-by: George Burton <8233643+gecBurton@users.noreply.github.com>
Co-authored-by: George Burton <8233643+gecBurton@users.noreply.github.com>
Co-authored-by: George Burton <8233643+gecBurton@users.noreply.github.com>
@gecBurton gecBurton force-pushed the feature/REDBOX-94-various-model-improvements branch from 36657af to e147076 Compare April 1, 2024 11:47
@gecBurton gecBurton merged commit b03122f into main Apr 1, 2024
7 checks passed
@gecBurton gecBurton deleted the feature/REDBOX-94-various-model-improvements branch April 1, 2024 12:24
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