Skip to content

Commit 7210eec

Browse files
authored
Merge pull request #39 from marqh/fixups
sort attrs
2 parents 59be88f + 7cb2d2b commit 7210eec

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

lib/bald/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,7 @@ def _graph_elem_attrs(self, remaining_attrs):
381381
vstr = ', '.join(vstrlist)
382382

383383
attrs.append("'{}'".format(kstr + vstr))
384+
attrs.sort()
384385

385386
attrs = ''.join(['[' + ', '.join(attrs) + ']'])
386387
avar = "var {var} = instance('{var}:{type}', {attrs}, '#878800');"

lib/bald/tests/integration/HTML/multi_array_reference.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,10 @@
179179
var pdim0 = instance('pdim0:<a xlink:href="http://binary-array-ld.net/latest/Array" xlink:show=new text-decoration="underline">bald__Array</a>, <a xlink:href="http://binary-array-ld.net/latest/Reference" xlink:show=new text-decoration="underline">bald__Reference</a>', ['<a xlink:href="http://binary-array-ld.net/latest/array" xlink:show=new text-decoration="underline">bald__array</a>: |', '<a xlink:href="http://binary-array-ld.net/latest/shape" xlink:show=new text-decoration="underline">bald__shape</a>: 11'], '#878800');
180180
var pdim1 = instance('pdim1:<a xlink:href="http://binary-array-ld.net/latest/Array" xlink:show=new text-decoration="underline">bald__Array</a>, <a xlink:href="http://binary-array-ld.net/latest/Reference" xlink:show=new text-decoration="underline">bald__Reference</a>', ['<a xlink:href="http://binary-array-ld.net/latest/array" xlink:show=new text-decoration="underline">bald__array</a>: |', '<a xlink:href="http://binary-array-ld.net/latest/shape" xlink:show=new text-decoration="underline">bald__shape</a>: 17'], '#878800');
181181
var root = instance('root:<a xlink:href="http://binary-array-ld.net/latest/Container" xlink:show=new text-decoration="underline">bald__Container</a>', ['<a xlink:href="http://binary-array-ld.net/latest/contains" xlink:show=new text-decoration="underline">bald__contains</a>: |'], '#878800');
182-
var variable1 = instance('variable1:<a xlink:href="http://binary-array-ld.net/latest/Array" xlink:show=new text-decoration="underline">bald__Array</a>', ['<a xlink:href="http://binary-array-ld.net/latest/references" xlink:show=new text-decoration="underline">bald__references</a>: |', 'long_name: Gerald', 'obtype: <a xlink:href="http://codes.wmo.int/common/observation-type/METCE/2013/SamplingObservation" xlink:show=new text-decoration="underline">metce__SamplingObservation</a>', '<a xlink:href="http://binary-array-ld.net/latest/shape" xlink:show=new text-decoration="underline">bald__shape</a>: 11, 17'], '#878800');
183-
var variable1_pdim0_ref = instance('variable1_pdim0_ref:<a xlink:href="http://binary-array-ld.net/latest/Reference" xlink:show=new text-decoration="underline">bald__Reference</a>, <a xlink:href="http://binary-array-ld.net/latest/Subject" xlink:show=new text-decoration="underline">bald__Subject</a>', ['<a xlink:href="http://binary-array-ld.net/latest/childBroadcast" xlink:show=new text-decoration="underline">bald__childBroadcast</a>: 1, 11', '<a xlink:href="http://binary-array-ld.net/latest/array" xlink:show=new text-decoration="underline">bald__array</a>: |'], '#878800');
184-
var variable2 = instance('variable2:<a xlink:href="http://binary-array-ld.net/latest/Array" xlink:show=new text-decoration="underline">bald__Array</a>', ['<a xlink:href="http://binary-array-ld.net/latest/references" xlink:show=new text-decoration="underline">bald__references</a>: |', 'long_name: Imelda', 'obtype: <a xlink:href="http://codes.wmo.int/common/observation-type/METCE/2013/SamplingObservation" xlink:show=new text-decoration="underline">metce__SamplingObservation</a>', '<a xlink:href="http://binary-array-ld.net/latest/shape" xlink:show=new text-decoration="underline">bald__shape</a>: 11, 17'], '#878800');
185-
var variable2_pdim0_ref = instance('variable2_pdim0_ref:<a xlink:href="http://binary-array-ld.net/latest/Reference" xlink:show=new text-decoration="underline">bald__Reference</a>, <a xlink:href="http://binary-array-ld.net/latest/Subject" xlink:show=new text-decoration="underline">bald__Subject</a>', ['<a xlink:href="http://binary-array-ld.net/latest/childBroadcast" xlink:show=new text-decoration="underline">bald__childBroadcast</a>: 1, 11', '<a xlink:href="http://binary-array-ld.net/latest/array" xlink:show=new text-decoration="underline">bald__array</a>: |'], '#878800');
182+
var variable1 = instance('variable1:<a xlink:href="http://binary-array-ld.net/latest/Array" xlink:show=new text-decoration="underline">bald__Array</a>', ['<a xlink:href="http://binary-array-ld.net/latest/references" xlink:show=new text-decoration="underline">bald__references</a>: |', '<a xlink:href="http://binary-array-ld.net/latest/shape" xlink:show=new text-decoration="underline">bald__shape</a>: 11, 17', 'long_name: Gerald', 'obtype: <a xlink:href="http://codes.wmo.int/common/observation-type/METCE/2013/SamplingObservation" xlink:show=new text-decoration="underline">metce__SamplingObservation</a>'], '#878800');
183+
var variable1_pdim0_ref = instance('variable1_pdim0_ref:<a xlink:href="http://binary-array-ld.net/latest/Reference" xlink:show=new text-decoration="underline">bald__Reference</a>, <a xlink:href="http://binary-array-ld.net/latest/Subject" xlink:show=new text-decoration="underline">bald__Subject</a>', ['<a xlink:href="http://binary-array-ld.net/latest/array" xlink:show=new text-decoration="underline">bald__array</a>: |', '<a xlink:href="http://binary-array-ld.net/latest/childBroadcast" xlink:show=new text-decoration="underline">bald__childBroadcast</a>: 1, 11'], '#878800');
184+
var variable2 = instance('variable2:<a xlink:href="http://binary-array-ld.net/latest/Array" xlink:show=new text-decoration="underline">bald__Array</a>', ['<a xlink:href="http://binary-array-ld.net/latest/references" xlink:show=new text-decoration="underline">bald__references</a>: |', '<a xlink:href="http://binary-array-ld.net/latest/shape" xlink:show=new text-decoration="underline">bald__shape</a>: 11, 17', 'long_name: Imelda', 'obtype: <a xlink:href="http://codes.wmo.int/common/observation-type/METCE/2013/SamplingObservation" xlink:show=new text-decoration="underline">metce__SamplingObservation</a>'], '#878800');
185+
var variable2_pdim0_ref = instance('variable2_pdim0_ref:<a xlink:href="http://binary-array-ld.net/latest/Reference" xlink:show=new text-decoration="underline">bald__Reference</a>, <a xlink:href="http://binary-array-ld.net/latest/Subject" xlink:show=new text-decoration="underline">bald__Subject</a>', ['<a xlink:href="http://binary-array-ld.net/latest/array" xlink:show=new text-decoration="underline">bald__array</a>: |', '<a xlink:href="http://binary-array-ld.net/latest/childBroadcast" xlink:show=new text-decoration="underline">bald__childBroadcast</a>: 1, 11'], '#878800');
186186
link(location_variable, location_reference_system, 'bald__references');
187187
link(location_variable, location_variable, 'bald__array', 'bottom');
188188
link(pdim0, pdim0, 'bald__array', 'bottom');

0 commit comments

Comments
 (0)