Commit Graph

56 Commits

Author SHA1 Message Date
Robert Raposa
8ef8b35a54 docs: update toggle docs
A variety of updates were made to improve the toggle documentation:
* Added comments to help ensure that the waffle(), waffle_switches(),
  waffle_flags() anti-pattern won't be contagious (copied).
* Some minor toggle_description updates.
* Removed empty toggle_target_removal_date annotations for
  non-temporary toggles.
* Removed empty optional toggle_warnings annotations.
* Removed empty optional toggle_tickets annotations.
* Removed deprecated toggle_category, toggle_status,
  and toggle_expiration_date annotations.
* Fixed some indents, use cases, and implementations.

ARCHBOM-1721
2021-04-01 21:58:29 -04: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
M. Zulqarnain
e505d99237 pyupgrade on lms gating and grades apps (#26532) 2021-02-22 12:58:41 +05:00
Aarif
906b6f7fed replaced unittest assertions pytest assertions (19) (#26545) 2021-02-18 18:00:30 +05:00
M. Zulqarnain
0213fde968 BOM-2281 : Pylint amnesty for grades,gating and instructor app (#26343)
* pyint amnesty for grades,gating and instructor app
2021-02-03 18:14:35 +05:00
Régis Behmo
a16cd71046 Start waffle namespace deprecation
By explicitly importing the legacy namespace classes, we make it clear
that we are using soon-to-be-deprecated classes. We will then be able to
start removing the legacy classes, one module at a time.
2020-12-03 16:06:14 +01:00
Manjinder Singh
c74b623948 Fixing code-annotations (#25539)
* Fixing code-annotations
2020-11-06 12:52:08 -05:00
Régis Behmo
4586002956 Import waffle classes from edx_toggles instead of waffle_utils
Those classes were ported to edx_toggles. The imports remain in
waffle_utils.__init__ for backward compatibility.
2020-11-03 19:25:37 +01:00
Régis Behmo
3b127f8c92 Deprecate WaffleSwitch.override* methods
This allows us to get rid of the custom WaffleSwitch and
WaffleSwitchNamespace classes from waffle_utils in favour of
edx_toggles.toggles classes.
2020-11-03 19:25:37 +01:00
Régis Behmo
2307dff4c9 Deprecate WaffleFlag.override method
This allows us to get rid of waffle_utils' custom WaffleFlag method.
2020-11-03 19:25:37 +01:00
Régis Behmo
98a13d6a7e Remove deprecated toggle_status annotation
This annotation is deprecated since code-annotations==0.7.0
2020-09-16 15:19:15 +02:00
Régis Behmo
d1f9e769d0 Simplify the toggle_use_case annotation
Since code-annotations==0.7.0, incremental_release, launch_date,
monitored_rollout, graceful_degradation, beta_testing are all considered
as "temporary" use cases.
2020-09-16 15:16:13 +02:00
Régis Behmo
9445bbe930 Document lms/djangoapps/grades feature toggles 2020-09-16 15:16:13 +02:00
Régis Behmo
307457a255 Simplify hack to obtain waffle module names
Instead of going up the stacktrace to find the module names of waffle
flags and switches, we manually pass the module __name__ whenever the
flag is created. This is similar to `logging.getLogger(__name__)`
standard behaviour.

As the waffle classes are used outside of edx-platform, we make the new
module_name argument an optional keyword argument. This will change once
we pull waffle_utils outside of edx-platform.

Note that the module name is normally only required to view the list of
existing waffle flags and switches. The module name should not be
necessary to verify if a flag is enabled. Thus, maybe it would make
sense to create a `add` class methor similar to:

    class WaffleFlag:
        @classmethod
        def add(cls, namespace, flag, module):
            instance = cls(namespace, flag)
            cls._class_instances.add((instance, module))
2020-09-14 09:30:24 +02:00
Robert Raposa
77e490f057 ARCHBOM-1305: remove deprecated flag_undefined_default (#24426)
This is the final step in removing the deprecated
flag_undefined_default as explained by the following ADR:
https://github.com/edx/edx-platform/blob/master/openedx/core/djangoapps/waffle_utils/docs/decisions/0001-refactor-waffle-flag-default.rst

Notes:

* All uses of flag_undefined_default=False were always
  supposed to have been no-ops.
* All uses of flag_undefined_default=True that are removed
  in this PR have been replaced by migrations in past PRs.
* The temporary metric temp_flag_default_used id no longer
  reporting any data.

ARCHBOM-1305
2020-07-09 09:31:31 -04:00
Robert Raposa
9b0024376a update flags using flag_undefined_default=True
In order to enable us to remove flag_undefined_default, this
updates flags according to alternatives documented in:
https://github.com/edx/edx-platform/blob/master/openedx/core/djangoapps/waffle_utils/docs/decisions/0001-refactor-waffle-flag-default.rst

These flags were updated with a migration:
- enable_checklists_quality
- REJECTED_EXAM_OVERRIDES_GRADE
- ENFORCE_FREEZE_GRADE_AFTER_COURSE_END
- WRITABLE_GRADEBOOK

ARCHBOM-1304
2020-06-23 14:37:50 -04: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
Manjinder Singh
a384e753fd BOM-933: Fix type mismatches in various migrations (#22112)
* Fix type mismatches in the course_modes migrations

* Fix type mismatches in the course_action_state migrations

* Fix type mismatches in the schedules migrations

* Fix type mismatches in grades migrations

* Fix type mismatches in video_pipeline

* Fix type mismatches in api_admin

* Fix mismatches in credential migrations
2019-10-24 11:42:39 -04:00
Ayub khan
5c47a3b425 BOM Project
Updated __unicode__ to __str__
2019-09-25 18:31:54 +05:00
Matt Hughes
0ad8753cd6 Add waffle for hiding bulk management in masters courses 2019-08-20 16:32:13 -04:00
Stu Young
3e11ac8863 INCR-314 Run python-modernize on lms/djangoapps/grades/config and lms/djangoapps/grades/settings (#20611)
* run python modernize

* run isort

* Fix quality
2019-05-21 11:42:18 -04:00
Nimisha Asthagiri
eb0791ec89 Inter-app API cleanup for Grades 2019-05-04 11:35:06 -04:00
Julia Eskew
368f221f0a Initial start on annotations. 2019-02-19 11:24:21 -05:00
Michael Youngstrom
3221c2b91f Remove lms pytest shards 2019-02-12 11:03:46 -05:00
Simon Chen
e8e396cac5 Roll out gradebook waffle flag to be default on 2019-02-06 14:00:11 -05:00
Ned Batchelder
3353e7425e Remove unused imports 2018-11-03 16:07:05 -04:00
Alex Dusenbery
e5473f5396 Add the read API for course gradebook data (single and multiple users). 2018-10-12 10:48:34 -04:00
Simon Chen
929ca61e6c Default the waffle flag to be on 2018-10-05 11:54:04 -04:00
Nimisha Asthagiri
ddafbb0d29 POC: Stop-gap implementation to freeze grades. 2018-10-04 08:13:35 -04:00
Nimisha Asthagiri
700a902b68 Cleanup and remove deprecated RequestCache Django app
ARCH-223
2018-09-12 14:39:11 -04:00
Robert Raposa
ba4cc62ff8 Retire deprecated RequestCache (Take 2)
ARCH-223
2018-09-08 15:09:28 -04:00
Nimisha Asthagiri
4ca165f690 Revert "ARCH-223: Retire deprecated RequestCache." 2018-08-30 16:33:03 -04:00
Robert Raposa
3df339a56a Retire deprecated RequestCache.
ARCH-223
2018-08-30 08:55:19 -04:00
Jeremy Bowman
1a5bf35357 TE-2689 Remove useless pylint suppressions part 2 2018-08-14 17:39:02 -04:00
Stuart Young
1fd2167144 rebalance python unittests onto new shards 2018-05-03 11:16:05 -04:00
Jeremy Bowman
bf86b3da98 PLAT-1942 Handle xmodule_django field deprecations 2018-02-05 15:05:54 -05:00
Troy Sankey
381af53ad5 Merge pull request #17130 from edx/jeskew/fix_lms_shard_4_tests_django_111
LMS shard 4 tests Django 1.11
2018-01-29 14:14:22 -05:00
Qubad786
64555c60c0 Move request_cache to openedx.core.djangoapps 2018-01-26 15:09:25 +05:00
John Eskew
27edca3c5e Replace all clean_course_id form methods with common method. 2018-01-25 11:38:46 -05:00
Jeremy Bowman
669aa13ad6 PLAT-1873 to_deprecated_string() cleanup part 2 2018-01-08 17:26:55 -05:00
Nimisha Asthagiri
f8e3a3c461 Grades Cleanup
EDUCATOR-1405
EDUCATOR-1451
2017-10-02 19:03:26 -04:00
Nimisha Asthagiri
1febdbfac9 Grades cleanup: remove read_only param and create method
EDUCATOR-171
2017-09-28 07:48:25 -04:00
Nimisha Asthagiri
083ccdb95a Remove unneeded WRITE_ONLY_IF_ENGAGED waffle switch 2017-09-25 16:13:07 -04:00
Tyler Hallada
623ea5eb40 Merge branch 'master' into EDUCATOR-926 2017-08-09 11:22:05 -04:00
Alex Dusenbery
aafd4d9c61 Turn down grades logging; put policy change regrade behind a waffle killswitch. 2017-08-03 14:06:17 -04:00
Tyler Hallada
f92c96ef05 Add course flag and service for grade override 2017-08-02 10:22:19 -04:00
Andy Armstrong
79acb5c5be Reorder LMS imports using isort 2017-06-11 21:48:06 -04:00
Robert Raposa
eaab2cf444 Add course overrides of waffle flags. 2017-06-01 15:12:50 -04:00
J. Cliff Dyer
4f6d5d9ce9 Estimate creation time for subsections grades based on timestamp of
incoming scores.

TNL-6697
2017-04-18 16:51:17 -04:00
Nimisha Asthagiri
1503e5f768 Grade only engaged learners
Add a new waffle switch that allows us to assume zero grades for
learners who have no entry previously recorded, and another to
disable persisting grades for unengaged learners.

TNL-6691
2017-04-11 10:41:57 -04:00