19 Commits

Author SHA1 Message Date
edX requirements bot
e46c1d1e61 Python Requirements Update (#33695)
* chore: Updating Python Requirements
* fix: fix completion test query count
---------

Co-authored-by: UsamaSadiq <usama7274@gmail.com>
2023-11-13 14:37:53 +05:00
Braden MacDonald
dcb7ef8821 feat: Read course indexes from MySQL, not MongoDB (#29184)
Description
This is a follow up to #29058 and #29413. This is the next step in moving part of the modulestore data (the course indexes / "active versions" table) from MongoDB to MySQL.

There are four steps planned in moving course index data to MySQL:

Step 1: create the tables in MySQL, start writing to MySQL + MongoDB  done
Step 2: migrate all remaining courses to MySQL  done
Step 3: switch reads from MongoDB to MySQL (this PR)
Step 4 (much later, once we know this is working well): stop writing to MongoDB altogether.
Supporting information
OpenCraft Jira ticket: MNG-2557

Status
 Tested with a large Open edX instance is in progress.

Testing instructions
Try making changes in Studio and verify that they work fine.

Deadline
None
2022-03-09 10:21:09 -05:00
Braden MacDonald
6c85668099 feat: write split modulestore's course indexes to Django/MySQL
Split modulestore persists data in three MongoDB "collections": course_index (list of courses and the current version of each), structure (outline of the courses, and some XBlock fields), and definition (other XBlock fields). While "structure" and "definition" data can get very large, which is one of the reasons MongoDB was chosen for modulestore, the course index data is very small.

This commit starts writing course indexes (active_versions) to both MySQL and Mongo, but continues to read from MongoDB only.

By moving course index data to MySQL / a django model, we get these advantages:
* Full history of changes to the course index data is now preserved
* Includes a django admin view to inspect the list of courses and libraries
* It's much easier to "reset" a corrupted course to a known working state, by using the simple-history revert tools from the django admin.
* The remaining MongoDB collections (structure and definition) are essentially just used as key-value stores of large JSON data structures. This paves the way for future changes that allow migrating courses one at a time from MongoDB to S3, and thus eliminating any use of MongoDB by split modulestore, simplifying the stack.
2021-10-26 10:06:52 -07:00
David Ormsbee
ae124bd554 Revert "feat: store split modulestore's course indexes in Django/MySQL"
This reverts commit 96e5ff8dce.
2021-10-07 15:07:42 -04:00
Braden MacDonald
96e5ff8dce feat: store split modulestore's course indexes in Django/MySQL
Split modulestore persists data in three MongoDB "collections": course_index (list of courses and the current version of each), structure (outline of the courses, and some XBlock fields), and definition (other XBlock fields). While "structure" and "definition" data can get very large, which is one of the reasons MongoDB was chosen for modulestore, the course index data is very small.

By moving course index data to MySQL / a django model, we get these advantages:
* Full history of changes to the course index data is now preserved
* Includes a django admin view to inspect the list of courses and libraries
* It's much easier to "reset" a corrupted course to a known working state, by using the simple-history revert tools from the django admin.
* The remaining MongoDB collections (structure and definition) are essentially just used as key-value stores of large JSON data structures. This paves the way for future changes that allow migrating courses one at a time from MongoDB to S3, and thus eliminating any use of MongoDB by split modulestore, simplifying the stack.
2021-10-07 10:59:47 -04:00
Usama Sadiq
6a79d47589 refactor: Ran pyupgrade on openedx/{testing, tests} 2021-04-08 14:49:40 +05:00
Aarif
b58ea1f03c replaced unittest assertions pytest assertions (#26576) 2021-02-22 16:18:51 +05:00
Awais Qureshi
7321e9e5eb BOM-2338
Apply pylint-amnesty.
2021-02-08 17:42:01 +05:00
Kyle McCormick
151bd13666 Use full names for common.djangoapps imports; warn when using old style (#25477)
* Generate common/djangoapps import shims for LMS
* Generate common/djangoapps import shims for Studio
* Stop appending project root to sys.path
* Stop appending common/djangoapps to sys.path
* Import from common.djangoapps.course_action_state instead of course_action_state
* Import from common.djangoapps.course_modes instead of course_modes
* Import from common.djangoapps.database_fixups instead of database_fixups
* Import from common.djangoapps.edxmako instead of edxmako
* Import from common.djangoapps.entitlements instead of entitlements
* Import from common.djangoapps.pipline_mako instead of pipeline_mako
* Import from common.djangoapps.static_replace instead of static_replace
* Import from common.djangoapps.student instead of student
* Import from common.djangoapps.terrain instead of terrain
* Import from common.djangoapps.third_party_auth instead of third_party_auth
* Import from common.djangoapps.track instead of track
* Import from common.djangoapps.util instead of util
* Import from common.djangoapps.xblock_django instead of xblock_django
* Add empty common/djangoapps/__init__.py to fix pytest collection
* Fix pylint formatting violations
* Exclude import_shims/ directory tree from linting
2020-11-10 07:02:01 -05:00
Régis Behmo
bad30a157e Upgrade edx-completion and fix corresponding unit tests
Some tests were still relying on deprecated
WaffleSwitchNamespace.override method, which was working before because
we were importing WaffleSwitchNamespace from waffle_utils.__init__. This
no longer works after we import WaffleSwitchNamespace from edx-toggles.
2020-11-09 16:14:50 +01:00
Régis Behmo
4586002956 Import waffle classes from edx_toggles instead of waffle_utils
Those classes were ported to edx_toggles. The imports remain in
waffle_utils.__init__ for backward compatibility.
2020-11-03 19:25:37 +01:00
Feanil Patel
6e3fe00fff Fix all E303 pep8 errors. 2019-12-30 12:25:38 -05:00
Feanil Patel
9cf2f9f298 Run 2to3 -f future . -w
This will remove imports from __future__ that are no longer needed.

https://docs.python.org/3.5/library/2to3.html#2to3fixer-future
2019-12-30 10:35:30 -05:00
Braden MacDonald
5fc73468b3 Change completion API to work with any learning context 2019-10-22 14:04:31 -04:00
aliciaerwin
ddeb7c4204 INCR-237 Run python modernize on openedx/tests (#20494) 2019-05-24 15:46:18 -04:00
J. Cliff Dyer
1f45a7e934 Fix query counts on completion tests and update requirements.
Update requirements
2018-09-19 11:16:12 -04:00
Alex Dusenbery
60d71ce581 EDUCATOR-2553 | Bump edx-completion to 0.1.4; Add feature-gating tests for completion. 2018-03-29 12:08:33 -04:00
sandroroux
3f22ce3031 These changes add a resume button to course cards on the student dashboard. 2018-03-02 14:52:30 -05:00
Alex Dusenbery
7e51f02884 Get edx-platform working with external completion lib, add integration tests. 2018-02-14 15:54:27 -05:00