desihub / desihub/fiberassign

code version check in python

Open
#412 0 comments 0 reactions 1 assignee Claimed by @araichoor View on GitHub
Dominant language
C++
Stars
9
Forks
10
Avg merge
2d 19h
Merged PRs (30d)
4

Description

In several places, the (fiberassign, desitarget, etc) code version is tested with a plain alphabetical string comparison test, e.g.:
https://github.com/desihub/fiberassign/blob/33c15ad9904091d185e6329a7f6f6e2575e81ed1/py/fiberassign/fba_launch_io.py#L38
That will not work for e.g. "1" < "10".

A possible fix would be to use the `packaging.version.parse()` function; besides, "master" version would need a special case treatment.

Thanks to @schlafly for identifying this and the suggestion!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.