flatironinstitute / ironclust

Spike sorting software being developed at Flatiron Institute, based on JRCLUST (Janelia Rocket Cluster)
Apache License 2.0
28 stars 7 forks source link

Add a file that contain version inside the code #39

Closed samuelgarcia closed 4 years ago

samuelgarcia commented 4 years ago

Hi James,

At the moment  python spikesorters.print_sorter_version()   give

herdingspikes: unknown
ironclust: 5.0.8
kilosort: unknown
kilosort2: unknown
klusta: 3.0.16
mountainsort4: unknown
spykingcircus: 0.9.0
tridesclous: 1.4.2

but the version is har coded inside the class

class IronClustSorter(BaseSorter):
   ...
    @staticmethod
    def get_sorter_version():
        return '5.0.8'

this is a bad idea because if you change of version in IC and SF2 this is not tracked in spikesorters. I think the best option would to have a file version.m inside your code that would contain the version as a string:

version = "5.0.8"

This file could be parse on the fly and so the version would dynamic from source code.

What do you think ?

Best

Samuel

samuelgarcia commented 4 years ago

https://github.com/MouseLand/Kilosort2/issues/182

https://github.com/magland/ml_ms4alg/issues/22

https://github.com/flatironinstitute/ironclust/issues/39

jamesjun commented 4 years ago

As requested by Sam version.txt contains 'version' and 'date' fields. For example,

version = '5.6.9'
date = '2/6/2020'

The date is in MM/DD/YYYY format. IronClust returns version and date by reading from version.txt:

irc2 version
samuelgarcia commented 4 years ago

Hi James, this is totaly perfect. thank you. Sam