-
Notifications
You must be signed in to change notification settings - Fork 118
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
python: add support for formats #436
Merged
Merged
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
vanyauhalin
force-pushed
the
feature/python-matrix-formats
branch
from
July 28, 2023 14:01
bb48d77
to
c06f2a5
Compare
vanyauhalin
force-pushed
the
feature/python-matrix-formats
branch
from
August 11, 2023 15:06
c06f2a5
to
987440a
Compare
rivexe
approved these changes
Aug 15, 2023
vanyauhalin
force-pushed
the
feature/python-matrix-formats
branch
2 times, most recently
from
August 16, 2023 10:54
f1f7fa8
to
8a0e6b0
Compare
vanyauhalin
force-pushed
the
feature/python-matrix-formats
branch
from
August 22, 2023 08:49
8a0e6b0
to
f33071c
Compare
Pending #445. |
vanyauhalin
force-pushed
the
feature/python-matrix-formats
branch
from
August 25, 2023 05:31
f33071c
to
e721f26
Compare
vanyauhalin
force-pushed
the
feature/python-matrix-formats
branch
from
August 25, 2023 06:06
e721f26
to
ccb81a6
Compare
@aleksandrfedorov97, please take a look at the new changes. I've replaced my "bike" that parses JSON objects to Python classes. Furthermore, I've also added memorization for the high-cost method in the |
aleksandrfedorov97
approved these changes
Aug 30, 2023
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.
In this pull request, I've added the Codable module that I wrote while refactoring the history module to encode and decode JSON objects. The algorithm for converting to Codable instances is far from efficient, but it's simple and compatible with new Python features.
Maybe in the future, it would be worth replacing the local implementation with an external dependency that provides the same functionality, such as the relatively popular dataclasses-json. However, currently, this library isn't very friendly with type annotations (see issues) and has difficulties with type inference (see #227).
On the other hand, we can simply keep this implementation as it's because it's doing a great job.
Pending #435.