Skip to content

Conversation

@feanil
Copy link
Contributor

@feanil feanil commented Jan 20, 2026

This PR migrates edx-platform to use the modern pyproject.toml settnigs file instead of setup.py and setup.cfg.

Switching to this should help us make other future switches of tools more easily as a lot of the docs and capabilities of the new tools require putting config in a pyproject.toml.

We could have just added the pyproject.toml file without removing/relocating everything else but that seemed like it would just be taking on debt that we don't need to. Instead, with the help of Claude Code, I've migrated all the existing settings to the new file.

This PR is best reviewed on a commit by commit basis as that will make it easier to review the diffs more easily in smaller chunks.

For entrypoint validation, I used this script before and after each commit to verify that the entrypoints did not get screwed up in any of this:
verify_entrypoints.py

feanil and others added 12 commits January 20, 2026 11:07
Adds initial pyproject.toml with build system configuration using
setuptools>=61.0 (PEP 621 compatible). No functional changes yet -
setup.py remains fully functional.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Migrates package metadata from setup.py including version, dependencies,
and package definitions.

Changes package name from "Open edX" to "openedx-platform" to comply
with PEP 508 (no spaces allowed). This is safe as the package is not
published and dependents rely on entry points, not the package name.

Simplifies setup.py to contain only entry_points, which will be migrated
in subsequent commits.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Migrates 30 xblock.v1 entry points from setup.py. Removes XBLOCKS
constant as it's no longer needed.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Migrates 1 xblock_asides.v1 entry point from setup.py. Removes
XBLOCKS_ASIDES constant as it's no longer needed.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Migrates 19 openedx.course_tab entry points from setup.py.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Migrates 11 openedx.course_app entry points from setup.py.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Migrates 4 openedx.course_tool entry points from setup.py.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Migrates 17 lms.djangoapp entry points from setup.py.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Migrates 14 cms.djangoapp entry points from setup.py. Preserves
important comment explaining why discussion app (from LMS) is
imported into Studio process.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Migrates 17 openedx.block_structure_transformer entry points from
setup.py.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Migrates final 6 entry point groups from setup.py (user_partition_scheme,
ace.policy, call_to_action, learning_context, dynamic_partition_generator,
console_scripts).

Simplifies setup.py to just call setup() with no arguments - all entry
points now defined in pyproject.toml.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Migrates pytest configuration from setup.cfg, preserving all settings
and comments including warning filters and test discovery patterns.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@feanil feanil force-pushed the feanil/pyproject_toml branch from ee11757 to 6153d91 Compare January 20, 2026 17:27
feanil and others added 2 commits January 20, 2026 13:03
Migrates complete importlinter configuration from setup.cfg, preserving
all 4 contracts, ignore_imports with explanatory comments, and GitHub
issue references.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Removes setup.py as all configuration has been migrated to pyproject.toml
(PEP 621).

Verification confirms:
- Package installs correctly with pip install -e .
- All 142 entry points discoverable via importlib.metadata
- All tool configurations (pytest, pycodestyle, isort, importlinter) working
- Django checks pass for both LMS and CMS

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@feanil feanil force-pushed the feanil/pyproject_toml branch from 6153d91 to 87302cd Compare January 20, 2026 18:04
@feanil feanil requested review from bmtcril and ormsbee January 20, 2026 18:36
@feanil feanil marked this pull request as ready for review January 20, 2026 18:48
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