luftfartsverket / reqstool-client

Reqstool is a tool for managing requirements with related software verification cases (aka tests) and verification results (test results)
https://luftfartsverket.github.io/reqstool-client/
MIT License
2 stars 0 forks source link

Change version/revision data type from str to a custom semantic version datatype #36

Closed lfvjimisola closed 7 months ago

lfvjimisola commented 7 months ago

This is needed for version comparision (sort by) etc to work nicely.

The library https://github.com/rbarrois/python-semanticversion does what we need but is has not been updated since 2022 and there are a lot of open issues and PRs. It's unclear if the project is still active and if we dare to use it.

Will try to get in contact with @rbarrois.

EDIT: Since, python 3.8 we can use

from packaging import version

# Parse version strings
v1 = version.parse("1.2.3")
v2 = version.parse("1.2.4")

# Compare versions
print(v1 < v2)  # Output: True
print(v1 == v2)  # Output: False
print(v1 > v2)  # Output: False
rbarrois commented 7 months ago

@lfvdavid for your information, python-semanticversion is still maintained! The API is quite stable, thus the lack of releases.

Feel free to open a question over there if you feel the need for something.

Best,

lfvjimisola commented 7 months ago

@rbarrois Thank you for the input. We opted to go with version in packaging.

BR, J