TagStudio icon indicating copy to clipboard operation
TagStudio copied to clipboard

[Feature Request]: Easy test of current version of TagStudio

Open un-pogaz opened this issue 11 months ago • 1 comments

Checklist

  • [X] I am using an up-to-date version.
  • [X] I have read the documentation.
  • [X] I have searched existing issues.

Description

[Forward features for plugins]

Add a easy way to test the current version of TagStudio running (a string is not a handy format)

Solution

Adding a numeric tuple version (see #635)

VERSION_NUMERIC: tuple[int, int, int] = (9, 5, 0) # Major, Minor, Patch

if VERSION_NUMERIC >= (9, 5, 0):
    # is SQL database
else:
    # is JSON database

Alternatives

No response

un-pogaz avatar Dec 11 '24 11:12 un-pogaz

This is pretty standard in python, there are packages (I think builtin even?) to parse the __version__ into a Version class and perform comparisons against them

Tishj avatar Jan 06 '25 16:01 Tishj