Commit Graph

735 Commits

Author SHA1 Message Date
M. Zulqarnain
2c44315ce0 refactor: pyupgrade on pavelib & scripts (#26769) 2021-03-12 14:14:53 +05:00
Jeremy Bowman
1692081dd0 Fix diff-cover with recent git versions on shallow repositories (#26879)
When we tried upgrading Jenkins workers from Ubuntu 16.04 to 20.04, `diff-cover` started silently failing with a return code of `1`.  We suspect this is due to https://github.com/Bachmann1234/diff_cover/issues/153 , so we're adding the workaround described in that ticket.
2021-03-08 10:23:50 -05:00
M. Zulqarnain
e35d3de376 refactor: pyupgrade on docs & pavelib (#26768) 2021-03-05 15:24:59 +05:00
Usman Khalid
6af0eb5c28 test: Ignore running tests from /common/lib/pytest_cache. 2021-03-02 23:55:48 +05:00
Ned Batchelder
981ecb675e build: private.txt files weren't handled properly
The requirements/edx/private.txt file is for dev's own private package
needs.  There are two installation mechanisms in edx-platform, and
neither handled the file properly:

- `paver install_prereqs` had the wrong file name.  The file was moved
  almost three years ago, and paver wasn't kept up.

- `make requirements` used `private.*` which included private.in, which
  pip-sync balks at.
2021-02-26 22:19:47 -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
d1c21db40f Resolved error 2021-02-02 21:20:41 +05:00
Jawayria
69e0dc7d68 Applied pylint-amnesty to {docs, import_shims, pavelib} 2021-02-02 21:17:16 +05:00
Régis Behmo
f90d495ed8 Fix paver update_assets warning on missing sass dir (#25771)
On missing sass directory, the following kind of warning was printed:

        Sass dir '[{'sass_source_dir': path('lms/static/sass'), 'css_destination_dir': Path('/openedx/themes/indigo/lms/static/css'), 'lookup_paths': [Path('/openedx/themes/indigo/lms/static/sas│..  s/partials'), path('lms/static/sass/partials'), path('lms/static/sass')]}, {'sass_source_dir': Path('/openedx/themes/indigo/lms/static/sass'), 'css_destination_dir': Path('/openedx/themes│.  /indigo/lms/static/css'), 'lookup_paths': [Path('/openedx/themes/indigo/lms/static/sass/partials'), path('lms/static/sass/partials'), path('lms/static/sass')]}, {'sass_source_dir': Path('│ /openedx/themes/indigo/lms/static/certificates/sass'), 'css_destination_dir': Path('/openedx/themes/indigo/lms/static/certificates/css'), 'lookup_paths': [Path('/openedx/themes/indigo/lms│ /static/sass/partials'), Path('/openedx/themes/indigo/lms/static/sass')]}]' does not exists, skipping sass compilation for '/openedx/themes/indigo'

Which was rather inconvenient. Instead, we now print the following
warning:

    Sass dir '/openedx/themes/indigo/lms/static/certificates/sass' does not exists, skipping sass compilation for '/openedx/themes/indigo'
2021-01-15 15:40:21 -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
Diana Huang
a4ca84e92a Add DJANGO_SETTINGS_MODULE to pylint runs. 2020-12-22 09:41:24 -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
Felipe Montoya
d876a79f0e Merge pull request #25322 from aulasneo/BTR-15
Fix certificate sass assets collection for comprehensive themes
2020-11-10 16:41:38 -05:00
Jeremy Bowman
efc04e3399 Remove notifier_api app DEPR-111 (#25464)
Part of the notifier service deprecation (DEPR-106).

Also removed pdfminer from the package uninstall list, since we no longer install the package it conflicts with either.
2020-10-29 11:17:23 -04:00
Andrés González
e45a88a940 Use variables for certificate sass dir 2020-10-13 16:43:39 -03: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
morenol
a4a7e63ef8 Remove usage of enum34, since we are already in python>=3.4 (#24337)
enum34 is causing problems in python3.8 tests of edx-platform because it has incompatibility with recent versions of python, the error the error happens while importing the re module in these python versions.

This library is a backport of enum of python3.4 made for python<3.4, therefore is not needed anymore.

edx-val was updated to remove that dependency: https://github.com/edx/edx-val/pull/245
2020-06-26 13:13:12 -04:00
M. Zulqarnain
bc568309ec BOM-1701: Ran pyupgrade on pavelib (#24230) 2020-06-17 17:09:38 +05:00
Adam Butterworth
42cc0d0145 Fix all stylelint errors (#23920)
* Fix all stylelint errors

For any errors that fixing would require changing the output of the css disable stylelint for that line instead of modifying.

* Update quality.py

Make stylelint quality check pass when there are no errors

* Delete empty selectors
2020-05-06 16:07:14 -04: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
Robert Raposa
b14ebfd9ac fix diff quality (#23875) 2020-05-04 09:49:20 -04:00
Aarif
98af9ce418 remove useless-supression warnings 2020-05-01 19:42:15 +05:00
Robert Raposa
5de9eed420 ARCHBOM-1093: Fix unit test enable-migrations (#23789)
* fix old migrations
* fix a test
* fix enable-migrations cmd argument
* enhance verbose logging to log migrations
* update testing doc with help
2020-04-23 14:04:29 -04: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
Aarif
6ee2089077 fixed warnings for wrong-import-order 2020-04-08 23:43:06 +05:00
Stu Young
9b9e2f7e67 add reserved keyword linter to CI (#23499) 2020-04-01 10:30:46 -04:00
Ayub-khan
3c1140dc49 BOM-1045
-Upgrade edx-drf-extensions
-settings-update
2020-03-10 16:06:02 +05: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
Awais Jibran
9f456e28b7 Fix Pavelib prereqs.
Do not read file as bytes, as it would fail the comparison of byte with str.
PROD-1322
2020-02-26 22:48:20 +05:00
Calen Pennington
646cf1ed12 Replace old coverage context files when uploading 2020-02-12 11:29:32 -05: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
Jeremy Bowman
7bbd229526 Unpin more outdated dependencies (#22898)
Unpin several more outdated dependencies whose changelogs don't contain any significant backwards incompatible changes. Also add "moto" to the list of packages to uninstall from existing environments, since it requires a jsondiff version that clashes with the one we now use (triggering a harmless but distracting warning on dependency updates).

We can potentially stop using path.py/path altogether by switching to pathlib in the Python 3 standard library, but that merits a separate PR of its own.

Also, note that I'm not actually unpinning freezegun; different PRs restricted it in both constraints.txt and test.in, I'm just removing the latter redundant constraint.
2020-01-23 06:59:32 -05:00
Awais Qureshi
220cab965f BOM-1126
Removing the moto from repo.
2020-01-15 22:34:13 +05:00
Calen Pennington
8091b7d45b Allow debugging collect static during paver update_assets 2020-01-07 09:32:30 -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