Skip to content

build: declare django-simple-history and layer openedx_catalog - #2

Open
jesperhodge wants to merge 3 commits into
jesperhodge/cbe-641-01-adrfrom
jesperhodge/cbe-641-02-deps-and-layering
Open

build: declare django-simple-history and layer openedx_catalog#2
jesperhodge wants to merge 3 commits into
jesperhodge/cbe-641-01-adrfrom
jesperhodge/cbe-641-02-deps-and-layering

Conversation

@jesperhodge

@jesperhodge jesperhodge commented Sep 9, 2026

Copy link
Copy Markdown
Owner

What this does

  • Adds `django-simple-history
  • Fixes an edge case in the openedx_learning .importlinter hierarchy

Refs openedx#641

Comment thread .importlinter Outdated
@jesperhodge
jesperhodge added this pull request to stack #11 September 11, 2026 13:17
jesperhodge and others added 3 commits September 11, 2026 09:27
django-simple-history is pinned in the compiled requirements only as a
transitive dependency of edx-organizations, and simple_history is absent from
INSTALLED_APPS, so HistoricalRecords() would not work. Declare it directly and
register the app in both settings modules. HistoricalRecords() itself works
without the app installed, but its admin integration and management commands
do not, and the package ships no system check to say so.

openedx_catalog appears in neither .importlinter's root_packages nor its
layering contract, so the first openedx_learning to openedx_catalog import
would pass unexamined. The criteria models scope to a CourseRun, so that
import is about to exist.

Refs openedx#641

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Issue openedx#641's AC calls for openedx_content | openedx_catalog so the
layers contract doesn't also decide the catalog-to-content direction,
which src/openedx_catalog/ARCHITECTURE.md still records as TBD.
@jesperhodge
jesperhodge force-pushed the jesperhodge/cbe-641-02-deps-and-layering branch from 6ed0b17 to be9f59b Compare September 11, 2026 13:27
@jesperhodge
jesperhodge removed this pull request from stack #11 September 11, 2026 14:29
@jesperhodge
jesperhodge added this pull request to stack #12 September 11, 2026 14:33
@jesperhodge
jesperhodge removed this pull request from stack #12 September 11, 2026 14:34
@jesperhodge
jesperhodge added this pull request to stack #13 September 11, 2026 14:34

@mgwozdz-unicon mgwozdz-unicon left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From Claude:

  1. .importlinter's layers contract dropped openedx_content from the layers list without replacing it. 5de99d4 removed the openedx_content line and left only a comment in its place, and it never landed back on its own line, not even inside 18c61c3's openedx_content | openedx_catalog sibling entry, which then got trimmed away entirely in be9f59b. Right now openedx_content doesn't appear anywhere in layers, so lint-imports no longer enforces the rule that predates this PR: nothing below openedx_learning may import it. Please put openedx_content back into the layers list.

  2. Separate question: openedx_catalog was added to root_packages by this PR but also never landed in layers, it was added as openedx_content | openedx_catalog in 18c61c3 and removed again in be9f59b. Was dropping it intentional? Your own commit message on 5de99d4 says the criteria models scope to a CourseRun, so an openedx_learning to openedx_catalog import is coming, and without an entry in layers, the linter won't catch it when it lands.

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.

2 participants