From 3c5184598fa82c8bed7a4dfaac0355571256785a Mon Sep 17 00:00:00 2001 From: Vahid Ahmadi Date: Wed, 27 May 2026 12:28:35 +0200 Subject: [PATCH] Clarify current_education label and docs (#368) #368 suggested renaming current_education -> current_education_enrolment to distinguish enrolment from attainment. A full rename would break every dataset row, test YAML, API consumer (policyengine-app, household-api), and external user that passes current_education as input. Too disruptive for an issue whose actual ask is "make the enrolment-vs-attainment distinction explicit". Do the cheaper thing: improve the label to "Current education enrolment" and add a docstring that says it's enrolment status, not attainment, and points at highest_education for the latter. The variable name stays the same so no downstream breakage; the label is what users see in the API metadata and the docs. --- changelog.d/368.md | 1 + .../variables/household/demographic/current_education.py | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 changelog.d/368.md diff --git a/changelog.d/368.md b/changelog.d/368.md new file mode 100644 index 000000000..a8b986d14 --- /dev/null +++ b/changelog.d/368.md @@ -0,0 +1 @@ +- Clarify the `current_education` label as "Current education enrolment" and add a docstring distinguishing it from `highest_education` (which captures attainment), so the variable's enrolment-vs-attainment semantics are explicit without an API-breaking rename. diff --git a/policyengine_uk/variables/household/demographic/current_education.py b/policyengine_uk/variables/household/demographic/current_education.py index e11d2846b..4cb464f50 100644 --- a/policyengine_uk/variables/household/demographic/current_education.py +++ b/policyengine_uk/variables/household/demographic/current_education.py @@ -10,7 +10,12 @@ class current_education(Variable): possible_values = EducationType default_value = EducationType.NOT_IN_EDUCATION entity = Person - label = "Current education" + label = "Current education enrolment" + documentation = ( + "Which stage of education the person is currently enrolled in (or " + "NOT_IN_EDUCATION if none). This is enrolment status, not attainment " + "— see `highest_education` for the highest completed stage." + ) definition_period = YEAR def formula(person, period, parameters):