Skip to content

Minimal partitions based on ordering constraints

Notifications You must be signed in to change notification settings

vidstige/partition

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

partition

Partitions a list according to some discrete ordering, e.g.

wheel < numpy
numpy < scikit

Then using an input like this

scikit
numpy
more-stuff
wheel

it can partition it into three parts by running the module

$python -m partition test/order.txt test/requirements.txt

['wheel']
['numpy']
['scikit', 'more-stuff']

Returns a sequence of list, with the minimal number of parts needed to satisfy all conditions.

About

Minimal partitions based on ordering constraints

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages