-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add JSON rendering method for notebooks (#134)
* Add JSON rendering method for notebooks A new method `_repr_json_` was added to the base model in the SEG-Y schema. This method allows the model to be rendered as a JSON dictionary when using notebooks, improving data visualization during development. * Add test for JSON representation validation A test has been added in 'test_segy_file.py' to check the validity of the JSON-able dictionary representation. The test asserts the equivalence of the output from '_repr_json_' method and 'model_dump' method in 'json' mode. * remove manual JSON conversion since its now in models. --------- Co-authored-by: Altay Sansal <altay.sansal@tgs.com>
- Loading branch information
Showing
3 changed files
with
13 additions
and
8 deletions.
There are no files selected for viewing
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
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
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