tskit-dev / tsconvert

Utilities for converting tree sequences to and from other formats
MIT License
7 stars 6 forks source link

Standardise API #27

Open benjeffery opened 3 years ago

benjeffery commented 3 years ago

Each format should have two methods for each direction it supports:

to_{format_name}(ts, file or path, /, ...) to_{format_name}_str(ts, /, ...) from_{format_name}(file or path, /, ...) from_{format_name}_str(string, /, ...)

The string versions can use StringIO to wrap the file versions.