Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update swatch to write .ase files in both py2/3
due to my misremembering of how bytes and strings work in python 3, the previous commit never really worked in python3.x for a variety of reasons, mostly due to my loosey-goosey handling of string and bytes. this makes it more consistent. updates lots of documentation and also documents part of the writer's internals, even though those are far more obvious and the code is pretty clear on that front. adds in two more test cases which the previous versions missed: 1. a swatch file with only one color. this catches two important issues: the left padded string being written out incorrectly and the color mode/rgb/etc not matching the keys in the mode index. 2. a swatch with a folder and one color, mostly here so that it can be tested to see if the folder-writing code is broken in a small test-case. the other tests are sort of ridiculous test harnesses since they're really overkill. maybe i'll change that, but it's nice to have some test on real legitimate style swatches.
- Loading branch information
Showing
9 changed files
with
75 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
v0.4.0, 04/16/2014 -- more tests, docs and module writes under py2.7 and py3.4 | ||
v0.2.9, 03/23/2014 -- swatch can write json files, round trip from ase->json->ase | ||
v0.2.3, 12/30/2012 -- Unit tests added under swatch/tests, CHANGES file added |
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
Binary file not shown.
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 @@ | ||
[{"swatches": [{"data": {"values": [1.0, 1.0, 1.0], "mode": "RGB"}, "type": "Process", "name": "White"}], "type": "Color Group", "name": "Whitefolder"}] |
Binary file not shown.
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 @@ | ||
[{"data": {"values": [1.0, 1.0, 1.0], "mode": "RGB"}, "type": "Process", "name": "White"}] |