-
Notifications
You must be signed in to change notification settings - Fork 6
Generics and annotation improvements, Part 2 #42
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
Merged
Synicix
merged 8 commits into
nauticalab:dev
from
guzman-raphael:improve-annotation-and-generics
Nov 10, 2024
Merged
Generics and annotation improvements, Part 2 #42
Synicix
merged 8 commits into
nauticalab:dev
from
guzman-raphael:improve-annotation-and-generics
Nov 10, 2024
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…s since they will be implemented separately.
660f723 to
dd4d681
Compare
Synicix
suggested changes
Nov 2, 2024
Contributor
Synicix
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So there is a couple of discussion points we should probably go over next time we meet:
- How to deal with annotationless models. Seems that we have different apporches on how to handle that
- Test changes should adopt new design for generics?
- What should list_model return
…generic `TestStoredModel`, add generic `basic_test` that can be reused for other models, create separate test for file existence checks, rename tests, and allow usage of expect in result in test fixtures.
…`mut` use and add `pod_load_from_hash` test.
…)` to improve readability.
…notation` and add better test assert messages.
…model` signature to `Vec<ModelInfo>`, and pull out implementations from functions in tests.
This was
linked to
issues
Nov 8, 2024
Closed
22 tasks
Synicix
approved these changes
Nov 10, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Following the merge of #34 , this PR applies the ideas in my review.
Below is a summary of all the features that were accomplished across both PRs.
Features
delete_annotation,delete_pod), remove checks indelete_podsince deletes are explicit, and prevent deletion of the last annotation indelete_annotationannotationsubdirectory in model directory)load_podanddelete_podbut required forsave_podModelID)ResultpubLocalFileStore.directoryonly via getterimpl AsRef<Path>as opposed toimpl Into<PathBuf>list_model. Currently, just passing throughVec<ModelInfo>.Minor Improvements
Vec<ModelInfo>internally when parsing annotation pathclassin regexsave_filemore flexiblefrom_yamllookup_hashbased onname/versionget_version_mapsince unneeded with explicit deletesFileHasNoParenterrorparse_annotation_path(path)->find_annotation(glob_pattern)to improve readability.snake_caseutilityto_yamlusageTests
Removed tests introduced in Add genrics store function, modify parse annotation path to search an… #34 so they are addressed separatelyTests have been reworked to align with the original fixture design. Includes tests from Add genrics store function, modify parse annotation path to search an… #34. Improves code coverage from ~70% -> ~72%.expectusage in tests to simplifypod_loadtestPodlist_podwhen none exist yetDev Improvements