* fix: create SearchAccess on library creation for course creator search access
When a course creator creates a new library, the SearchAccess record must exist immediately so their JWT token can include the library's access_id. Without this, course creators cannot see newly added components in search results until the page is refreshed.
This issue doesn't affect superusers who bypass access_id filtering.
* test: verify SearchAccess is created automatically on library creation
---------
Co-authored-by: Usama Sadiq <usama7274@gmail.com>
Our use of `fs` means we have a runtime dependency on setuptools. The
newest version is not compatible with the current version of `fs` so
we've added a constraint. But the docs build didn't previously install
our specified version of setuptools. This is to fix that.
* feat: add ruff and configure it to match current pycodestyle rules
Adds ruff to testing requirements and configures it in pyproject.toml
to enforce the same E/W rules that pycodestyle 2.8.x was enforcing.
Two additional rules (E714, E721) that pycodestyle 2.8.x did not enforce
are explicitly ignored for now and can be cleaned up in a follow-up.
Part of the migration from pycodestyle → ruff.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat: add ruff Makefile target
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat: add ruff to quality CI workflow alongside pycodestyle
Runs ruff alongside pycodestyle so we can validate parity before
removing pycodestyle in the next commit.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat: remove pycodestyle, replaced by ruff
- Remove pycodestyle from requirements
- Remove pycodestyle version constraint (pinned to <2.9.0 due to a
false positive E275 bug that is no longer relevant)
- Remove [pycodestyle] config from setup.cfg (config now lives in
pyproject.toml under [tool.ruff])
- Remove pycodestyle Makefile target
- Remove make pycodestyle from quality CI workflow
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* style: Apply suggestions from code review
Remove unnecessary ignores.
Co-authored-by: Braden MacDonald <braden@opencraft.com>
* style: Fix a style isusue and remove ignores.
Most of these ignores are unnecessary as we're passing them now and we
want to check them in the future. E714 only had one fixable violation so
we just fixed it.
* style: Update ruff config and workflows
* Update the call to `ruff` so that it outputs in a github friendly
manner.
* Remove ruff exclusions that are already covered by .gitignore which
ruff respects.
* chore: Recompile requirements.
Update the requirements to drop pycodestyle and add ruff.
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Braden MacDonald <braden@opencraft.com>
karma-jasmine 1.x is the last major version that:
- Works with karma 6.x (peer dep: karma: '*')
- Works with jasmine-core 2.x (peer dep: jasmine-core: '*')
Version 2.x+ requires jasmine-core 3.x which is incompatible with
the pinned jasmine-core@2.6.4 (required for edx-ui-toolkit).
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
In karma 6, files matched by earlier patterns aren't overridden by later
patterns. The sourceFiles patterns like `cms/**/!(*spec|djangojs).js`
matched test entry files (e.g., `cms/js/spec/main.js`) because they
don't end with "spec" or "djangojs". This prevented runFiles from
setting `included: true` on these files, so tests never started.
Split the sourceFiles patterns to precisely exclude spec/main*.js test
entry points while still serving other source files:
- Direct children of the js directory
- Subdirectories except spec/
- spec/ subdirectory, excluding main* files
This allows runFiles to control test entry point inclusion.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Update documentation, comments, and docstrings throughout the codebase
to reflect the migration from setup.py to pyproject.toml:
- Transformer class docstrings: changed to reference "entry point name
in the package configuration" for better future-proofing
- Block structure module docs: updated to reference pyproject.toml
- Test file comments: updated entry point references
- Config files (tox.ini, pytest.ini): updated references
- Documentation (extension_points.rst, course apps ADRs): updated to
reference pyproject.toml with inclusive language for external packages
- Requirements documentation (github.in): updated with inclusive language
- edxmako README: modernized install command to use pip install
Historical ADRs and references to external packages that may still use
setup.py were intentionally left unchanged or updated with inclusive
language acknowledging both pyproject.toml and setup.py.
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>
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>
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>
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 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 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 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 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>
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>
djangorestframework-stubs==3.16.8 dropped types-requests as a
transitive dependency. Since edx-platform uses the requests library
directly, we need to pin types-requests explicitly so that mypy can
type-check our code correctly.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The latest version of pylint pins back astroid to an older version. This
hold back is not caught in the docs requirements file and since both the
docs and testing file are required in the development.in file, we fail
to compile development.txt because of conflicting dependencies.
Holding astroid back until pylint releases a new version that works with
the latest version of astroid.
Created https://github.com/openedx/openedx-platform/issues/38066 to undo
this.
We want to support a flow for SSO-enabled Enterprise customers who have
agreed off-platform that none of their learners will opt-in to marketing emails
or sharing research data. This change proposes to do so by
adding an optional field that, when enabled, disables the presence of
the two checkboxes on this registration form and sets their values to false.
ENT-11401
BREAKING CHANGE: The `pdf` XBlock is now built into the platform core and
installed by default. If you previously installed a third-party pdf
implementation such as https://github.com/open-craft/xblock-pdf, then the
built-in implementation will likely work as a drop-in replacement, so you can
uninstall the third-party implementation. However, if you’d rather continue
using a third-party pdf implementation, then use the `xblock.v1.overrides`
entrypoint. In either case, the third-party implementation must be removed from
the `xblock.v1` entrypoint, otherwise you will see an AmbiguousPluginError.
Co-Authored-By: Kyle McCormick <kyle@axim.org>
The static-assets-check workflow was setting DJANGO_SETTINGS_MODULE=lms.envs.production
globally, but then running both LMS and CMS collectstatic. Because manage.py doesn't
override DJANGO_SETTINGS_MODULE when it's already set (and --settings isn't passed),
CMS was running with LMS settings instead of CMS settings.
This meant CMS-specific RequireJS builds (cms/static/cms/js/build.js) were never being
tested, allowing issues like missing modules to slip through to sandbox deployments.
Fix by setting DJANGO_SETTINGS_MODULE explicitly for each service.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The legacy video uploads page in Studio has been replaced with a new
view in the Authoring MFE. The legacy page has not been available for
some time, so it's all dead code. This PR removes it.
Please note that there's a waffle flag which enables the MFE version
of the video uploads page: `contentstore.new_studio_mfe.use_new_video_uploads_page`.
Unlike the other Studio MFE waffles, we're NOT going to remove this one now,
because the video uploads page has always been broken for sites other
than edx.org (or sites that have reverse-engineered their video pipeline) so
we'd like to keep the flag until it's either fixed for the community or
removed (https://github.com/openedx/openedx-platform/issues/37972).
This work is part of https://github.com/openedx/edx-platform/issues/36108
Co-Authored-By: Kyle McCormick <kyle@axim.org>
BREAKING CHANGE: this forces course IDs in modulestore to be unique (case insensitive). This was always supposed to be the case, but it wasn't working properly on MySQL. Upgrading past this commit may cause a migration failure if you have conflicting course IDs - see the migration 0004 docstring for details.
refactor: remove some 'max_length=255' to be more DRY
feat: example of making an OpaqueKeyField case_sensitive (modulestore_migrator)
test: update test now that we're using case-insensitive collation on SQLite