-
-
Notifications
You must be signed in to change notification settings - Fork 262
Feature/json io #1013
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
Feature/json io #1013
Conversation
- Add JSON I/O module with schema definitions - Implement surface points loading functionality - Add comprehensive test suite for surface points I/O - Create tutorial demonstrating JSON I/O usage
- Add orientation schema and loading methods - Implement orientation data validation and polarity handling - Add comprehensive test suite for orientation loading - Fix polarity handling in test data
- Create tutorial demonstrating JSON I/O with horizontal stratigraphic model - Add sample JSON file with model data - Include surface points and orientations for two horizontal layers
…id_to_name mapping from surface IDs to names - Update surface points and orientations loading to use actual surface names - Fix issue with surface names not matching between structural frame and series
…odel computation - Update surface points and orientations to match original CSV files - Add model computation step before plotting - Fix plot display using Agg backend
…oading and saving models
…s work, some problems with fault relations still remaining.
…ns requried; standard stack created by default based on point/ orientation ids.
…lization - Fixed series mapping, fault orientation, and plotting
…r visualization, fix surface points plotting, add colorbar and labels
…ervation, fixed color assignment to structural elements
…r assertions in test_multiple_series_relationships and test_combination_model
|
Hi,
Cheers, |
|
Thanks a lot for the checks and the comments, @javoha!
Anyway, I'd say both are rather minor aspects, can be adjusted after the merge :-) |
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.
Looks good. I think this feature should be part of the core gempy functionality. In the future we should include the possibility to store results. Thanks @flohorovicic!
|
gempy/init.py:10: in |
…r via typing_extensions fallback
|
(Previous fail seems to be related to CI running Python 3.10 - now included an option that should work for 3.10 and >+ 3.11) |
Added a fallback import for `NotRequired` from `typing_extensions` to maintain compatibility with Python versions that lack native support for this typing feature.
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.
Checks are green here. Very good encapsulated in a module. If it becomes a widely used feature, we will have to create a couple of functions on the API to expose them in gp. but for now we can leave as is since it is well documented.
The only risky aspect I see, is the redundancy in classes. Ideally we will move to have a single definition of "Surface" for example where some of the fields are serializable. Otherwise we can end up having the schema and the core object out of sync. In any case this is something I (or anybody with a lot of time allocated for thinking of this) can do in the future
Merge activity
|
Description
This PR introduces JSON input/output functionality to GemPy, allowing users to save and load geological models in JSON format. This new feature provides:
The JSON format offers several advantages:
The implementation includes:
JsonIOclass withsave_model_to_jsonandload_model_from_jsonmethodsKey improvements in latest commits:
Relates to #1003
Checklist