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

BugFix: Fix error when use_annotations=True for record based metadata where there are no existing annotations #1285

Merged
merged 4 commits into from
Sep 12, 2023

Conversation

GiaJordan
Copy link
Contributor

@GiaJordan GiaJordan commented Aug 31, 2023

This PR provides logic to cover the case where use_annoations is set to True, but the metadata is not file based. In this case, an empty manifest is generated to create the manifest, and a warning message is logged to alert the user that annotations could not be pulled.

@GiaJordan GiaJordan marked this pull request as draft August 31, 2023 21:35
@GiaJordan GiaJordan marked this pull request as ready for review September 5, 2023 21:18
@andrewelamb
Copy link
Contributor

@GiaJordan I'm not seeing any tests for the new functionality.

@GiaJordan
Copy link
Contributor Author

@andrewelamb No, this PR is restoring logic was already present in the codebase and is not novel. Adding an additional test did not seem necessary

@andrewelamb
Copy link
Contributor

@GiaJordan If case this was already covered by existing tests, wouldn't those have been failing up till now?

@GiaJordan
Copy link
Contributor Author

GiaJordan commented Sep 6, 2023

@andrewelamb it seems covering this case increases runtime, so that's why nothing was failing.
But if your initial comment was asking me to create a test for this case, then I can do that.

@andrewelamb
Copy link
Contributor

@GiaJordan gotcha

@GiaJordan
Copy link
Contributor Author

@andrewelamb , @mialy-defelice After our discussion I added a test for this case. Parameterizing the other fixtures would've likely caused issues for the existing tests that used them, so to simplify things the one for this case is separate. It will run twice, once for a dataset where there is a manifest to pull from and once where the dataset is empty.

I've also gone through the CLI and API tests that @mialy-defelice performs when changing this part of the manifest generator. All were fine except for using the -a flag with the HTAN manifests (tests in rows 4,5, and 6). This was a known issue though as they've added an annotation key to their files that we don't necessarily need to support at this time. Those rows also experienced the same error on develop so it's not a branch specific problem.

Please let me know if either of you have questions!

@GiaJordan GiaJordan merged commit 1610a40 into develop Sep 12, 2023
3 checks passed
@GiaJordan GiaJordan changed the title Develop fds 978 entity based annotations BugFix: Fix error when use_annotations=True for record based metadata where there are no existing annotations Sep 12, 2023
@GiaJordan GiaJordan deleted the develop-FDS-978-entity-based-annotations branch September 12, 2023 16:52
@andrewelamb andrewelamb mentioned this pull request Sep 20, 2023
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