AcademySoftwareFoundation / AcademySoftwareFoundation/rez
[Feature] Support for correct pre-release version sorting
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Python
- Star
- 1.1k
- Fork
- 374
- Merge trung bình
- 9 ngày 12 giờ
- Pull request đã merge (30 ngày)
- 5
Mô tả
Both PEP 440 versions and SemVar 2.0 versions may contain pre-release (and other) version information besides just maj/min/patch.
Both PEP 440 and SemVar 2.0 utilize different sorting behavior for pre-releases than the default alphanumeric sort used by rez. For example, this is the expected sort order under PEP 440:
1.0.0-a11.0.0b11.0.0.rc11.0.0
The default rez sort will sort them like this, with the base version before the pre-releases, and also doesn't support the pre-release separator being optional:
1.0.01.0.0-a11.0.0.rc11.0.0b1
To maintain backwards compatibility, a config option could be added to enable support for this sorting behavior -- maybe use_pep440_versioning? With the expectation that if the package version isn't a valid PEP 440 version, it simply falls back to the normal alphanumeric sorting behavior.
This also raises another question of whether the version module should be vendored or not and instead be moved into rez proper, since it's already a pretty significant fork from the original and if we want it to be config aware, it should probably be moved into rez.
It may make sense to separate this ticket (and the config option) into two different options -- one for PEP 440 and one for SemVar 2.0, since they are different enough that someone may want one behavior and not the other. For this ticket, I'm mainly concerned with PEP 440 style versioning. I included SemVar 2.0 just to show it's not an issue unique to python packaging.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng việc xem xét module phiên bản vendored hiện có và các đường dẫn hiện tại của Rez cho việc sắp xếp phiên bản và cấu hình. So sánh hành vi hiện tại với các ví dụ của PEP 440, sau đó xác định phạm vi cấu hình và xác minh rằng các phiên bản PEP 440 hợp lệ được sắp xếp chính xác, trong khi các phiên bản không hợp lệ vẫn giữ nguyên fallback chữ và số hiện có.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- tooling
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 30/100