Skip to content

refactor: Reference top-level settings instead of FEATURES#38070

Closed
kdmccormick wants to merge 45 commits intomasterfrom
kdmccormick/features
Closed

refactor: Reference top-level settings instead of FEATURES#38070
kdmccormick wants to merge 45 commits intomasterfrom
kdmccormick/features

Conversation

@kdmccormick
Copy link
Member

Description

Replace each reference to the FEATURES dictionary with the equivalent top-level Django settings reference.

Supporting information

TBC

Testing instructions

TBC

Deadline

Verawood code freeze

Other information

A

I used claude code -- more TBC

kdmccormick and others added 30 commits March 2, 2026 15:29
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
TODO: test_views.py uses @override_settings(MODE_CREATION_FOR_TESTING=True) on
setUp(), which patches during setUp execution. The urls.py still uses a module-level
conditional on this setting (evaluated at import time). Verify that
UrlResetMixin reloads URLs after setUp runs, otherwise the create_mode URL
pattern may not be included correctly in tests.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…_auth

TODO: testutil.py AUTH_FEATURES_KEY + " not in settings.FEATURES" error message
still references FEATURES by name in the string, but this is a cosmetic issue only.
_SETTINGS_MAP in test_settings.py still has 'FEATURES': {} as a dict key in a
fake settings object; harmless since nothing reads it after this change.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
TODO: test_models.py had FEATURES_INVALID_FILE_PATH with CERTS_HTML_VIEW_CONFIG_PATH,
which is not in base settings and not referenced anywhere in production code. Removed
module-level variable and decorator entirely since the setting is a dead artifact.
Verify test_get_no_database_no_file still tests what it intends.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…oryextended

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…s/badges

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…s/bulk_enroll

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…s/bulk_user_retirement

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…s/debug

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…s/gating

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…s/learner_dashboard

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…s/lms_initialization

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…s/lms_xblock

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…s/mailing

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…s/monitoring

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…s/ora_staff_grader

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
kdmccormick and others added 15 commits March 2, 2026 16:18
…s/rss_proxy

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…s/static_template_view

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…s/staticbook

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…s/survey

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…s/user_tours

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…s/tests

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…s/bulk_email

TODO: test_email.py uses ENABLE_INSTRUCTOR_EMAIL and REQUIRE_COURSE_EMAIL_AUTH which are
not defined in any common settings file. Skipped conversion.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
TODO: XQA_SERVER, COURSEWARE_SEARCH_INCLUSION_DATE, ENABLE_PROCTORED_EXAMS,
ENABLE_FINANCIAL_ASSISTANCE_FORM not in common settings -- skipped.
ENABLE_SPECIAL_EXAMS + ENABLE_PROCTORED_EXAMS share a patch.dict in test_rules.py -- skipped.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
TODO: ENABLE_FORUM_DAILY_DIGEST and ALLOW_HIDING_DISCUSSION_TAB not in common settings -- skipped.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@kdmccormick kdmccormick force-pushed the kdmccormick/features branch from 6766949 to 02c1f7c Compare March 2, 2026 21:57
@kdmccormick
Copy link
Member Author

Closed in favor of #38095

@kdmccormick kdmccormick closed this Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant