...
(HIGH) Ensure undefined annotations are not allowed.
For example, if
toggle_warnings
were used instead oftoggle_warning
, linting would complain.Without this, the annotation would be visible in code, but it wouldn’t make it to readthedocs and you wouldn’t know it without checking.
Removing the unnecessary ability to add comments in-between annotations would simplify the regex update required for this.
Note: I think this may be causing us not to catch other linting issues with bad indents.
(HIGHMEDIUM) Possible bug where required fields for
temporary
use case might be missed when multiple use cases are listed.Note: When we This is not high priority, because we should prioritize switch to new
toggle_life_expectancy
annotation, which will make this goes go away.
(MEDIUM) Ensure optional annotations are not set to
None
.Applies to specific annotations where
None
is not a valid value (e.g.toggle_warning
).See example of where None is copied often and leads to a lot of extra code and useless docs.
[RG]* (HIGH) Ensure a properly formatted date for
toggle_target_removal_date
annotation.Examples with toggle_target_removal_date of None, even though it is required.
Many of the examples also added unnecessary text to
toggle_warnings
thattoggle_target_removal_date
was not set.Possibly authors documented during docathon, and were afraid to set a date.
How-to was updated with proposal for how to choose a date. Linting failure help text could point to these docs.
Check
toggle_implementation
annotation matches actual implementation class used when possible.No linting exists to ensure settings are annotated.
Needs brainstorming if we think this would be important.
No linting exists to ensure ConfigModels with booleans are annotated.
...
Update Toggle and Setting Annotation Definition
[RG]* (HIGH) Rename
toggle_warnings
totoggle_warning
for consistency.Use combo of expand/contract or lint amnesty.
[RG]* (HIGH) Implement ADR 0005-toggle-life-expectancy.rst.
See ADR Consequences for details.
...
(HIGH) Enhance BaseToggle with additional methods.
Add
is_disabled
(notis_enabled
),is_on
(is_enabled
) andis_off
(notis_enabled
)Question: Would
is_true()
andis_false()
be better thanis_on/is_off
?[Robert Raposa] I like
is_true/is_false
better. Someone else should second my opinion and we can update this proposal.
Makes a variety of conditions more readable when
ENABLE_
orDISABLE_
are in the toggle name.For example:
not DISABLE_SOME_FEATURE.is_enabled() # BEFORE; brain twister
DISABLE_SOME_FEATURE.is_off() # AFTER
Question: Is this simpler to understand?:
DISABLE_SOME_FEATURE.is_false() # AFTER
This problem was discussed on Slack.
Replace or improve
ExperimentWaffleFlag