Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a file that contain version inside the code #39

Closed
samuelgarcia opened this issue Jan 28, 2020 · 3 comments
Closed

Add a file that contain version inside the code #39

samuelgarcia opened this issue Jan 28, 2020 · 3 comments

Comments

@samuelgarcia
Copy link

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
Copy link
Author

@jamesjun
Copy link
Collaborator

jamesjun commented Feb 6, 2020

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

@jamesjun jamesjun closed this as completed Feb 6, 2020
@samuelgarcia
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants