Parent decision: #15
Normative decision: Open decision 4
Scope
The historical import added on main (2032ceb, "Add historical zoomcamp-scoring import for pre-2024 cohorts") creates each pre-2024 Cohort via Cohort.objects.update_or_create(slug=edition.cohort_slug, ...) without setting course= explicitly, so it still resolves its family through the regex year-stripping fallback in Cohort.save() (courses/models/cohort.py). #15 requires an explicit reviewed mapping instead, per owner decision.
- Add explicit reviewed entries (in
courses/course_family_catalog.py or an equivalent explicit table read by scripts/historical_import) for the 7 pre-2024 legacy cohort slugs: de-zoomcamp-2022, de-zoomcamp-2023, mlops-zoomcamp-2022, mlops-zoomcamp-2023, ml-zoomcamp-2021, ml-zoomcamp-2022, ml-zoomcamp-2023. This is the confirmed complete pre-2024 inventory — no other one-off/unusual legacy editions exist.
- Update
scripts/historical_import/scoring_import.py's ensure_cohort() to pass course= explicitly from that mapping instead of leaving course_id unset.
- Remove the regex year-stripping fallback in
Cohort.save() now that every production cohort-creation path supplies course explicitly. Regex-based slug inference is only acceptable as a one-time authoring aid inside import/fixture scripts — never live in production model code.
- Locate and import certificates for the
ml-zoomcamp-2021 edition. The current import treats it as having no certificate source and skips it; owner confirms certificates for this edition exist and should be found and imported like every other edition.
- Persist the recovered
sha1(email) hash (already used transiently by scripts/historical_import/email_recovery.py to match learners to accounts) as a queryable legacy identifier/alias, so historical records stay traceable back to the zoomcamp-scoring source.
Non-goals
Does not reopen the mapping approach itself (approved in #15) or add pre-2024 families beyond DE/MLOps/ML Zoomcamp 2021-2023.
Acceptance criteria
Dependencies
Depends on #15 (decision, resolved). Builds on the historical import added in 2032ceb on main.
Parent decision: #15
Normative decision: Open decision 4
Scope
The historical import added on
main(2032ceb, "Add historical zoomcamp-scoring import for pre-2024 cohorts") creates each pre-2024CohortviaCohort.objects.update_or_create(slug=edition.cohort_slug, ...)without settingcourse=explicitly, so it still resolves its family through the regex year-stripping fallback inCohort.save()(courses/models/cohort.py). #15 requires an explicit reviewed mapping instead, per owner decision.courses/course_family_catalog.pyor an equivalent explicit table read byscripts/historical_import) for the 7 pre-2024 legacy cohort slugs:de-zoomcamp-2022,de-zoomcamp-2023,mlops-zoomcamp-2022,mlops-zoomcamp-2023,ml-zoomcamp-2021,ml-zoomcamp-2022,ml-zoomcamp-2023. This is the confirmed complete pre-2024 inventory — no other one-off/unusual legacy editions exist.scripts/historical_import/scoring_import.py'sensure_cohort()to passcourse=explicitly from that mapping instead of leavingcourse_idunset.Cohort.save()now that every production cohort-creation path suppliescourseexplicitly. Regex-based slug inference is only acceptable as a one-time authoring aid inside import/fixture scripts — never live in production model code.ml-zoomcamp-2021edition. The current import treats it as having no certificate source and skips it; owner confirms certificates for this edition exist and should be found and imported like every other edition.sha1(email)hash (already used transiently byscripts/historical_import/email_recovery.pyto match learners to accounts) as a queryable legacy identifier/alias, so historical records stay traceable back to thezoomcamp-scoringsource.Non-goals
Does not reopen the mapping approach itself (approved in #15) or add pre-2024 families beyond DE/MLOps/ML Zoomcamp 2021-2023.
Acceptance criteria
Cohort.save()no longer contains the regex-based family-inference fallback; creating aCohortwith nocourseand an unmapped slug fails loudly instead of guessing.ml-zoomcamp-2021certificates are imported like every other historical edition.sha1(email)as a reviewable legacy alias.Dependencies
Depends on #15 (decision, resolved). Builds on the historical import added in
2032cebonmain.