-
Notifications
You must be signed in to change notification settings - Fork 9
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
Added deprecation warning to Transformation.dump/load; removed ExplicitMoleculeComponent.to_json/from_json #460
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #460 +/- ##
==========================================
- Coverage 98.52% 98.43% -0.10%
==========================================
Files 39 39
Lines 2166 2168 +2
==========================================
Hits 2134 2134
- Misses 32 34 +2 ☔ View full report in Codecov by Sentry. |
I need to add an explicit test for the ability to load |
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.
Very brief review - looks good to me but couple of comments.
deserialized = json.loads(content, cls=JSON_HANDLER.decoder) | ||
try: | ||
return cls.from_keyed_chain(keyed_chain=deserialized) | ||
except: |
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.
Can we do a non-bare except here? I.e. is the error deterministic?
@@ -121,6 +121,10 @@ def dump(self, file): | |||
file : Union[PathLike, FileLike] | |||
A pathlike of filelike to save this transformation to. | |||
""" | |||
warnings.warn( |
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.
A nice to have here would be to add a test for these warnings.
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.
I agree with @IAlibay on the tests and bare exception, nothing additional though.
Closes #375, #458.
Also allows us to read
GufeTokenizable
s serialized previously indict
representation via.from_json
.Tips
Since this will create a commit, it is best to make this comment when you are finished with your work.
Checklist
news
entryDevelopers certificate of origin