| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 | 2 |
| 3 """ | 3 """ |
| 4 Copyright 2014 Google Inc. | 4 Copyright 2014 Google Inc. |
| 5 | 5 |
| 6 Use of this source code is governed by a BSD-style license that can be | 6 Use of this source code is governed by a BSD-style license that can be |
| 7 found in the LICENSE file. | 7 found in the LICENSE file. |
| 8 | 8 |
| 9 ImagePairSet class; see its docstring below. | 9 ImagePairSet class; see its docstring below. |
| 10 """ | 10 """ |
| 11 | 11 |
| 12 # System-level imports | 12 # System-level imports |
| 13 import posixpath | 13 import posixpath |
| 14 | 14 |
| 15 # Local imports | 15 # Local imports |
| 16 import column | 16 import column |
| 17 import imagepair | 17 import imagediffdb |
| 18 | 18 |
| 19 # Keys used within dictionary representation of ImagePairSet. | 19 # Keys used within dictionary representation of ImagePairSet. |
| 20 # NOTE: Keep these in sync with static/constants.js | 20 # NOTE: Keep these in sync with static/constants.js |
| 21 KEY__ROOT__EXTRACOLUMNHEADERS = 'extraColumnHeaders' | 21 KEY__ROOT__EXTRACOLUMNHEADERS = 'extraColumnHeaders' |
| 22 KEY__ROOT__HEADER = 'header' | 22 KEY__ROOT__HEADER = 'header' |
| 23 KEY__ROOT__IMAGEPAIRS = 'imagePairs' | 23 KEY__ROOT__IMAGEPAIRS = 'imagePairs' |
| 24 KEY__ROOT__IMAGESETS = 'imageSets' | 24 KEY__ROOT__IMAGESETS = 'imageSets' |
| 25 KEY__IMAGESETS__FIELD__BASE_URL = 'baseUrl' | 25 KEY__IMAGESETS__FIELD__BASE_URL = 'baseUrl' |
| 26 KEY__IMAGESETS__FIELD__DESCRIPTION = 'description' | 26 KEY__IMAGESETS__FIELD__DESCRIPTION = 'description' |
| 27 KEY__IMAGESETS__SET__DIFFS = 'diffs' | 27 KEY__IMAGESETS__SET__DIFFS = 'diffs' |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 key_description: self._descriptions[0], | 150 key_description: self._descriptions[0], |
| 151 key_base_url: self._image_base_url, | 151 key_base_url: self._image_base_url, |
| 152 }, | 152 }, |
| 153 KEY__IMAGESETS__SET__IMAGE_B: { | 153 KEY__IMAGESETS__SET__IMAGE_B: { |
| 154 key_description: self._descriptions[1], | 154 key_description: self._descriptions[1], |
| 155 key_base_url: self._image_base_url, | 155 key_base_url: self._image_base_url, |
| 156 }, | 156 }, |
| 157 KEY__IMAGESETS__SET__DIFFS: { | 157 KEY__IMAGESETS__SET__DIFFS: { |
| 158 key_description: 'color difference per channel', | 158 key_description: 'color difference per channel', |
| 159 key_base_url: posixpath.join( | 159 key_base_url: posixpath.join( |
| 160 self._diff_base_url, 'diffs'), | 160 self._diff_base_url, imagediffdb.RGBDIFFS_SUBDIR), |
| 161 }, | 161 }, |
| 162 KEY__IMAGESETS__SET__WHITEDIFFS: { | 162 KEY__IMAGESETS__SET__WHITEDIFFS: { |
| 163 key_description: 'differing pixels in white', | 163 key_description: 'differing pixels in white', |
| 164 key_base_url: posixpath.join( | 164 key_base_url: posixpath.join( |
| 165 self._diff_base_url, 'whitediffs'), | 165 self._diff_base_url, imagediffdb.WHITEDIFFS_SUBDIR), |
| 166 }, | 166 }, |
| 167 }, | 167 }, |
| 168 } | 168 } |
| OLD | NEW |