Fix pre-existing PII annotation debt and add pii_check to CI
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 68/100
调研方向
Start with .annotation_safe_list.yml, the model files under src/, and .github/workflows/ci.yml; run tox -e pii_check to reproduce the duplicate and uncovered-model failures. Review each listed model's data and add exactly one accurate annotation, remove the two redundant safelist entries, add pii_check to the CI matrix, and confirm the check passes with 100% coverage.
由索引模型根据 Issue 内容生成。
描述
Background
make pii_check runs code_annotations against every Django model in openedx-core's own
tree and requires each one to carry a .. no_pii: (or .. pii:) annotation, either inline in
the model's docstring or as an entry in .annotation_safe_list.yml. tox.ini's envlist
already includes a pii_check environment, but .github/workflows/ci.yml's test matrix lists
toxenv: ["django52", "package", "quality", "docs"], which does not include it. CI never runs
pii_check, so nothing currently blocks a merge that breaks it, and two problems have
accumulated on main as a result, confirmed by running tox -e pii_check directly:
Two models are double-covered, which is a lint error, not a coverage gap.
openedx_content.Draft and openedx_content.PublishableEntityVersion each carry an inline
.. no_pii: annotation in their own docstring (src/openedx_content/applets/publishing/models/draft_log.py
and .../models/publishable_entity.py), and each also has a now-redundant entry in
.annotation_safe_list.yml. code_annotations treats a model with both as annotated twice and
fails with a lint error rather than a coverage number:
openedx_content.Draft is annotated, but also in the safelist.
openedx_content.PublishableEntityVersion is annotated, but also in the safelist.
Twenty models are uncovered, confirmed by removing those two stale safelist entries and
re-running tox -e pii_check: 67 models total, 47 annotated, 20 uncovered, 70.1% coverage
against a 100% target. The twenty:
- Seven
oel_*backcompat shim models:oel_collections.Collection,oel_components.Component,
oel_publishing.Container,oel_publishing.DraftChangeLog,oel_publishing.DraftChangeLogRecord,
oel_publishing.LearningPackage,oel_publishing.PublishableEntity - Two
openedx_catalogmodels:CatalogCourse,CourseRun - Three
openedx_contentmodels:ComponentVersionMedia,ContainerType,Media - Two models from the installed
edx-organizationspackage:organizations.HistoricalOrganization,
organizations.HistoricalOrganizationCourse - Six test-only models in
test_django_app:ContainerContainer,ContainerContainerVersion,
TestContainer,TestContainerVersion,TestEntity,TestEntityVersion
None of these twenty are models that #613 (the CBE competency models) adds, and none of #613's
own PRs touch them. This debt predates #613 and is unrelated to it.
What to do
- Remove the
openedx_content.Draftandopenedx_content.PublishableEntityVersionentries
from.annotation_safe_list.yml; both are already covered by their own inline annotation. - Annotate each of the twenty uncovered models above as
.. no_pii:or.. pii:, whichever is
accurate, either inline in the model's own docstring (for a model defined in this repo's
src/) or in.annotation_safe_list.yml(for a model defined in an installed package, such
as the twoorganizations.Historical*models). - Add
pii_checkto thetoxenvlist in.github/workflows/ci.yml's test matrix, so a future
PR that breaks PII coverage or introduces a double-covered model fails CI instead of only
failing silently for whoever happens to runmake pii_checklocally.
Acceptance criteria
-
tox -e pii_checkpasses locally with no lint error and 100% coverage. -
.github/workflows/ci.yml's test matrix includespii_checkintoxenv, and the CI run
on the pull request shows apii_checkjob that passes. - No model's annotation is both inline and in the safelist at once.
- Every one of the twenty models listed above carries exactly one annotation, inline or in
the safelist, accurately describing whether it stores personal data.
Out of scope
Anything in #613, #641, or #642: the CBE competency models, their own PII annotations, and the
openedx-platform safelist entries for them. This issue is unrelated to that work and does not
block or get blocked by it.
- 主要语言
- Python
- 星标
- 10
- 派生
- 33
- 平均合并
- 4 天 1 小时
- 30 天内合并 PR
- 34
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
openedx/openedx-core 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
openedx/openedx-core#831 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
openedx/openedx-core#827 ·
维护者通常 1 天内回复
-
[Follow-up BE] Scope the criteria-groups query by course instead of loading every group可能已有人在做 @ufedaseyeuconsultant 于 3 天前认领。 未关闭
openedx/openedx-core#919 · 2 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
[Release Docs - Follow up] Docs Notes for Competency ID after additional work is completed可能已有人在做 @thelmick-unicon 于 4 天前认领。 未关闭
openedx/openedx-core#917 · 已指派 1 人 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 28/100
openedx/openedx-core#916 ·
维护者通常 1 天内回复
查看 openedx/openedx-core 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
Nixtla/mlforecast#823 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
microsoft/ML-For-Beginners#1061 ·
-
bot-found documentation priority: P3
难度 2/5 1 小时以内 新手友好度 82/100
madenvel/KalinkaPlayer#503 ·
-
难度 2/5 1-3 小时 新手友好度 63/100
EleutherAI/lm-evaluation-harness#4508 ·
维护者通常 1 天内回复