D3.1 phase 2: Switch course-platform readers to courses.LearnerProfile
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
調査の方向性
D3.1のソース、フェーズ1のissue #390、および一覧にあるview、form、service、APIファイル、galleryモジュールを対象に、grepで裏付けたインベントリから始めます。Djangoのchecksと関連するテストスイートを実行し、galleryのリグレッションテストとPlaywrightのcoreテストも含めます。完了の条件は、10個すべてのフィールドがuser.learner_profileを介して読み書きされ、galleryへのアクセスが固定されたままで、受け入れチェックに合格することです。
索引モデルが issue の本文から書いたものです。
説明
Part of the D3.1 umbrella (#334): phase 2 of 6. Switches the course-platform reader surface for the ten courses.LearnerProfile fields, refreshed against current main.
Normative sources
| Source | What it governs |
|---|---|
community-base repo: docs/plan/phase-3.md D3.1; docs/03-playbooks.md P7 DTC step 3 (reader rewrite) |
Reader-migration expectation |
| Phase 1 issue (#390) | courses.LearnerProfile model this phase reads/writes |
Goal
Every read and write of role, certificate_name, country, region, registration_role, github_url, linkedin_url, personal_website_url, about_me, dark_mode goes through user.learner_profile instead of the CustomUser field. CustomUser's own fields are not removed yet (phase 4) — both are kept in sync so this can land, be verified, and merge on its own before the next reader batch is ready, without blocking on it.
Scope: reader surface (verify each by reading current main, this table is a starting point not exhaustive — grep before finishing)
| Area | Files |
|---|---|
| Dark mode | course_management/context_processors.py, accounts/views/account_toggles.py |
| Registration and profile forms | courses/views/registration_form.py, courses/views/registration_profile.py, courses/views/forms.py, accounts/forms.py, accounts/views/welcome.py |
| Projects and API | courses/views/project_page_context.py, courses/views/project_submission_edit.py, api/views/enrollment_graduates.py |
| Member home | courses/services/member_home.py |
Cross-cohort/site project galleries (new since #334's original grooming, merged to main this cycle) |
courses/views/project_gallery_groups.py, courses/views/family_project_gallery.py, courses/views/site_project_gallery.py and their templates courses/templates/projects/family_gallery.html, courses/templates/projects/site_gallery.html |
Verified read of the gallery module for this issue: as of current main, none of project_gallery_groups.py/family_project_gallery.py/site_project_gallery.py or their templates dereference any CustomUser/LearnerProfile field today — they only group Project/ProjectSubmission by cohort/family and render counts (project.submissions_count, group.projects|length). ProjectSubmission.student is a live FK to the user model (courses/models/project.py, via get_user_model(), not a hardcoded CustomUser import) that this module does not currently dereference. Action for this issue: add a regression test pinning that these three view modules and their templates still resolve zero LearnerProfile/moved-field attribute accesses, so a future change to the gallery that starts rendering submitter role/certificate/links is forced to go through learner_profile from day one instead of reintroducing a CustomUser field read.
Non-goals
- No change to
identity_state/normalized_emailreaders (phase 3). - No removal of the fields from
CustomUser(phase 4). - No rename (phase 5), no AISL field additions (phase 6).
- No
community_baseimports.
Dependencies
- Depends on: #390 (
courses.LearnerProfilemust exist and be backfilled). - Blocks: #393 (contract removal needs every reader confirmed migrated first).
Acceptance criteria
Django and integration
-
make django-check/make migrations-checkpass (no model change expected in this phase; flag if one becomes necessary). -
make testpasses. - A grep-backed inventory in the PR body lists every file that read/wrote the ten fields before this change and confirms each now goes through
learner_profile. - The new gallery-module regression test (above) exists and passes.
- Writes to
dark_mode,certificate_name, profile URLs,about_me,role,registration_role,country/regionvia the account-settings and registration forms still round-trip through the Django test client.
Browser
-
make test-playwright-corepasses: a signed-in member toggles dark mode and the preference survives reload; the registration form still remembers the last-used role.
Repository and operations
- Versioned verification plan per
_docs/ci/change-selective-ci.mdrecorded in the engineer handoff.
- 主要言語
- Python
- スター
- 0
- フォーク
- 0
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
DataTalksClub/website のほかの issue
-
bug infra operations P1 testing
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
DataTalksClub/website#329 ·
-
bug content data-migration documentation events operations P1
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
DataTalksClub/website#327 ·
-
bug frontend P0 testing
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
DataTalksClub/website#300 · コメント 7 件 ·
-
bug data-migration events P0 testing
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
DataTalksClub/website#295 · コメント 6 件 ·
-
admin courses data-migration email enhancement integration operations P1
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
DataTalksClub/website#468 · コメント 6 件 ·
DataTalksClub/website の issue をすべて見る
似ている issue
-
[Bug]: `hermes plugins update` clones an entire monorepo twice - `subdir` is resolved but dropped at both catalog-update call sites対応中かも @HootRock が今日担当しました。 オープンcomp/cli P2 type/perf
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
NousResearch/hermes-agent#142417 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
bug enhancement python
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
DewaldOosthuizen/tech-cheat-sheets-and-notes#392 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
bug p2
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
Restore postgresql_vm_test_charm actions.yaml change (removed in canonical/postgresql-operator#2054)オープン
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
canonical/postgresql-single-kernel-library#390 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信