bjmorgan / kinisi

A Python package for estimating diffusion properties from molecular dynamics simulations.
https://kinisi.readthedocs.io
MIT License
49 stars 11 forks source link

hdf extension handling #34

Closed alexsquires closed 1 year ago

alexsquires commented 1 year ago

My proposed solution to #33

arm61 commented 1 year ago

What happens if a user gives the file name my_file? (Sorry only reading not testing so this is a genuine question).

alexsquires commented 1 year ago

It works, because the split(".") returns the whole string in a single element list.

In [5]: "my_file".split(".")
Out[5]: ['my_file']

In [6]: "my_file".split(".")[0] + ".hdf"
Out[6]: 'my_file.hdf'
arm61 commented 1 year ago

Ahh even if there is no full stop! Nice one.

I don’t think this functionality is covered by tests at all yet. Could you add them and we can bump the 91% coverage up a bit?

alexsquires commented 1 year ago

Oops. Missing a CI dependancy again

arm61 commented 1 year ago

Looks good to me! Let’s merge.

arm61 commented 1 year ago

Thanks @alexsquires, another awesome contribution.