kalekundert / freezerbox

MIT License
0 stars 0 forks source link

make: output targets in a consistent order #19

Closed kalekundert closed 3 years ago

kalekundert commented 3 years ago

Every time I run the command sw make p172, the 7 PCR reactions appear in a different order. This is confusing if I print out the protocol one, set some things up, realize a mistake, corrrect it, and print a new protocol.

If I remember right, the code does make an effort to keep reagents in the order they appear on the command line. But that doesn't help for automatically-identified dependencies. In this case, I should probably just do a natsort on the product names.

kalekundert commented 3 years ago

Just took a brief look at the code: the groups are sorted in order of appearance on the CLI, but the individual items within each group are not sorted. I don't quite understand how the order ends up getting randomized, but it might have to do with how networkx stores edges.