openedx / edx-django-utils

edX utilities for Django Application development.
https://edx.readthedocs.io/projects/edx-django-utils/en/latest/
Apache License 2.0
26 stars 20 forks source link

Adding plugin code from edx-platform #48

Closed jinder1s closed 4 years ago

jinder1s commented 4 years ago

PR in edx-platform that tests this move: https://github.com/edx/edx-platform/pull/24678

previous location in edx-platform: https://github.com/edx/edx-platform/tree/master/openedx/core/djangoapps/plugins

This is mostly a drop in replacement, though with some link changes and I ran black on plugin directory. Link to working sandbox: https://plugless.sandbox.edx.org/

Description:

Describe in a couple of sentence what this PR adds

JIRA:

XXX-XXXX

Dependencies:

List dependencies on other outstanding PRs, issues, etc.

Merge deadline:

List merge deadline (if any)

Installation instructions:

List any non-trivial installation instructions.

Testing instructions:

  1. Open page A
  2. Do thing B
  3. Expect C to happen
  4. If D happened instead - check failed.

Reviewers:

Merge checklist:

Post merge:

Author concerns:

List any concerns about this PR - inelegant solutions, hacks, quick-and-dirty implementations, concerns about migrations, etc.

jinder1s commented 4 years ago
  • Temporarily omit files from codecov with TODO comment pointing to ticket that will add coverage.

Can you elaborate more on what you mean by "add coverage"? @robrap Also, by omit files, you mean add plugins directory to omit in .coveragerc. Or should I comment out the patch section in codecov.yml?

robrap commented 4 years ago

@jinder1s: I mean adding tests.

robrap commented 4 years ago

You could add the pragma for no cover (search for ‘pragma’) to the if statement below to bump up coverage for the project.

38 | 4 | declared_middleware = getattr(settings, 'MIDDLEWARE', None) 39 |   | if declared_middleware is None and django.VERSION[0] < 2: 40 |   | declared_middleware = settings.MIDDLEWARE_CLASSES # Pre-Django 2 support