Commit Graph

180 Commits

Author SHA1 Message Date
Usama Sadiq
aa618c460c refactor: remove unused-imports (#27083) 2021-03-19 22:42:14 +05:00
edX requirements bot
f33f12bbea BOM-2358 : Pyupgrade in dashboard, debug, discussion apps (#26529)
* Python code cleanup by the cleanup-python-code Jenkins job.

This pull request was generated by the cleanup-python-code Jenkins job, which ran
```
cd lms/djangoapps/dashboard; find . -type f -name '*.py' | while read fname; do sed -i 's/  # lint-amnesty, pylint: disable=super-with-arguments//; s/  # lint-amnesty, pylint: disable=import-error, wrong-import-order//; s/  # lint-amnesty, pylint: disable=wrong-import-order//' "$fname"; done; find . -type f -name '*.py' | while read fname; do pyupgrade --exit-zero-even-if-changed --py3-plus --py36-plus --py38-plus "$fname"; done; isort --recursive .
```

The following packages were installed:
`pyupgrade,isort`

* feedback done

Co-authored-by: Zulqarnain <muhammad.zulqarnain@arbisoft.com>
2021-02-22 15:42:21 +05:00
Aarif
a8b9733654 replaced unittest assertions pytest assertions (#26544) 2021-02-19 11:59:44 +05:00
M. Zulqarnain
65cf0db337 BOM-2278 : Pylint amnesty in discussion, dashboard (#26275)
* pylint amnesty in discussion, dashboard
2021-02-03 18:15:14 +05:00
David Ormsbee
ff382578ea Merge pull request #25581 from mitodl/arslanashraf/195-sysadmin-deprecation-warning
SysAdmin: Added deprecation warning for Sysadmin Dashboard
2020-11-25 10:33:24 -05:00
Arslan Ashraf
7344ddb5e3 SysAdmin: Added deprecation warning for Sysadmin Dashboard 2020-11-12 16:54:18 +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
David Ormsbee
6c07fd0197 Merge pull request #25521 from mitodl/arslanashraf/193-sysadmin-auth-map-button
SysAdmin: Removed external authentication map repair button from User Tab
2020-11-09 09:23:39 -05:00
David Ormsbee
d05c250da3 Merge pull request #25474 from mitodl/umar/sysadmin-190
remove users listing and staff listing download csv from the sysadmin
2020-11-09 09:23:04 -05:00
Kyle McCormick
d1a775d3cd Use full names for lms.djangoapps imports (#25401)
* Use full LMS imports paths in LMS settings and urls modules
* Use full LMS import paths in Studio settings and urls modules
* Import from lms.djangoapps.badges instead of badges
* Import from lms.djangoapps.branding instead of branding
* Import from lms.djangoapps.bulk_email instead of bulk_email
* Import from lms.djangoapps.bulk_enroll instead of bulk_enroll
* Import from lms.djangoapps.ccx instead of ccx
* Import from lms.djangoapps.course_api instead of course_api
* Import from lms.djangoapps.course_blocks instead of course_blocks
* Import from lms.djangoapps.course_wiki instead of course_wiki
* Import from lms.djangoapps.courseware instead of courseware
* Import from lms.djangoapps.dashboard instead of dashboard
* Import from lms.djangoapps.discussion import discussion
* Import from lms.djangoapps.email_marketing instead of email_marketing
* Import from lms.djangoapps.experiments instead of experiments
* Import from lms.djangoapps.gating instead of gating
* Import from lms.djangoapps.grades instead of grades
* Import from lms.djangoapps.instructor_analytics instead of instructor_analytics
* Import form lms.djangoapps.lms_xblock instead of lms_xblock
* Import from lms.djangoapps.lti_provider instead of lti_provider
* Import from lms.djangoapps.mobile_api instead of mobile_api
* Import from lms.djangoapps.rss_proxy instead of rss_proxy
* Import from lms.djangoapps.static_template_view instead of static_template_view
* Import from lms.djangoapps.survey instead of survey
* Import from lms.djangoapps.verify_student instead of verify_student
* Stop suppressing EdxPlatformDeprecatedImportWarnings
2020-11-04 08:48:33 -05:00
Arslan Ashraf
bc838e4f04 SysAdmin: Removed external authentication map repair button from Users tab 2020-11-04 13:57:22 +05:00
Umar Asghar
52ac0e03ae remove users listing and staff listing download csv from the sysadmin 2020-10-29 14:53:51 +05:00
Nimisha Asthagiri
c9410b55cc Merge pull request #24048 from mitodl/pdpinch/sysadmin-dashboard-remove-adr
ADR for Sysadmin Dashboard deprecation and removal
2020-10-23 12:06:30 -04:00
Peter Pinch
302747835a no longer TBD 2020-10-22 15:55:27 -04:00
Calen Pennington
4a120a9e26 Fix failures caused by removing lms/djangoapps from sys.path 2020-09-23 10:05:37 -04:00
Peter Pinch
03982bc44e format 2020-07-06 11:48:19 -04:00
Peter Pinch
ab80bb9cb1 format 2020-07-06 11:47:20 -04:00
Peter Pinch
01b0ee016a move staffing and enrollment to the remove section 2020-07-06 11:40:07 -04:00
Peter Pinch
6f3be0984b link to user retirement docs 2020-07-06 11:40:07 -04:00
Peter Pinch
fdc2aa3115 copy edits 2020-07-06 11:40:07 -04:00
Peter Pinch
254fcd17b6 file extension 2020-07-06 11:40:07 -04:00
Peter Pinch
e1c95a950c ADR for Sysadmin Dashboard deprecation and removal 2020-07-06 11:40:07 -04:00
Eric Herrera
916307df1c Update exception name due to breaking changes introduced in mongoengine 0.19.0. 2020-06-24 20:46:56 -05:00
Peter Pinch
d952cb2c8b ADR for Sysadmin Dashboard status quo 2020-05-21 07:48:01 -04:00
mariajgrimaldi
6eead791a1 Fix DeprecationWarning: Please use assertNotRegex instead (#23907)
I wanted to make a byte-sized contribution but there were no Jira tickets so we decided, thanks to a conversation with @jmbowman through the Open Edx Community #incr (Slack) channel, to collaborate in the elimination of warnings listed in the Warnings Report at https://build.testeng.edx.org/job/edx-platform-python-pipeline-master/warning_5freport_5fall_2ehtml/

This PR contributes to the elimination of deprecation warnings, specifically the one mentioned above and reported in the Warnings Report.

Changed assertNotRegexpMatches to assertNotRegex in the following files:

    cms/djangoapps/contentstore/views/tests/test_preview.py

    cms/djangoapps/contentstore/views/tests/test_item.py

    lms/djangoapps/commerce/tests/test_views.py

    lms/djangoapps/dashboard/tests/test_sysadmin.py

This warning occurs due to deprecation in python 3.5: https://docs.python.org/3.5/library/unittest.html#unittest.TestCase.assertNotRegex
2020-05-08 11:53:02 -04:00
Aarif
6ee2089077 fixed warnings for wrong-import-order 2020-04-08 23:43:06 +05:00
Feanil Patel
046feb0cf0 Merge pull request #22649 from edx/feanil/fix_pep8
Fix all E303 pep8 errors.
2019-12-30 13:32:26 -05:00
Feanil Patel
6e3fe00fff Fix all E303 pep8 errors. 2019-12-30 12:25:38 -05:00
Feanil Patel
2df8b8226b Merge pull request #22643 from edx/feanil/2to3_asserts
Run `2to3 -f asserts . -w` on edx-platform.
2019-12-30 12:13:42 -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
Feanil Patel
70294b0ad2 Run 2to3 -f asserts . -w on edx-platform.
https://docs.python.org/3.5/library/2to3.html#2to3fixer-asserts
2019-12-30 10:22:19 -05:00
Giovanni Cimolin da Silva
ba4de2f933 Upgrade pymongo and fix issues
This commit upgrades the version of pymongo from 2.x to 3.x, removing usages to deprecated functions usage and fixing tests where necessary.

This version of pymongo supports MongoDB 2.x all the way up to 4.2, and this ensures that the platform will be able to run on a supported MongoDB version in the next release.
2019-12-09 15:43:56 -03:00
Nimisha Asthagiri
8cfc33c0f1 Python 3: multi-line regex replacement of assertIn and assertNotIn 2019-09-30 08:51:02 -04:00
Nimisha Asthagiri
9bbc21ea8c Python 3: multi-lined assertIn, assertNotIn -> assertContains, assertNotContains 2019-09-30 08:51:02 -04:00
Nimisha Asthagiri
beb95eb69c Python 3: assertIn -> assertContains consistency 2019-09-30 08:51:01 -04:00
Ned Batchelder
efba6e45e8 Finally import courseware properly everywhere to get rid of a warning 2019-09-26 09:40:15 -04:00
Awais Qureshi
a0e4e94e31 BOM-482
Fixing python3
2019-09-20 20:18:18 +05:00
Awais Qureshi
441e6b57b2 BOM-409
Fixing python3
2019-09-11 16:17:30 +05:00
aarif
2e7349b04e python 3 fixes
removed pdb statement

quality fixes

quality fixes

test fixes

quality fixes

python 3 fixes

removed pdb statement

quality fixes

quality fixes

test fixes

quality fixes
2019-09-04 16:02:29 +05:00
Ayub khan
f5d97260a5 Fixed all py3 tests with AssertionError: "Error: too few arguments" 2019-08-26 14:19:57 +05:00
Feanil Patel
20b7f96770 Merge pull request #21310 from edx/feanil/moar_test_collection_fixes
More test collection fixes.
2019-08-08 16:23:15 -04:00
Feanil Patel
1bb50088dc More test collection fixes. 2019-08-08 11:23:14 -04:00
aarif
61800c619f replaced StringIO imports with import from six
replaced cStringIO and StringIO imports with import from six

fixed StringIO imports

fixed StringIO imports

fixed XSS python-wrap warning
2019-08-08 00:09:16 +05:00
Feanil Patel
9ebcf758df Use our fork of this repo instead of the mitocw one. 2019-05-30 13:43:04 -04:00
David Ormsbee
99aa4bfd88 Merge pull request #20099 from stvstnfrd/sysadmin/datatable
Cleanup datatable code in sysadmin user tab
2019-05-24 15:42:23 -04:00
Stu Young
c7f6ff14da incr-277 (#20582)
* run python modernize

* run isort

* remove escape import
2019-05-16 13:21:51 -04:00
David Ormsbee
0de369a4e3 Merge pull request #20095 from stvstnfrd/sysadmin/version
Remove unused version from footer
2019-04-25 10:23:42 -04:00
stv
06602b1922 Cleanup datatable code in sysadmin user tab
There is no significant impact to this change;
it's just some general cleanup that I made while cleaning up this file..

We don't need to store these as instance variables,
since we never use them as such.
And since we've already factored out the remaining code from this
initialization method, we can drop it entirely.
2019-04-02 10:21:07 -07:00
David Ormsbee
e712be7892 Merge pull request #20094 from stvstnfrd/sysadmin/user-courses
Remove course listing from user tab of sysadmin
2019-04-01 17:45:26 -04:00
stv
21f79de92f Cache courses list on sysadmin courses page
We were performing this lookup multiple times in the POST handler;
this should increase speed and memory use, which has been problematic
with this feature.
2019-03-29 14:57:04 -07:00