4dn-dcic / utils

various util modules shared amongst several projects in our organization
MIT License
4 stars 1 forks source link

Topological Sort #232

Closed drio18 closed 1 year ago

drio18 commented 1 year ago

Here, we include new classes for performing a topological sort into misc_utils. I found myself of need of this for work in the cgap-portal repo, and we're using something similar in magma, so I figured I would pull this here for wider use.

As mentioned in comments, the source code was essentially copied from python's graphlib module which is only available in versions >=3.9. I added some simple tests to ensure high-level functionality but far from exhaustive given the source.

coveralls commented 1 year ago

Pull Request Test Coverage Report for Build 3831563546


Changes Missing Coverage Covered Lines Changed/Added Lines %
dcicutils/misc_utils.py 94 108 87.04%
<!-- Total: 94 108 87.04% -->
Totals Coverage Status
Change from base Build 3622858250: 0.2%
Covered Lines: 5898
Relevant Lines: 8015

💛 - Coveralls