Type-hint coverage audit: ~75% overall, parameter annotations lagging in several modules
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 52/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- python
- Lĩnh vực
- computer-vision
Hướng nghiên cứu
Bắt đầu với src/machinevisiontoolbox/cvfuncs.py, ImageCore.py, Sources.py, ImageRegionFeatures.py, BagOfWords.py và ImageBlobs.py, so sánh các annotation của chúng với quy ước typing hiện có của dự án và các module được annotation đầy đủ như mvtb_types.py. Thêm các annotation còn thiếu cho tham số bằng các dạng hiện đại được nêu, đồng thời giữ nguyên hành vi; hoàn tất khi đã xử lý sáu module có độ bao phủ thấp nhất.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Found 2026-08-10 while reviewing unmerged branches during a cleanup pass. An old typing branch (base commit 2022-10-18, predates the src/-layout restructure) attempted a broader typing pass but is no longer mergeable — its module paths no longer exist. Later, separate efforts did land on main (e.g. acc8222b, 524c7b8c, PR #32/fix/annotations-and-deprecation-warnings), so coverage today is real but partial, not complete.
An AST-based audit of parameter/return annotations across src/machinevisiontoolbox gives:
OVERALL: 54.3% params, 95.4% returns, 74.9% average
Return-type coverage is already strong almost everywhere (many modules at 100%); the gap is almost entirely on parameter annotations. Full per-module breakdown, sorted by average:
Module Param % Return % Avg %
cvfuncs.py 100.0% 0.0% 50.0%
ImageCore.py 30.9% 94.7% 62.8%
Sources.py 38.0% 91.1% 64.6%
ImageRegionFeatures.py 31.0% 100.0% 65.5%
BagOfWords.py 39.1% 95.7% 67.4%
ImageBlobs.py 38.0% 100.0% 69.0%
ImageConstants.py 72.3% 71.4% 71.9%
ImageMultiview.py 68.2% 83.3% 75.8%
ImageIO.py 58.5% 93.3% 75.9%
ImageWholeFeatures.py 55.6% 97.6% 76.6%
ImageProcessing.py 68.0% 86.4% 77.2%
ImagePointFeatures.py 55.6% 100.0% 77.8%
BundleAdjust.py 56.0% 100.0% 78.0%
VisualServo.py 63.2% 93.2% 78.2%
Kernel.py 57.5% 100.0% 78.8%
PointCloud.py 57.9% 100.0% 78.9%
Camera.py 61.3% 99.0% 80.1%
ImageColor.py 60.9% 100.0% 80.4%
ImageFiducials.py 69.6% 94.1% 81.9%
ImageLineFeatures.py 66.7% 100.0% 83.3%
ImageReshape.py 72.8% 96.0% 84.4%
ImageMorph.py 77.1% 100.0% 88.5%
ImageTensor.py 77.8% 100.0% 88.9%
ImageSpatial.py 78.7% 100.0% 89.4%
camera_derivatives.py 100.0% 100.0% 100.0%
decorators.py 100.0% 100.0% 100.0%
docbugs.py 100.0% 100.0% 100.0%
fiducial.py 100.0% 100.0% 100.0%
mvtb_types.py 100.0% 100.0% 100.0%
Fix
Work through the lowest-param-coverage modules first (cvfuncs.py, ImageCore.py, Sources.py, ImageRegionFeatures.py, BagOfWords.py, ImageBlobs.py — all under 40% param coverage), adding modern X | Y / X | None / list[X] annotations per the project's typing convention. No architectural changes needed, just incremental annotation additions per module.
- Ngôn ngữ chính
- Python
- Star
- 220
- Fork
- 30
- Merge trung bình
- 12 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 5
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
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.
Issue khác của petercorke/machinevision-toolbox-python
-
tech-debt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
tech-debt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
-
tech-debt
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
-
tech-debt
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 76/100
-
tech-debt
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Tất cả issue của petercorke/machinevision-toolbox-python
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
-
hcocena Đang mởpolicies-accepted pre-review precheck-passed
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Bioconductor/BiocContributions#214 · 5 bình luận ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
TencentCloud/Octop#1169 · 1 bình luận ·
-
[开源推荐] 在老板拷问你之前,先让 AI 灵魂拷问你 Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
521xueweihan/HelloGitHub#3778 ·
-
The version checker's trailing attribute region has no control for a less-than inside a quoted value Đang mởarea: dashboard area: tests bug perceived difficulty: 2 python
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Nitjsefnie-Harness-Commons/daedalus#1105 · 1 bình luận ·