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

Updated File Fix + Updated Env + Add a Few Tests #60

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

RileyLePrell
Copy link
Collaborator

@wesslen brought up a great point about what happens if you want to update a document. Previously, if I uploaded an updated version of a document, the previous chunks would still exist alongside the new ones. To address this, I’ve updated the logic to identify when someone uploads the same document based on matching criteria (date, file type, and meeting type). The system now checks for matching chunks, lists how many exist, deletes them, and uploads the new ones.

I’ve also updated the .env_example file to include AZURE_STORAGE_CONTAINER, which people need to configure. I forgot to include that earlier—oops!

Additionally, I’ve added a few tests related to this functionality:

metadata_deletion_test.py: Allows someone to test deleting chunks based on a specific date.
metadata_by_date.py: Lets users retrieve all chunks associated with a specific date.

@wesslen brought up a great point about what happens if you want to update a document. Previously, if I uploaded an updated version of a document, the previous chunks would still exist alongside the new ones. To address this, I’ve updated the logic to identify when someone uploads the same document based on matching criteria (date, file type, and meeting type). The system now checks for matching chunks, lists how many exist, deletes them, and uploads the new ones.

I’ve also updated the .env_example file to include AZURE_STORAGE_CONTAINER, which people need to configure. I forgot to include that earlier—oops!

Additionally, I’ve added a few tests related to this functionality:

metadata_deletion_test.py: Allows someone to test deleting chunks based on a specific date.
metadata_by_date.py: Lets users retrieve all chunks associated with a specific date.
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

Bandit found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

@neal-logan
Copy link
Collaborator

These are some great improvements!

@neal-logan neal-logan merged commit 320edc9 into main Dec 10, 2024
5 of 7 checks passed
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