-
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.
Implement Extension from_json, and fix bug with default color from json
- Loading branch information
1 parent
9b9e401
commit 819d0d8
Showing
2 changed files
with
41 additions
and
11 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
Edit: Click on the commit link to see which line I commented on.
@dave-doty I notice a bug here where the
color_str
will have typeColor
instead ofstr
in the case wherecolor_key
is not stored in thejson_map
. This type issue leads to a problem in the line below:I fixed the problem in this commit by removing the use of the optional parameter in
Dict.get
and assigning the color variable here:scadnano-python-package/scadnano/scadnano.py
Lines 2915 to 2917 in 819d0d8
Just thought I would let you know. This was discovered by a test case I wrote that does not include a color field in the strand object:
scadnano-python-package/tests/scadnano_tests.py
Lines 4856 to 4864 in 819d0d8