Adopt community-base project rows for cohort page project badges

Đang mở
#437 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

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
25/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
backend

Hướng nghiên cứu

Read courses/views/course_projects.py and courses/coursework_badges.py, then inspect the candidate work and the community-base pull request for the C5.2k package release. Update the two named files and add courses/tests/test_course_project_pills.py, with CI configuration in scripts/ci.py and pyproject.toml. Done means the release is pinned, tests pass, and cohort-page labels, pills, links, and deadlines are unchanged.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

courses enhancement integration P1

Goal

Use the released shared project-row owner on DTC's cohort page and delete the local badge implementation, preserving every existing visible result and feature. The owner's instruction is code simplification with no visible UI changes.

Normative references

Scope and ownership

  • Adopt community_base.coursework.project_rows.project_row for the existing DTC learner project badge context.
  • Preserve the site's existing context attributes, including submitted state/time, score, badge text, Bootstrap badge class and DTC pill class. Keep the established four pill surfaces used by homework.
  • Delete ProjectBadgeData, base_project_badge, peer_review_project_badge, completed_project_badge and submitted_project_badge after checking their consumers.
  • Adopt an immutable released package tag containing C5.2k, with a matching lockfile and reviewed dependency consequences. v0.5.17 is the reviewed source candidate; it is not accepted merely because it is released.
  • Preserve the existing homework pending-change presentation through the pin update. Both courses/templates/homework_steps/_stepper.html and courses/templates/homework/homework.html consume this state.
  • Preserve package ownership of shared lifecycle/state rules. Any necessary DTC presentation adjustment must use a cohesive existing host boundary and avoid a parallel shared-state implementation.

The existing candidate is foreign uncommitted work on branch c5-project-lifecycle-adopt, worktree /data/agents/dtc-website/worktrees/c5-project-lifecycle-adopt, HEAD cfc21a90. Do not edit, reset, rebase or commit it until its owner explicitly transfers it. Use an independently owned worktree for new implementation. Shared main is read-only. Preserve frozen #439 work; it is not part of this issue.

Dependencies and delivery boundary

  • Released capability: satisfied. v0.5.17 resolves to 7e75eae92fcabbb686c58d99b237e563b764bb13; DTC currently pins v0.5.10.
  • #442 development recovery remains the integration prerequisite. No rebase, commit, merge, push or deployment of this dependent adoption before recovery is green. Read-only grooming and planning may proceed.
  • Ownership transfer is required before using or modifying the prepared candidate.
  • Normal engineer → independent tester → PM acceptance → original engineer commit → isolated integration → on-call stages remain required.
  • A local/path/branch package source is not a deliverable. Do not reset a database or perform a course-model/route cutover as part of this issue.

Behavior to preserve

Current local DTC projects do not expose uses_pooled_review; source inspection therefore finds the v0.5.17 pooled policy inactive for this adoption. Do not introduce that attribute or enable pooled/self-paced assessment here.

Project state No learner submission Learner submission
Closed Closed; wait pill Closed; wait pill
Collecting submissions Open; open pill Submitted; live pill
Peer reviewing Not submitted; wait pill Review; open pill until required reviews are complete, then Review completed; live pill
Completed Not submitted; wait pill Passed (score); mint pill, or Failed (score); wait pill

Keep the exact existing Bootstrap classes and score values as well as the labels above. Required review counts exclude optional reviews. Preserve existing row ordering, learner scoping and submission selection.

Canonical routes remain those produced by the existing named URLs:

  • cohort: /courses/<course_slug>/<cohort_identifier>.
  • cohort_project: the cohort path followed by /project/<project_slug>.
  • cohort_projects_eval: project path followed by /eval.
  • cohort_project_results: project path followed by /results.
  • cohort_homework_step: cohort path followed by /homework/<homework_slug>/<homework_step>.

Collecting projects link to submission, reviewing projects to evaluation, completed projects to results, and closed projects remain unlinked. Review deadlines display for submitted reviewing projects and completed projects; other rows retain submission deadlines. Preserve timestamps, timezone formatting, countdown markup and the completed note.

Checkbox status is a pin-adoption regression boundary: an accepted list ["2", "1"] and draft ["1", "2"] currently produce pending-change copy and the unsent-draft pill. Later package state normalization treats those selections as equivalent. Preserve DTC's current visible behavior at both render sites without altering stored answers or introducing another state machine.

Non-goals

No redesign, copy changes, new controls, package-template replacement, new routes, scoring changes, submission/review mutation changes, pooled/self-paced feature enablement, local model replacement or API contract changes. The released package may carry migrations; review and verify their compatibility without using this issue to adopt package course storage.

Acceptance criteria

  • Existing project badge branches use the released shared owner; the five local definitions are removed and their consumer scan is recorded.
  • Exact labels, Bootstrap classes, DTC pill classes, scores, submitted flags and submitted timestamps match the baseline for every state above, including submitted-closed and unsubmitted-review/completed rows.
  • Reviews below, at and above the required threshold retain the same result; optional reviews do not advance that threshold.
  • Existing project links, deadlines, countdowns, completed notes, row ordering and empty states are unchanged.
  • Anonymous and authenticated behavior, cohort/user isolation, access denials and existing API behavior remain unchanged. Rendering does not mutate submissions, reviews or enrollment.
  • Both homework status render sites retain baseline output for reordered checkbox selections, identical selections, changed selections, empty selections and no accepted submission. Other question/final-field edits, successful submission and rejected/stale writes retain existing draft-versus-accepted behavior.
  • Pin and lock reference the same immutable released tag. Dependency, migration, mail/job registration and template/context consequences are reviewed; no unintended feature activation or visible change results.
  • Query-count evidence shows no per-project query growth. Report application lines removed separately from tests and dependency changes.
  • Changed code follows the coding standard; existing oversized functions/files do not grow.
  • Baseline and adopted behavior evidence covers the changed contracts. The engineer records the exact frozen inputs and verification-plan digests; the independent tester recomputes the plan and completes every required component.
  • Independent desktop/mobile screenshots show the actual cohort and homework states, with unchanged copy, layout and controls; no required screenshot or browser evidence remains pending.
  • Tester passes, PM accepts and the resulting development deployment is green before this issue is considered done.

Verification scenarios

Django/integration:

  • Use synthetic cohorts and learners to exercise the full project matrix, review thresholds, score/flag/timestamp context, exact destinations and deadline markup.
  • Compare the checkbox/draft cases above on the baseline and adopted package, including both message and pill; prove stored accepted answers are unchanged.
  • Preserve cohort/user isolation, anonymous output, empty projects and constant query behavior.
  • Follow the generated verification plan for dependency-wide checks and migration compatibility; earlier local-link results are historical context only.

Browser:

  • On desktop and mobile, inspect a cohort containing open, submitted, reviewing, review-completed, passed, failed and closed projects. Follow the existing submission/review/results links and verify destination/access behavior.
  • Inspect homework Review and question pages with accepted answers, reordered saved checkbox selections and genuine edits. Check the status sentence and unsent-draft pill together, then submit and verify existing behavior.
  • Exercise a rejected/stale save and the existing empty/anonymous states. Use the graph-selected browser tier; template changes require the process's full browser tier.

Evidence status at grooming

The readiness review inspected DTC origin/main=ddb898e737f68d43bd47fc4f89d357fe32386fb6, the untouched prepared candidate and v0.5.17. It found source-level project-row compatibility and 38 net runtime lines removed in that candidate, plus 100 new test lines. No tests were executed for the readiness review or this grooming. All acceptance boxes remain unchecked.

Ngôn ngữ chính
Python
Star
0
Fork
0
Merge trung bình
37 phút
Pull request đã merge (30 ngày)
36

Chuẩn bị môi trường

  • Có Dockerfile hoặc tệp Docker Compose
  • Không có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của DataTalksClub/website

Tất cả issue của DataTalksClub/website

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.