siglo
siglo copied to clipboard
Sorting of version numbers such as 1.10.0
1.10.0 is sorted between 1.1.0 and 1.2.0, not after (or before, really) 1.9.0.

There's multiple potential fixes:
- use https://pypi.org/project/natsort/
- use
list.sort(key=lambda x: '{0:0>8}'.format(x).lower())
- use
list.sort(key=lambda x: [int(c) if c.isdigit() else c for c in re.split(r'(\d+)', x)])
- leave it as an exercise for the user to find the latest version
- use
random.shuffle(list)
but maybe only on april fools
- use
Probably somewhere around https://github.com/theironrobin/siglo/blob/main/src/quick_deploy.py#L51