ENH: Add functionality for mutating element values#471
Merged
Enet4 merged 6 commits intoEnet4:masterfrom Apr 13, 2024
Merged
Conversation
Contributor
Author
|
If this is something you'd like, I'll go ahead and polish by adding docs, tests, and cleaning up |
Enet4
requested changes
Mar 12, 2024
Owner
Enet4
left a comment
There was a problem hiding this comment.
Thank you for this proposal. Unfortunately, some methods of that nature were deliberately kept away from the object API until now because it opens room for inconsistencies in the object. More details inline.
Contributor
Author
|
Removed or switched to private the methods you mentioned would be dangerous. Ended up keeping exposed
Also called out in the docs for each function the alternatives (i.e. |
Enet4
reviewed
Mar 16, 2024
Owner
Enet4
left a comment
There was a problem hiding this comment.
Thank you for the reiteration. Just some finishing touches and it should be ready.
* Add `value_at_mut`, `entry_at`, `entry_at_mut` and `update_value_at` methods on `InMemDicomObject` struct. * Add supporting methods to dependent objects
* Remove dangerous methods * Add documentation for new methods that are staying
- remove duplicate value_at method
4ab3571 to
6978b2c
Compare
- needless borrow in `.get(&tag)` - work around rust-analyzer bug in line 1023
41636bc to
7542ff5
Compare
Enet4
approved these changes
Apr 13, 2024
Owner
Enet4
left a comment
There was a problem hiding this comment.
OK, this is ready. Thank you @naterichman. 👍
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
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.
value_at_mut,entry_at,entry_at_mutandupdate_value_atmethods onInMemDicomObjectstruct.Let me know if this is something you would like, I'm finding I need something like this for a downstream application. I realize I can use the
update_valuemethod, but its nice to be able toupdate_valuewith anAttributeSelector. If there is a way to do that and I'm missing it, I'm happy to just update the docs to make that clearer instead of this PR.