Commit Graph

56 Commits

Author SHA1 Message Date
Aarif
c162a25045 fix: fixed build errors blocking django 3.1 and 3.2 tests (#28923) 2021-10-05 00:39:08 +05:00
Kyle McCormick
6ea900cba6 docs: remove link to edX.org-internal coursegraph queries (#28918)
I had thought this wiki page was publicly accessible, but it
turns out that it is restricted to edX employees. Making the
page publicly visible would involve editing some queries
to remove edX.org-specific information, which is doable but
not something I can commit to right now.
2021-10-04 11:34:29 -04:00
Kyle McCormick
cd3957b987 fix: upgrade py2neo from 3.1.2 to 2021.1.5 (#28480)
* fix: upgrade py2neo from 3.1.2 to 2021.1.5

The dump_to_neo4j management command has not been working
since the upgrade to python 3.8. The latest version of
python that py2neo 3.1.2 states support for is python 3.5,
so this isn't surprising.

The earliest non-prerelease version of py2neo that supports
python 3.8 is 2020.x (skipping the 4.x and 5.x series). Since
we're going as far as a 2020.x, we may as well upgrade all the
way to the newest series, 2021.x. This commit does that upgrade,
as well as a handful of minor code modifications in order
to handle breaking changes that have been made to the py2neo
API, and some unrelated pin bumps as the result of
'make upgrade'.

This will also require an upgrade of Coursegraph's Neo4j
version from 3.2.x to 3.5.x.

TNL-8386
2021-08-25 09:34:41 -04:00
Kyle McCormick
604fb832f1 docs: document coursegraph app, including devstack instructions (#28489)
Add a README to the coursegraph app, including:

    description/purpose,
    vague deployment instructions,
    devstack instructions,
    example queries, and
    link to the query archive on the wiki.
2021-08-18 17:07:21 -04:00
Usama Sadiq
588f11b100 refactor: apply lint-amnesty to pylint violations 2021-04-27 14:43:31 +05:00
Jawayria
df06d1312d refactor: Removed unused imports
Removed unused imports from openedx/core/djangoapps/{content_libraries, coursegraph,courseware_api, crawlers, credentials, credit}
2021-04-06 17:07:13 +05:00
Usama Sadiq
369885002d refactor: ran pyupgrade on openedx apps (#26846)
Ran pyupgrade on openedx/core/djangoapps/{coursegraph, courseware_api, crawlers}
2021-03-16 15:15:35 +05:00
Aarif
ba16e05899 replaced unittest assertions pytest assertions (#26564) 2021-02-19 16:04:32 +05:00
Soban Javed
5199bf7acb Replace task decorator with shared_task in openedx 2021-02-04 18:35:38 +05:00
M. Zulqarnain
96ff0734f7 BOM-2320 : Pylint amnesty in course apps under openedx (#26348)
* pylint amnesty in course apps under openedx
2021-02-04 15:34:14 +05:00
Régis Behmo
3a29cff016 Get rid of calls to set_request_cache_with_short_name
This method from the toggle legacy classes should not actually be
exposed to all. So we get rid of it by manually setting the cached
value. While we are at it, we convert the STORAGE_BACKING_FOR_CACHE
legacy waffle switch to its modern version. As the flag is not being
used elsewhere, this should not break anything.

We take the opportunity to modernize waffle switches from
block_structure.config: to do so we convert the INVALIDATE_CACHE_ON_PUBLISH and
RAISE_ERROR_WHEN_NOT_FOUND waffle switches from legacy classes to their modern
equivalents. These switches are not used outside of edx-platform, so this
change should not trigger any error.
2021-01-12 16:52:08 +01:00
Muhammad Soban Javed
bd601cf3a6 Update celery routing for celery 4+ (#25567)
* Update celery routing

- Used routing function instead of class
- Move task queues dictionary to Django settings
- Removed routing_key parameter
- Refactored routing for singleton celery instantiation

Co-authored-by: Awais Qureshi <awais.qureshi@arbisoft.com>
2020-12-16 13:40:47 +05:00
Robert Raposa
8eef18710d set code_owner for celery tasks
ARCHBOM-1260

Co-authored-by: Tim McCormack <tmccormack@edx.org>
2020-11-17 15:33:33 -05:00
Awais Qureshi
7201edb11d Revert "Update routing config" (#25536)" (#25549)" (#25553)" (#25561)
This reverts commit db4c3b1210.
2020-11-11 00:13:47 +05:00
Awais Qureshi
db4c3b1210 Revert "Revert ""Update routing config" (#25536)" (#25549)" (#25553)
This reverts commit c1fe3c3a93.
2020-11-10 23:23:09 +05:00
Muhammad Soban Javed
c1fe3c3a93 Revert ""Update routing config" (#25536)" (#25549)
This reverts commit 39a22734c1.
2020-11-09 23:43:47 +05:00
Awais Qureshi
39a22734c1 "Update routing config" (#25536)
* Revert "Revert "Update routing config"

* Removed settings from lms/celery.py and cms/celery.py

* Moved settings import from top-level to function's scopes

Co-authored-by: Soban Javed <iamsobanjaved@gmail.com>
2020-11-09 19:06:55 +05:00
Muhammad Soban Javed
5a2ea1f954 Revert "Update routing config" 2020-11-06 02:05:48 +05:00
Muhammad Soban Javed
bfa8f71f33 Update routing config #25419 2020-11-06 01:00:29 +05: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
Régis Behmo
3b127f8c92 Deprecate WaffleSwitch.override* methods
This allows us to get rid of the custom WaffleSwitch and
WaffleSwitchNamespace classes from waffle_utils in favour of
edx_toggles.toggles classes.
2020-11-03 19:25:37 +01:00
Soban Javed
3206d9cb9a Update celery routing
- Used routing function istead of class
- Move task queues to Djano settings
- Removed routing_key parameter
2020-11-02 15:03:53 +05:00
Calen Pennington
2714da86a4 Always import task packages by absolute paths
This follows the recommendation in the Celery documentation so as to
not confuse automatic task name generation.

Docs: https://docs.celeryproject.org/en/stable/userguide/tasks.html#automatic-naming-and-relative-imports
2020-10-08 14:10:17 -04:00
Soban Javed
b7ca6d5619 Upgrade celery to 4.4.7
Replace django-celery with django-celery-results
Upgrade redis to latest
2020-09-22 16:20:45 +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
Ned Batchelder
1e4fac6440 Better tests of stringifying objects. BOM-730 and BOM-731 2019-09-18 13:29:32 -04:00
Ayub khan
8a95a8e520 BOM-95
assertItemsEqual with six.assertCountEqual
2019-08-21 17:01:40 +05:00
uzairr
80316c632d Update Help msgs of management commands
PROD-399
2019-08-02 15:20:26 +05:00
Amit
833d0af8cc INCR-149 (#20516)
* INCR-149: Run python-modernize on openedx/core/djangoapps [self_paced, coursegraph]

* INCR-149: Groups to absolute_import and unicode_literals
2019-05-10 11:11:42 -04:00
Cory Lee
ac4845d052 DEPR-14 Remove AWS.py 2019-03-28 10:48:34 -04:00
Ned Batchelder
2d438d8bb5 Fix 'W605 invalid escape sequence' errors from pycodestyle 2018-11-02 06:06:43 -04:00
Robert Raposa
ba4cc62ff8 Retire deprecated RequestCache (Take 2)
ARCH-223
2018-09-08 15:09:28 -04:00
Nimisha Asthagiri
4ca165f690 Revert "ARCH-223: Retire deprecated RequestCache." 2018-08-30 16:33:03 -04:00
Robert Raposa
3df339a56a Retire deprecated RequestCache.
ARCH-223
2018-08-30 08:55:19 -04:00
Jeremy Bowman
d90afa4cde TE-2689 Remove useless pylint suppressions part 5 2018-08-21 11:07:52 -04:00
Nimisha Asthagiri
57ecda7f71 Remove CourseStructure usage in CourseGraph 2018-04-13 14:44:19 -04:00
Qubad786
64555c60c0 Move request_cache to openedx.core.djangoapps 2018-01-26 15:09:25 +05:00
Jeremy Bowman
113e8dde61 PLAT-1885 Stop using deprecated BlockUsageLocator properties 2018-01-12 16:40:21 -05:00
Adam
9520fe0342 Merge pull request #16553 from edx/adam/fix-branch-versioning-issues-coursegraph
addresses issue where branch information was not being stripped from …
2017-11-14 15:36:25 -05:00
Adam Palay
25b4a6e207 addresses issue where branch information was not being stripped from child blocks when serializing courses (PLAT-1794) 2017-11-13 17:32:56 -05:00
bmedx
f3f8d8ec96 Changes necessary for Django 1.11 tests to start
- Certificates management commands updates
- Moving reverse calls in tests into setUp from class definition
- Import shuffling
- Consolidating cryptograhpy version to 1.9
2017-11-13 15:45:32 -05:00
Adam
3fd499b40c Merge pull request #16133 from edx/adam/fix-cg-bug
address coursegraph issue where components had the same block id but …
2017-10-13 13:59:10 -04:00
John Eskew
02f26f55ce Remove unused imports. Push model imports down into relevant methods.
Mock out the static_replace modules in the proper location.
2017-10-05 11:12:52 -04:00
Adam Palay
8dc58e548e address coursegraph issue where components had the same block id but different locations 2017-09-29 14:46:33 -04:00
Adam Palay
67d2ef6ebb have coursegraph cache nodes on block_ids rather than locations (EDUCATOR-1133) 2017-08-18 11:51:11 -04:00
Adam Palay
51abe89a80 respond to comments 2017-06-12 11:55:58 -04:00
Adam Palay
69d76b69d7 write courses to neo4j in background tasks (EDUCATOR-583)
move tasks into tasks.py

add more logging
2017-06-12 10:44:27 -04:00
Adam Palay
e798b2e8a6 add precedes relationship to coursegraph (EDUCATOR-484) 2017-06-08 12:53:27 -04:00
Adam Palay
4331132920 add indices to item nodes when dumping to neo4j 2017-05-30 16:33:15 -04:00
Adam Palay
ed713d7caa specify if an item is detached 2016-11-21 14:28:37 -05:00