diff --git a/docs/guides/testing/testing.rst b/docs/guides/testing/testing.rst index 9f7f098a9f1f669c9d2bda31e4206e567d4044f0..3012352936ac86a946e984ab07afb7d7ac6271dd 100644 --- a/docs/guides/testing/testing.rst +++ b/docs/guides/testing/testing.rst @@ -700,12 +700,8 @@ To view JavaScript code style quality run this command:: Code Complexity Tools ===================== -Two tools are available for evaluating complexity of edx-platform code: +Tool(s) available for evaluating complexity of edx-platform code: -- `radon <https://radon.readthedocs.org/en/latest/>`__ for Python code - complexity. To obtain complexity, run:: - - paver run_complexity - `plato <https://github.com/es-analysis/plato>`__ for JavaScript code complexity. Several options are available on the command line; see diff --git a/openedx/features/discounts/applicability.py b/openedx/features/discounts/applicability.py index d06518bbae65e1b4cda321d3950944c5670035d6..784e3034f4efefe1b4cefb3935e4a770bf960ee1 100644 --- a/openedx/features/discounts/applicability.py +++ b/openedx/features/discounts/applicability.py @@ -155,7 +155,6 @@ def _is_in_holdback_and_bucket(user): request = get_current_request() if hasattr(request, 'session') and DISCOUNT_APPLICABILITY_HOLDBACK not in request.session: - properties = { 'site': request.site.domain, 'app_label': 'discounts', diff --git a/openedx/features/discounts/tests/test_applicability.py b/openedx/features/discounts/tests/test_applicability.py index 7d57fca3c78d468d7f905c961ceb7235a9ea324c..b00ec636ff1dc6b340f522de585bad76dbc470fe 100644 --- a/openedx/features/discounts/tests/test_applicability.py +++ b/openedx/features/discounts/tests/test_applicability.py @@ -171,6 +171,7 @@ class TestApplicability(ModuleStoreTestCase): with patch('openedx.features.discounts.applicability.stable_bucketing_hash_group', return_value=group_number): assert _is_in_holdback_and_bucket(self.user) == in_holdback + @pytest.mark.skip(reason="fix under work by revenue team") def test_holdback_expiry(self): with patch('openedx.features.discounts.applicability.stable_bucketing_hash_group', return_value=0): with patch( diff --git a/pavelib/paver_tests/test_paver_quality.py b/pavelib/paver_tests/test_paver_quality.py index b038f0fe2949c40fbfc7c1c23e956d43a2b89d45..51210b5d175d20281423ae20ab90bf797a6f1fc6 100644 --- a/pavelib/paver_tests/test_paver_quality.py +++ b/pavelib/paver_tests/test_paver_quality.py @@ -94,7 +94,7 @@ class TestPaverQualityOptions(unittest.TestCase): class TestPaverReportViolationsCounts(unittest.TestCase): """ For testing utility functions for getting counts from reports for - run_eslint, run_complexity, run_xsslint, and run_xsscommitlint. + run_eslint, run_xsslint, and run_xsscommitlint. """ def setUp(self): @@ -128,22 +128,6 @@ class TestPaverReportViolationsCounts(unittest.TestCase): actual_count = pavelib.quality._get_count_from_last_line(self.f.name, "eslint") # pylint: disable=protected-access self.assertEqual(actual_count, None) - def test_complexity_value(self): - with open(self.f.name, 'w') as f: - f.write("Average complexity: A (1.93953443446)") - actual_count = pavelib.quality._get_count_from_last_line(self.f.name, "python_complexity") # pylint: disable=protected-access - self.assertEqual(actual_count, 1.93953443446) - - def test_truncated_complexity_report(self): - with open(self.f.name, 'w') as f: - f.write("M 110:4 FooBar.default - A") - actual_count = pavelib.quality._get_count_from_last_line(self.f.name, "python_complexity") # pylint: disable=protected-access - self.assertEqual(actual_count, None) - - def test_no_complexity_report(self): - with self.assertRaises(BuildFailure): - pavelib.quality._get_count_from_last_line("non-existent-file", "python_complexity") # pylint: disable=protected-access - def test_generic_value(self): """ Default behavior is to look for an integer appearing at head of line diff --git a/pavelib/quality.py b/pavelib/quality.py index 5ec402b78e6733f88dca7b6b74ab8f193d1ac31c..38782e895723ec1642af6d9bf99cccae7d95b364 100644 --- a/pavelib/quality.py +++ b/pavelib/quality.py @@ -310,41 +310,6 @@ def run_pep8(options): # pylint: disable=unused-argument write_junit_xml('pep8') -@task -@needs('pavelib.prereqs.install_python_prereqs') -@timed -def run_complexity(): - """ - Uses radon to examine cyclomatic complexity. - For additional details on radon, see https://radon.readthedocs.org/ - """ - system_string = '/ '.join(ALL_SYSTEMS.split(',')) + '/' - complexity_report_dir = (Env.REPORT_DIR / "complexity") - complexity_report = complexity_report_dir / "python_complexity.log" - - # Ensure an empty complexity report dir is in place. - _prepare_report_dir(complexity_report_dir) - - print("--> Calculating cyclomatic complexity of python files...") - try: - sh( - "radon cc {system_string} --total-average > {complexity_report}".format( - system_string=system_string, - complexity_report=complexity_report - ) - ) - complexity_metric = _get_count_from_last_line(complexity_report, "python_complexity") - _write_metric( - complexity_metric, - (Env.METRICS_DIR / "python_complexity") - ) - print("--> Python cyclomatic complexity report complete.") - print("radon cyclomatic complexity score: {metric}".format(metric=str(complexity_metric))) - - except BuildFailure: - print("FAILURE: Unable to calculate python-only code-complexity.") - - @task @needs( 'pavelib.prereqs.install_node_prereqs', @@ -682,13 +647,8 @@ def _get_count_from_last_line(filename, file_type): return 0 last_line = report_contents.strip() - - if file_type == "python_complexity": - # Example of the last line of a complexity report: "Average complexity: A (1.93953443446)" - regex = r'\d+.\d+' - else: - # Example of the last line of a compact-formatted eslint report (for example): "62829 problems" - regex = r'^\d+' + # Example of the last line of a compact-formatted eslint report (for example): "62829 problems" + regex = r'^\d+' try: return float(re.search(regex, last_line).group(0)) diff --git a/requirements/edx/development.txt b/requirements/edx/development.txt index 49a005ed4eedbe5bd415a33c6cf84cdf59972836..f0618cc6c096a020575266f9e7f56cbfd0c310c2 100644 --- a/requirements/edx/development.txt +++ b/requirements/edx/development.txt @@ -44,7 +44,6 @@ chem==1.2.0 # via -r requirements/edx/testing.txt click-log==0.3.2 # via -r requirements/edx/testing.txt, edx-lint click==7.1.2 # via -r requirements/edx/development.in, -r requirements/edx/pip-tools.txt, -r requirements/edx/testing.txt, click-log, code-annotations, edx-lint, nltk, pip-tools, user-util code-annotations==0.4.0 # via -r requirements/edx/testing.txt, edx-enterprise -colorama==0.4.3 # via -r requirements/edx/testing.txt, radon contextlib2==0.6.0.post1 # via -r requirements/edx/testing.txt coreapi==2.3.3 # via -r requirements/edx/testing.txt, drf-yasg coreschema==0.0.4 # via -r requirements/edx/testing.txt, coreapi, drf-yasg @@ -137,12 +136,10 @@ execnet==1.7.1 # via -r requirements/edx/testing.txt, pytest-xdist factory-boy==2.8.1 # via -c requirements/edx/../constraints.txt, -r requirements/edx/testing.txt faker==4.1.1 # via -r requirements/edx/testing.txt, factory-boy filelock==3.0.12 # via -r requirements/edx/testing.txt, tox, virtualenv -flake8-polyfill==1.0.2 # via -r requirements/edx/testing.txt, radon -flake8==3.8.3 # via -r requirements/edx/testing.txt, flake8-polyfill freezegun==0.3.12 # via -c requirements/edx/../constraints.txt, -r requirements/edx/testing.txt fs-s3fs==0.1.8 # via -r requirements/edx/testing.txt, django-pyfs fs==2.0.18 # via -r requirements/edx/testing.txt, django-pyfs, fs-s3fs, xblock -future==0.18.2 # via -r requirements/edx/testing.txt, django-ses, edx-celeryutils, edx-enterprise, pycontracts, pyjwkest, radon +future==0.18.2 # via -r requirements/edx/testing.txt, django-ses, edx-celeryutils, edx-enterprise, pycontracts, pyjwkest geoip2==3.0.0 # via -c requirements/edx/../constraints.txt, -r requirements/edx/testing.txt gitdb==4.0.5 # via -r requirements/edx/testing.txt, gitpython gitpython==3.1.7 # via -r requirements/edx/testing.txt, transifex-client @@ -154,7 +151,7 @@ httpretty==0.9.7 # via -c requirements/edx/../constraints.txt, -r requi icalendar==4.0.6 # via -r requirements/edx/testing.txt idna==2.10 # via -r requirements/edx/testing.txt, requests imagesize==1.2.0 # via sphinx -importlib-metadata==1.7.0 # via -r requirements/edx/testing.txt, flake8, inflect, jsonschema, path, pluggy, pytest, pytest-randomly, tox, virtualenv +importlib-metadata==1.7.0 # via -r requirements/edx/testing.txt, inflect, jsonschema, path, pluggy, pytest, pytest-randomly, tox, virtualenv importlib-resources==3.0.0 # via -r requirements/edx/testing.txt, virtualenv inflect==3.0.2 # via -c requirements/edx/../constraints.txt, -r requirements/edx/testing.txt, jinja2-pluralize inflection==0.5.0 # via -r requirements/edx/testing.txt, drf-yasg @@ -181,12 +178,11 @@ lxml==4.5.0 # via -c requirements/edx/../constraints.txt, -r requi m2r==0.2.1 # via sphinxcontrib-openapi mailsnake==1.6.4 # via -r requirements/edx/testing.txt mako==1.1.3 # via -r requirements/edx/testing.txt, acid-xblock, lti-consumer-xblock, xblock-google-drive, xblock-utils -mando==0.6.4 # via -r requirements/edx/testing.txt, radon markdown==2.6.11 # via -c requirements/edx/../constraints.txt, -r requirements/edx/testing.txt, django-wiki, staff-graded-xblock, xblock-poll markey==0.8 # via -r requirements/edx/testing.txt, enmerkar-underscore markupsafe==1.1.1 # via -r requirements/edx/testing.txt, chem, jinja2, mako, xblock maxminddb==1.5.4 # via -c requirements/edx/../constraints.txt, -r requirements/edx/testing.txt, geoip2 -mccabe==0.6.1 # via -r requirements/edx/testing.txt, flake8, pylint +mccabe==0.6.1 # via -r requirements/edx/testing.txt, pylint mistune==0.8.4 # via m2r mock==3.0.5 # via -c requirements/edx/../constraints.txt, -r requirements/edx/testing.txt, xblock-drag-and-drop-v2, xblock-poll git+https://github.com/edx/MongoDBProxy.git@d92bafe9888d2940f647a7b2b2383b29c752f35a#egg=MongoDBProxy==0.1.0+edx.2 # via -r requirements/edx/testing.txt @@ -217,12 +213,11 @@ polib==1.1.0 # via -r requirements/edx/testing.txt, edx-i18n-tools psutil==1.2.1 # via -r requirements/edx/testing.txt, edx-django-utils py2neo==3.1.2 # via -r requirements/edx/testing.txt py==1.9.0 # via -r requirements/edx/testing.txt, pytest, pytest-forked, tox -pycodestyle==2.6.0 # via -r requirements/edx/testing.txt, flake8 +pycodestyle==2.6.0 # via -r requirements/edx/testing.txt pycontracts==1.8.12 # via -r requirements/edx/testing.txt, edx-user-state-client pycountry==20.7.3 # via -r requirements/edx/testing.txt pycparser==2.20 # via -r requirements/edx/testing.txt, cffi pycryptodomex==3.9.8 # via -r requirements/edx/testing.txt, edx-proctoring, lti-consumer-xblock, pyjwkest -pyflakes==2.2.0 # via -r requirements/edx/testing.txt, flake8 pygments==2.6.1 # via -r requirements/edx/testing.txt, diff-cover, sphinx pyjwkest==1.4.2 # via -r requirements/edx/testing.txt, edx-drf-extensions, lti-consumer-xblock pyjwt[crypto]==1.7.1 # via -r requirements/edx/testing.txt, drf-jwt, edx-rest-api-client, social-auth-core @@ -256,7 +251,6 @@ pytz==2020.1 # via -r requirements/edx/testing.txt, babel, capa, ce pyuca==1.2 # via -r requirements/edx/testing.txt pywatchman==1.4.1 # via -r requirements/edx/development.in pyyaml==5.3.1 # via -r requirements/edx/testing.txt, code-annotations, edx-django-release-util, edx-i18n-tools, sphinxcontrib-openapi, xblock -radon==4.2.0 # via -r requirements/edx/testing.txt random2==1.0.1 # via -r requirements/edx/testing.txt recommender-xblock==1.4.9 # via -r requirements/edx/testing.txt redis==2.10.6 # via -r requirements/edx/testing.txt @@ -276,7 +270,7 @@ semantic-version==2.8.5 # via -r requirements/edx/testing.txt, edx-drf-extensi shapely==1.7.0 # via -r requirements/edx/testing.txt simplejson==3.17.2 # via -r requirements/edx/testing.txt, sailthru-client, super-csv, xblock-utils singledispatch==3.4.0.3 # via -r requirements/edx/testing.txt -six==1.15.0 # via -r requirements/edx/pip-tools.txt, -r requirements/edx/testing.txt, analytics-python, astroid, bleach, bok-choy, chem, crowdsourcehinter-xblock, cryptography, diff-cover, django-classy-tags, django-countries, django-sekizai, django-simple-history, django-statici18n, django-wiki, drf-yasg, edx-ace, edx-bulk-grades, edx-ccx-keys, edx-django-release-util, edx-drf-extensions, edx-enterprise, edx-i18n-tools, edx-lint, edx-milestones, edx-opaque-keys, edx-rbac, edx-search, edx-sphinx-theme, event-tracking, freezegun, fs, fs-s3fs, help-tokens, html5lib, httpretty, isodate, jsonschema, libsass, mando, mock, openedx-calc, packaging, pathlib2, paver, pip-tools, pycontracts, pyjwkest, pytest-xdist, python-dateutil, python-memcached, python-swiftclient, singledispatch, social-auth-app-django, social-auth-core, sphinxcontrib-httpdomain, stevedore, tox, transifex-client, virtualenv, xblock +six==1.15.0 # via -r requirements/edx/pip-tools.txt, -r requirements/edx/testing.txt, analytics-python, astroid, bleach, bok-choy, chem, crowdsourcehinter-xblock, cryptography, diff-cover, django-classy-tags, django-countries, django-sekizai, django-simple-history, django-statici18n, django-wiki, drf-yasg, edx-ace, edx-bulk-grades, edx-ccx-keys, edx-django-release-util, edx-drf-extensions, edx-enterprise, edx-i18n-tools, edx-lint, edx-milestones, edx-opaque-keys, edx-rbac, edx-search, edx-sphinx-theme, event-tracking, freezegun, fs, fs-s3fs, help-tokens, html5lib, httpretty, isodate, jsonschema, libsass, mock, openedx-calc, packaging, pathlib2, paver, pip-tools, pycontracts, pyjwkest, pytest-xdist, python-dateutil, python-memcached, python-swiftclient, singledispatch, social-auth-app-django, social-auth-core, sphinxcontrib-httpdomain, stevedore, tox, transifex-client, virtualenv, xblock slumber==0.7.1 # via -r requirements/edx/testing.txt, edx-bulk-grades, edx-enterprise, edx-rest-api-client smmap==3.0.4 # via -r requirements/edx/testing.txt, gitdb snowballstemmer==2.0.0 # via sphinx diff --git a/requirements/edx/testing.in b/requirements/edx/testing.in index e2ce4928ec236a6e12a16e921bc4b11081be3117..0a1ecbf998972654b15b931ca8fb0f07f96064b3 100644 --- a/requirements/edx/testing.in +++ b/requirements/edx/testing.in @@ -41,7 +41,6 @@ pytest-json-report # Output json formatted warnings after running pytest pytest-metadata==1.8.0 # To prevent 'make upgrade' failure, dependency of pytest-json-report pytest-randomly # pytest plugin to randomly order tests pytest-xdist # Parallel execution of tests on multiple CPU cores or hosts -radon # Calculates cyclomatic complexity of Python code (code quality utility) selenium # Browser automation library, used for acceptance tests singledispatch # Backport of functools.singledispatch from Python 3.4+, used in tests of XBlock rendering testfixtures # Provides a LogCapture utility used by several tests diff --git a/requirements/edx/testing.txt b/requirements/edx/testing.txt index 6fe9bee8cd591fbb97e5d0fcb24f41dca9cc004d..ed7bda2449bd640d3b1d439dc7c52a3fc111c4f8 100644 --- a/requirements/edx/testing.txt +++ b/requirements/edx/testing.txt @@ -43,7 +43,6 @@ chem==1.2.0 # via -r requirements/edx/base.txt click-log==0.3.2 # via edx-lint click==7.1.2 # via -r requirements/edx/base.txt, click-log, code-annotations, edx-lint, nltk, user-util code-annotations==0.4.0 # via -r requirements/edx/base.txt, -r requirements/edx/testing.in, edx-enterprise -colorama==0.4.3 # via radon contextlib2==0.6.0.post1 # via -r requirements/edx/base.txt coreapi==2.3.3 # via -r requirements/edx/base.txt, drf-yasg coreschema==0.0.4 # via -r requirements/edx/base.txt, coreapi, drf-yasg @@ -133,12 +132,10 @@ execnet==1.7.1 # via pytest-xdist factory-boy==2.8.1 # via -c requirements/edx/../constraints.txt, -r requirements/edx/testing.in faker==4.1.1 # via factory-boy filelock==3.0.12 # via tox, virtualenv -flake8-polyfill==1.0.2 # via radon -flake8==3.8.3 # via flake8-polyfill freezegun==0.3.12 # via -c requirements/edx/../constraints.txt, -r requirements/edx/testing.in fs-s3fs==0.1.8 # via -r requirements/edx/base.txt, django-pyfs fs==2.0.18 # via -r requirements/edx/base.txt, django-pyfs, fs-s3fs, xblock -future==0.18.2 # via -r requirements/edx/base.txt, django-ses, edx-celeryutils, edx-enterprise, pycontracts, pyjwkest, radon +future==0.18.2 # via -r requirements/edx/base.txt, django-ses, edx-celeryutils, edx-enterprise, pycontracts, pyjwkest geoip2==3.0.0 # via -c requirements/edx/../constraints.txt, -r requirements/edx/base.txt gitdb==4.0.5 # via gitpython gitpython==3.1.7 # via transifex-client @@ -149,7 +146,7 @@ html5lib==1.1 # via -r requirements/edx/base.txt, ora2 httpretty==0.9.7 # via -c requirements/edx/../constraints.txt, -r requirements/edx/testing.in icalendar==4.0.6 # via -r requirements/edx/base.txt idna==2.10 # via -r requirements/edx/base.txt, requests -importlib-metadata==1.7.0 # via -r requirements/edx/base.txt, -r requirements/edx/coverage.txt, flake8, inflect, path, pluggy, pytest, pytest-randomly, tox, virtualenv +importlib-metadata==1.7.0 # via -r requirements/edx/base.txt, -r requirements/edx/coverage.txt, inflect, path, pluggy, pytest, pytest-randomly, tox, virtualenv importlib-resources==3.0.0 # via virtualenv inflect==3.0.2 # via -c requirements/edx/../constraints.txt, -r requirements/edx/coverage.txt, jinja2-pluralize inflection==0.5.0 # via -r requirements/edx/base.txt, drf-yasg @@ -174,12 +171,11 @@ lti-consumer-xblock==2.1.0 # via -r requirements/edx/base.txt lxml==4.5.0 # via -c requirements/edx/../constraints.txt, -r requirements/edx/base.txt, capa, edxval, lti-consumer-xblock, ora2, pyquery, safe-lxml, xblock, xmlsec mailsnake==1.6.4 # via -r requirements/edx/base.txt mako==1.1.3 # via -r requirements/edx/base.txt, acid-xblock, lti-consumer-xblock, xblock-google-drive, xblock-utils -mando==0.6.4 # via radon markdown==2.6.11 # via -c requirements/edx/../constraints.txt, -r requirements/edx/base.txt, django-wiki, staff-graded-xblock, xblock-poll markey==0.8 # via -r requirements/edx/base.txt, enmerkar-underscore markupsafe==1.1.1 # via -r requirements/edx/base.txt, -r requirements/edx/coverage.txt, chem, jinja2, mako, xblock maxminddb==1.5.4 # via -c requirements/edx/../constraints.txt, -r requirements/edx/base.txt, geoip2 -mccabe==0.6.1 # via flake8, pylint +mccabe==0.6.1 # via pylint mock==3.0.5 # via -c requirements/edx/../constraints.txt, -r requirements/edx/base.txt, xblock-drag-and-drop-v2, xblock-poll git+https://github.com/edx/MongoDBProxy.git@d92bafe9888d2940f647a7b2b2383b29c752f35a#egg=MongoDBProxy==0.1.0+edx.2 # via -r requirements/edx/base.txt mongoengine==0.20.0 # via -r requirements/edx/base.txt @@ -208,12 +204,11 @@ polib==1.1.0 # via -r requirements/edx/base.txt, -r requirements/ed psutil==1.2.1 # via -r requirements/edx/base.txt, edx-django-utils py2neo==3.1.2 # via -r requirements/edx/base.txt py==1.9.0 # via pytest, pytest-forked, tox -pycodestyle==2.6.0 # via -r requirements/edx/testing.in, flake8 +pycodestyle==2.6.0 # via -r requirements/edx/testing.in pycontracts==1.8.12 # via -r requirements/edx/base.txt, edx-user-state-client pycountry==20.7.3 # via -r requirements/edx/base.txt pycparser==2.20 # via -r requirements/edx/base.txt, cffi pycryptodomex==3.9.8 # via -r requirements/edx/base.txt, edx-proctoring, lti-consumer-xblock, pyjwkest -pyflakes==2.2.0 # via flake8 pygments==2.6.1 # via -r requirements/edx/base.txt, -r requirements/edx/coverage.txt, diff-cover pyjwkest==1.4.2 # via -r requirements/edx/base.txt, edx-drf-extensions, lti-consumer-xblock pyjwt[crypto]==1.7.1 # via -r requirements/edx/base.txt, drf-jwt, edx-rest-api-client, social-auth-core @@ -245,7 +240,6 @@ python3-saml==1.9.0 # via -r requirements/edx/base.txt pytz==2020.1 # via -r requirements/edx/base.txt, babel, capa, celery, django, django-ses, edx-completion, edx-enterprise, edx-proctoring, edx-submissions, edx-tincan-py35, event-tracking, fs, icalendar, ora2, xblock pyuca==1.2 # via -r requirements/edx/base.txt pyyaml==5.3.1 # via -r requirements/edx/base.txt, code-annotations, edx-django-release-util, edx-i18n-tools, xblock -radon==4.2.0 # via -r requirements/edx/testing.in random2==1.0.1 # via -r requirements/edx/base.txt recommender-xblock==1.4.9 # via -r requirements/edx/base.txt redis==2.10.6 # via -r requirements/edx/base.txt @@ -265,7 +259,7 @@ semantic-version==2.8.5 # via -r requirements/edx/base.txt, edx-drf-extensions shapely==1.7.0 # via -r requirements/edx/base.txt simplejson==3.17.2 # via -r requirements/edx/base.txt, sailthru-client, super-csv, xblock-utils singledispatch==3.4.0.3 # via -r requirements/edx/testing.in -six==1.15.0 # via -r requirements/edx/base.txt, -r requirements/edx/coverage.txt, analytics-python, astroid, bleach, bok-choy, chem, crowdsourcehinter-xblock, cryptography, diff-cover, django-classy-tags, django-countries, django-sekizai, django-simple-history, django-statici18n, django-wiki, drf-yasg, edx-ace, edx-bulk-grades, edx-ccx-keys, edx-django-release-util, edx-drf-extensions, edx-enterprise, edx-i18n-tools, edx-lint, edx-milestones, edx-opaque-keys, edx-rbac, edx-search, event-tracking, freezegun, fs, fs-s3fs, help-tokens, html5lib, httpretty, isodate, libsass, mando, mock, openedx-calc, packaging, pathlib2, paver, pycontracts, pyjwkest, pytest-xdist, python-dateutil, python-memcached, python-swiftclient, singledispatch, social-auth-app-django, social-auth-core, stevedore, tox, transifex-client, virtualenv, xblock +six==1.15.0 # via -r requirements/edx/base.txt, -r requirements/edx/coverage.txt, analytics-python, astroid, bleach, bok-choy, chem, crowdsourcehinter-xblock, cryptography, diff-cover, django-classy-tags, django-countries, django-sekizai, django-simple-history, django-statici18n, django-wiki, drf-yasg, edx-ace, edx-bulk-grades, edx-ccx-keys, edx-django-release-util, edx-drf-extensions, edx-enterprise, edx-i18n-tools, edx-lint, edx-milestones, edx-opaque-keys, edx-rbac, edx-search, event-tracking, freezegun, fs, fs-s3fs, help-tokens, html5lib, httpretty, isodate, libsass, mock, openedx-calc, packaging, pathlib2, paver, pycontracts, pyjwkest, pytest-xdist, python-dateutil, python-memcached, python-swiftclient, singledispatch, social-auth-app-django, social-auth-core, stevedore, tox, transifex-client, virtualenv, xblock slumber==0.7.1 # via -r requirements/edx/base.txt, edx-bulk-grades, edx-enterprise, edx-rest-api-client smmap==3.0.4 # via gitdb social-auth-app-django==4.0.0 # via -r requirements/edx/base.txt diff --git a/scripts/Jenkinsfiles/quality b/scripts/Jenkinsfiles/quality index 8ed91ec29e275e8605b512642f95a5f8ea74f738..95c2d815fdf914a6ffbd17929e69b4c42316d9ab 100644 --- a/scripts/Jenkinsfiles/quality +++ b/scripts/Jenkinsfiles/quality @@ -198,7 +198,7 @@ pipeline { // Publish Quality report publishHTML([allowMissing: true, alwaysLinkToLastBuild: false, keepAll: true, reportDir: 'reports/metrics/', - reportFiles: 'pylint/*view*/,pep8/*view*/,python_complexity/*view*/,xsscommitlint/*view*/,xsslint/*view*/,eslint/*view*/,pii/*view*/', + reportFiles: 'pylint/*view*/,pep8/*view*/,xsscommitlint/*view*/,xsslint/*view*/,eslint/*view*/,pii/*view*/', reportName: 'Quality Report', reportTitles: '']) } finally { if (env.ghprbPullId != null) { diff --git a/scripts/circle-ci-tests.sh b/scripts/circle-ci-tests.sh index 4888706534e0860c90ed49a85083d51f7ad34260..202591e31639b100c3783fabdad6adf10744c6a5 100755 --- a/scripts/circle-ci-tests.sh +++ b/scripts/circle-ci-tests.sh @@ -71,9 +71,6 @@ else # Run quality task. Pass in the 'fail-under' percentage to diff-quality paver run_quality -p 100 || EXIT=1 - echo "Running code complexity report (python)." - paver run_complexity > reports/code_complexity.log || echo "Unable to calculate code complexity. Ignoring error." - exit $EXIT ;; diff --git a/scripts/generic-ci-tests.sh b/scripts/generic-ci-tests.sh index 372fd53a51e3cdd35397f49643bcbc25d6030fd7..1dabf274f3257598ab70a493ba3ac1fc2cae13a8 100755 --- a/scripts/generic-ci-tests.sh +++ b/scripts/generic-ci-tests.sh @@ -127,8 +127,6 @@ case "$TEST_SUITE" in run_paver_quality run_eslint -l $ESLINT_THRESHOLD || { EXIT=1; } echo "Finding Stylelint violations and storing report..." run_paver_quality run_stylelint -l $STYLELINT_THRESHOLD || { EXIT=1; } - echo "Running code complexity report (python)." - run_paver_quality run_complexity || echo "Unable to calculate code complexity. Ignoring error." echo "Running xss linter report." run_paver_quality run_xsslint -t $XSSLINT_THRESHOLDS || { EXIT=1; } echo "Running safe commit linter report."