-
Notifications
You must be signed in to change notification settings - Fork 0
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
refactor: ♻️ user Properties
classes in user facing functions
#976
Merged
lwjohnst86
merged 8 commits into
main
from
refactor/use-properties-classes-in-userfacing-functions
Jan 22, 2025
Merged
refactor: ♻️ user Properties
classes in user facing functions
#976
lwjohnst86
merged 8 commits into
main
from
refactor/use-properties-classes-in-userfacing-functions
Jan 22, 2025
Conversation
This file contains 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
Based on the work by @martonvago in 498e1b9.
… to `dict` internally
signekb
changed the title
feat: ✨ add from_dict method to Properties
refactor: ♻️ user Jan 20, 2025
Properties
classes in user facing functions
signekb
commented
Jan 20, 2025
signekb
commented
Jan 20, 2025
signekb
commented
Jan 20, 2025
lwjohnst86
previously approved these changes
Jan 20, 2025
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.
Nice! Looks good
martonvago
requested changes
Jan 20, 2025
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.
Yay! 🚀
I will use this as a base for #974
3 tasks
2 tasks
Actually testing the same as `test_throws_error_if_new_properties_are_empty()`, since a custom field is removed anyway.
martonvago
previously approved these changes
Jan 21, 2025
lwjohnst86
deleted the
refactor/use-properties-classes-in-userfacing-functions
branch
January 22, 2025 08:45
lwjohnst86
added a commit
that referenced
this pull request
Jan 27, 2025
## Description This PR refactors `edit_package_properties` to use the check functions. Once #976 is merged in, I will update this PR with those changes. <-- Done! :heavy_check_mark: <!-- Select quick/in-depth as necessary --> This PR needs an in-depth review. ## Checklist - [x] Added or updated tests - [x] Updated documentation - [x] Ran `just run-all` --------- Co-authored-by: Luke W. Johnston <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Signe Kirk Brødbæk <[email protected]> Co-authored-by: Luke W. Johnston <[email protected]>
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.
Description
This PR changes the input type (and output type, when it's relevant) to a
Properties
class in the user facing functions.This means that the functions take a
Properties
class as input, but transforms it to adict
before handling it to thechecks
. Before returning, theproperties
object is transformed back to aProperties
class using a new methodfrom_dict
based on the work by @martonvago. For this method, we needed a new dependency (dacite
).Closes #970
This PR needs an in-depth review.
Checklist
just run-all