[Onboarding + Enrollments] Canonical course-format validator only
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 91/100
Hướng nghiên cứu
Đọc ràng buộc cơ sở dữ liệu trong supabase/schemas/dogpack/tables/enrollments.sql và làm theo hướng dẫn thiết lập tại docs/getting-started/first-contribution.md. Thêm các hàm Dart thuần vào lib/onboarding/course_code.dart và kiểm thử các trường hợp được liệt kê cùng tính hợp lệ của đầu ra trong test/course_code_test.dart. Chạy flutter test test/course_code_test.dart; hoàn thành khi các trường hợp examples và các trường hợp bổ sung đều vượt qua, đồng thời mọi giá trị đã chuẩn hóa đều thỏa mãn biểu thức chính quy của cơ sở dữ liệu.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What to build
Check whether a course code already matches DogPack’s required format, such as CSCI 1301. This helper only accepts or rejects the input; the following task handles friendlier typed spellings.
Files
lib/onboarding/course_code.dart(new file)- Starting example: supabase/schemas/dogpack/tables/enrollments.sql
Code to add or extend:bool isValidCourseCode(String input).
Steps
- Add isValidCourseCode(input) using RegExp(r"^[A-Z]{4} [0-9]{4}[A-Z]?$").firstMatch(input).
- Accept only when
match.startis 0 andmatch.endequalsinput.length. This prevents a trailing newline from being accepted as a complete match. - Check CSCI 1301 and CSCI 1301L; reject lowercase, a trailing newline, the wrong number of letters/digits and extra text. This function checks the standard form without changing it.
Example
CSCI 1301/CSCI 1301L accepted; lowercase, trailing newline,3 letters,5 digits,extra text rejected.
Check it works
In test/onboarding/course_code_7_test.dart, check the example above and the failure or limit described in the steps. Run flutter test test/onboarding/course_code_7_test.dart and flutter analyze.
References
Assign yourself before starting, or comment to claim the issue. Project setup.
- Ngôn ngữ chính
- PLpgSQL
- Star
- 0
- Fork
- 0
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc 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.
Issue khác của DevDogsUGA/DogPack
-
polish
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
DevDogsUGA/DogPack#131 ·
-
polish
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
DevDogsUGA/DogPack#130 ·
-
moderation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
DevDogsUGA/DogPack#119 ·
-
moderation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
DevDogsUGA/DogPack#113 ·
-
discover
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
DevDogsUGA/DogPack#106 ·
Tất cả issue của DevDogsUGA/DogPack
Issue tương tự
-
Backend enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
"Contains" page watch never matches when its text has a trailing spaceCó thể đã có người làm @RaphaelFakhri đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
CopilotKit/openmuse#184 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
SACGF/variantgrid#2341 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
apache/rocketmq-dashboard#7039 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
pdfium-drift
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
Stirling-Tools/JPDFium#176 ·
Maintainer thường phản hồi trong vòng 1 ngày