-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(EyeVolumeMeta): fixes saving issue by storing all dates as string…
… in isoformat to avoid problems with dumping to json and loading
- Loading branch information
Showing
10 changed files
with
438 additions
and
436 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import eyepy as ep | ||
|
||
|
||
def test_eyevolumemeta_json_conversion(): | ||
meta_dict = { | ||
'scale_z': | ||
1, | ||
'scale_x': | ||
1, | ||
'scale_y': | ||
1, | ||
'scale_unit': | ||
'px', | ||
'bscan_meta': [{ | ||
'start_pos': (0, 0), | ||
'end_pos': [10, 0], | ||
'pos_unit': 'px' | ||
}, { | ||
'start_pos': (0, 1), | ||
'end_pos': [10, 1], | ||
'pos_unit': 'px' | ||
}] | ||
} | ||
|
||
evm = ep.EyeVolumeMeta.from_dict(meta_dict) | ||
assert evm.as_dict() == meta_dict |