-
Notifications
You must be signed in to change notification settings - Fork 4.2k
feanil/pyproject toml #37911
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
feanil
wants to merge
14
commits into
master
Choose a base branch
from
feanil/pyproject_toml
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
feanil/pyproject toml #37911
+397
−423
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>
ee11757 to
6153d91
Compare
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>
6153d91 to
87302cd
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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