Commit Graph

243 Commits

Author SHA1 Message Date
M. Zulqarnain
e35d3de376 refactor: pyupgrade on docs & pavelib (#26768) 2021-03-05 15:24:59 +05:00
usamasadiq
96f0915b0f Fixed new pylint warnings.
use generator in any/all()
disable not-callable warnings
disable no-member warnings
Suppressed smaller pylint warnings
Pin edx-proctoring==3.5.0
2021-02-22 16:36:53 +05:00
Aarif
dc6766dcce replaced unittest assertions pytest assertions for pavelib (#26514) 2021-02-16 14:57:50 +05:00
Jawayria
69e0dc7d68 Applied pylint-amnesty to {docs, import_shims, pavelib} 2021-02-02 21:17:16 +05:00
Nizar
1e872d4e10 Adds support for enabling custom tinymce plugins in Studio's HTML editor (#25695) 2021-01-11 11:28:20 -05:00
Tim McCormack
747b03febf Use node for running node.js tests, not nodejs (#25651)
This should solve the problem of getting `nodejs: not found` when
running `paver test_js_run -s lms` in lms-shell, which cropped up in
the past few days.

I don't know why this stopped working recently, but I don't have `nodejs`
on my recently re-created devstack, and some people with an older devstack
have both. Maybe a recent node.js release got rid of an alias.
2020-11-19 20:09:51 +00:00
Andrés González
6a399b3996 Added lms/static/certificates/sass to the list of directories where paver update_assets looks for sass files in themes. This allows compiling sass for certificates with comprehensive theming in place. 2020-10-09 17:30:33 -03:00
Feanil Patel
0113633369 Merge pull request #24818 from edly-io/zubair/BD-18-optimize-paver-settings-call
[BD-18] Optimize paver settings call
2020-09-10 10:19:22 -04:00
Adam Butterworth
1757fa3610 Revert "Revert "[BD-10] [DEPR-92] Remove pattern library of pavelib folder (#24591)" (#24635)" (#24695)
This reverts commit a463fbeca9.
2020-09-03 09:27:41 -04:00
emzubair
169b82261a [BD-18] Optimize paver settings call 2020-08-21 21:23:29 +05:00
Aarif
09ac7f9372 remove cyclomatic complexity calculation for python code 2020-08-04 22:10:05 +05:00
Adam Butterworth
a463fbeca9 Revert "[BD-10] [DEPR-92] Remove pattern library of pavelib folder (#24591)" (#24635)
This reverts commit 6980291d96.
2020-07-29 15:37:33 -04:00
Aura Milena Alba
6980291d96 [BD-10] [DEPR-92] Remove pattern library of pavelib folder (#24591) 2020-07-28 10:21:05 -04:00
Feanil Patel
1e4866e89b Merge branch 'master' into alanoe/fix_npm_install_error_handling_in_master 2020-06-26 15:58:37 -04:00
M. Zulqarnain
bc568309ec BOM-1701: Ran pyupgrade on pavelib (#24230) 2020-06-17 17:09:38 +05:00
Robert Raposa
b9a51eb250 update diff_quality message and tests (#23896)
- remove unused assertions
- add tests for exception handling
- update error message
2020-05-05 15:55:37 -04:00
Adam Stankiewicz
6d942bc94d revert learner portal links blocking juniper release 2020-05-04 14:55:06 -04:00
Aarif
98af9ce418 remove useless-supression warnings 2020-05-01 19:42:15 +05:00
Alan Evangelista
30495b4580 Fix 'npm install' command execution error handling
'npm install' command execution was changed from paver.easy.sh()
to subprocess.Popen() in commit 0dd13fad1b,
but exception handling was not updated accordingly. Due to this,
errors in 'npm install' execution were not detected.
2020-04-19 19:40:21 -03:00
Tim McCormack
a783690507 Fix the way we launch celery (needs pointer to celery app, not env file) (#23325)
This is a fix to PR #23222.
2020-03-06 16:08:05 +00:00
Tim McCormack
341205a85d Launch celery directly instead of via django-celery (BOM-1157) (#23222) 2020-02-27 21:53:27 +00:00
Adeel Khan
5dae91bdf8 Removing paver command
This is not needed in Makefile as
all the logic and invocation of
compilejs would be done via
ecommerce-script repo.

PROD-960
2020-02-11 23:24:39 +05:00
Jeremy Bowman
e38a100418 Fix most frequent deprecation warnings (#23023)
Fixed the most frequently occurring deprecation warnings, which were causing over half of the 34,140 deprecation warnings raised during the unit tests:

* `Use of .. or absolute path in a resource path is not allowed and will raise exceptions in a future release` - most of these were due to a single mis-configured resource path with a leading slash.
* `count is deprecated. Use Collection.count_documents instead.` - I added a handful of simple workarounds for this pymongo deprecation that shouldn't increase the query counts

Also did some cleanup of unused code in pavelib after the recent split of the new `i18n_compilejs` command from `i18n_dummy`. (This had caused a diff-quality failure on the first commit.)
2020-02-06 09:27:53 -05:00
Adeel Khan
9d6fd1d306 Adds compilejs task to paver.
This patch adds compilejs
management command to be executed
on pull translations enabling
availability of js/jsx translations
for  lms/cms code.

PROD-960
2020-01-29 22:34:53 +05:00
Awais Qureshi
220cab965f BOM-1126
Removing the moto from repo.
2020-01-15 22:34:13 +05:00
Manjinder Singh
6c69b6d435 Adding code to output pytest warnings. (#22570)
* Added pytest-json-report plugin
	- modifying app-opts in setup.cfg
	- adding hook to all conftest.py files in repo
	- setting report to be saved to test_root/log/warnings.json
	- Writing custom logic to save json report to avoid overwrite if pytest called twice
This was created to allow us to easily parse through test warnings in jenkins
2020-01-02 10:01:52 -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
Jeremy Bowman
a6b8cbe627 Remove obsolete field type BOM-996 (#22203) 2019-10-31 15:23:58 -04:00
Troy Sankey
1312e4fedf Enable PII Annotations checking enforcement
DE-1764
2019-10-29 14:47:00 -04:00
Brittney Exline
6e2887f851 Add enterprise portal links to user dropdown menu and dashboard alerts. (#21833) 2019-10-09 16:01:41 -04:00
Jeremy Bowman
ae2c3b8edf Fix mocks of open() - BOM-597 2019-09-19 13:53:37 -04:00
Feanil Patel
d01df30aac Remove pytest command tests.
These tests essentially duplicate the logic for how the pytest commands
are generated and then compare the duplicated logic to the original
logic.  This is pretty brittle and since we're running all the variants
here pretty regularly I think we have other ways of knowing if we caused
the command to break.

I don't think these tests are providing sufficient value to merit their
added complexity.
2019-09-09 10:52:57 -04:00
Feanil Patel
6c5780c807 The version of python2 we're running doesn't have the backported alias. 2019-09-05 15:54:16 -04:00
Feanil Patel
f068bab7ab Import EnvironmentVarGuard from the new location that's valid in 2.7 and 3.5 2019-09-05 11:15:00 -04:00
Ayub khan
8a95a8e520 BOM-95
assertItemsEqual with six.assertCountEqual
2019-08-21 17:01:40 +05:00
Feanil Patel
9926fa0fbd Moto got better at checking permissions in their mock.
Since we want anonymous read of these objects, we have to be explicit about
the bucket permissions or the test will fail.
2019-08-02 13:42:13 -04:00
Feanil Patel
a5afacf62a These tests don't test anything interesting.
They are running into issues because of a bug in moto but looking closer
at what they are testing.  Both tests test the happy path of the
underlying function.  In the happy path scenario all boto calls succeed
and all theses test do is test that but with all the boto calls mocked
out.  So we're just testing whether the mock is a good mock of boto
which is not useful.
2019-08-02 13:42:06 -04:00
Aarif
dc6e72652a Merge pull request #21045 from edx/INCR-391
INCR-391 Python 3 compatibility
2019-07-23 13:28:49 +05:00
aarif
bb705970b0 ran python-modernize and isort on files mentioned in INCR-391
changes made to comply with quality

ran python-modernize and isort on files mentioned in INCR-391
2019-07-22 13:48:52 +05:00
aarif
0f3cc01f59 ran python-modernize and isort on files mentioned in INCR-390
ran python-modernize and isort on files mentioned in INCR-390

ran python-modernize and isort on files mentioned in INCR-390

ran python-modernize and isort on files mentioned in INCR-390

ran python-modernize and isort on files mentioned in INCR-390

ran python-modernize and isort on files mentioned in INCR-390

ran python-modernize and isort on files mentioned in INCR-390

ran python-modernize and isort on files mentioned in INCR-390
2019-07-22 13:40:35 +05:00
Feanil Patel
ad2444204a Deal with xss linter. 2019-07-17 12:26:21 -04:00
Feanil Patel
a781523c91 Convert what's left of pavelib. 2019-07-17 12:26:21 -04:00
arbisoft
0726356d7c Fixing python-modernize issues. 2019-07-10 18:35:47 +05:00
Michael Youngstrom
139cdb8ba2 Switch testing from ecs to ec2 (#20846) 2019-06-27 22:04:02 -04:00
Jeremy Bowman
c1c4cf5bf7 Remove more unused pa11ycrawler code (#20690) 2019-05-24 15:22:08 -04:00
Jeremy Bowman
a9cd9de89f TE-2647 Stop running pa11ycrawler (#20682) 2019-05-24 11:02:49 -04:00