jjmccollum / teiphy

A Python package for converting TEI XML collations to NEXUS, BEAST 2.7 XML, and other formats
MIT License
11 stars 3 forks source link

Relative path to chron file for stemma output #73

Closed rbturnbull closed 1 year ago

rbturnbull commented 1 year ago

Hi @jjmccollum - at the moment the stemma chron file is given as an absolute path in the stemma output. Is it possible for this to be a relative path from the stemma file so that if you move the directories (or post them online) the paths can still work?

jjmccollum commented 1 year ago

@rbturnbull It looks like collation.py already imports Path from the pathlib module, so I'm sure it's possible to get the relative path using that.

jjmccollum commented 1 year ago

@rbturnbull All fixed! The to_stemma method should now write the relative path to the chron file (using the system-appropriate path separator) in the main STEMMA output. This is passing the STEMMA CI test, but if you notice any other issues with this, please let me know!