-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat:added toggle methods to basemodel #293
feat:added toggle methods to basemodel #293
Conversation
Thanks for the pull request, @Theo-flux! Please note that it may take us up to several weeks or months to complete a review and merge your PR. Feel free to add as much of the following information to the ticket as you can:
All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here. Please let us know once your PR is ready for our review and all tests are green. |
@mphilbrick211: You can ping me once Contributor Agreement is complete. Thank you! |
@Theo-flux please see the details about our CLA requirement in this comment. |
@ I have gone through it. Kindly let me know what exactly I am to do if there is one. Thanks |
Did you receive a document for e-signature yet? |
@Theo-flux: Ed had written:
Can you respond. You still don't have a signed Contributor Agreement and I can't proceed with the review until that is complete. Thank you. |
|
@Theo-flux: I’m not sure if your response was lost, but the only thing you included was a quote. |
@robrap I haven't received any mail from docusign for the e-signature. However, I send another request for the CLA. Let's see how it goes before the end of tomorrow. Sorry about the delay. Thanks. |
@Theo-flux: Thanks and good luck. Also, this time you commented twice, so not sure if you are experiencing connectivity issues. |
OK. Yes I have connectivity issues at the moment. Thanks. |
@robrap I am still yet to receive the mail. Could this be a problem from my end ? |
Hi @Theo-flux! I checked on the CLA for you, and it shows we sent it to you on July 10th, but that it hasn't been completed. Our legal counsel is out-of-office, so she may not have signed yet and that's why it's showing as incomplete. If you've already signed, we can have someone sign in her absence. Thanks! |
Hello @mphilbrick211 I just searched my mails again between 10 July till now and i found nothing. Kindly let me know what next to do. Thanks. |
Thanks for confirming, @Theo-flux - I'm looking into this for you! |
@robrap and @mphilbrick211 Good day. I hope the day is going well ? I would like to know if there is any update concerning the CLA agreement. Thanks for your responses so far. |
@Theo-flux you should have received a message from DocuSign on or around the 13th. Can you double check? |
@e0d I have gone through my mail still, I have nothing relating to DocuSign. Is it advisable I send another CLA request now ? |
@Theo-flux can send an email to [email protected]? I suppose there's some chance there was a typo in your email address or similar. We can work through that in a private channel. |
@e0d Thanks, I just sent the mail now. |
@mphilbrick211 @robrap @e0d Thanks for your help. The CLA has been signed and sent back. Thanks alot! |
I think i just mistakenly closed a comment or so @robrap |
@Theo-flux: I'm curious what your plans are for this. Thank you. |
@robrap I am sorry for the delay. I have written the test case for the methods in the BaseWaffleTest class. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great. Thank you @Theo-flux.
- I added some comments on the tests, but it should be very quick work.
- Let's hold off on updating docs. I have the following doc PR open that would cause conflicts, and I can just update that PR when this lands. See Fix and improve toggle docs #303
- Please update the changelog with a 5.2.0 release for this change, and update the version from 5.1.0 to 5.2.0.
Thanks!
edx_toggles/tests/test_waffle.py
Outdated
#test is_disabled method | ||
self.assertEqual(False, waffle.is_disabled()) | ||
#test is_toggle_on method | ||
self.assertEqual(waffle.is_enabled(), waffle.is_toggle_on()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: I think it would be quicker to read if you just stuck with True/False for the final two assertions as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@robrap I was a bit confused about the third statement on updating the changelog. Just to be sure now, I only need to change from [5.1.0] to [5.2.0] right ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- You'll want to add a new section to the top of the changelog for version 5.2.0. It should be a similar format as the sections below, like this example for 5.1.0, but you'll update it to read "5.2.0", and update the date, and it will have one bullet like:
* Added is_disabled, is_toggle_on, and is_toggle_off methods to BaseToggle.
-
[request] As I was writing the above, it made me think that we should probably rename
is_toggle_on/off
tois_toggled_on/off
to be more consistent with the past tense ofenabled/disabled
? What do you think? -
You'll need to change the actual version to 5.2.0 in init.py as well. It looks like someone updated it to 5.1.1, but that doesn't affect this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for these updates. Marking resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, unmarking as resolved, because failing tests indicate that the is_toggle_on
rename is not complete. Sorry about that.
Hi @robrap! Would you mind enabling the tests on this again? Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Getting close. Thank you.
|
@robrap on it. |
self.assertEqual(True, waffle.is_enabled()) | ||
# test is_disabled method | ||
self.assertEqual(False, waffle.is_disabled()) | ||
# test is_toggle_on method |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Theo-flux: This comment is out of sync. Rather than updating it, I think the assertions are clear enough as-is and you could simply delete all of these # test ...
comments from these two tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Theo-flux? 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Theo-flux: I'd love to have you be able to land this. Checking in one more time. Otherwise - I may end up taking this over at some point. Just let me know. Thanks.
HI @Theo-flux! Just checking in on this! |
Hello @Theo-flux. I really appreciate the changes, and we'd like to help land this if you are too busy with other things. Please let us know if you'd like to complete the work, or if you are ok with us taking it over from here. If we don't hear back in the next 2-3 weeks, we will take it over with lots of gratitude for your work thus far. Thank you! |
Hello again @Theo-flux. Again, I really appreciate the changes. I linked to your PR from the original ticket, and someone will take that up and land it at some point. In the meantime, I am going to close this PR. Thank you again and good luck with whatever you are working on now. |
@Theo-flux Even though your pull request wasn’t merged, please take a moment to answer a two question survey so we can improve your experience in the future. |
Description:
Enhance BaseToggle with additional methods.
Add the following methods to enhance BaseToggle abstract class
is_disabled
is_toggled_on
is_toggled_off
discussion forum: https://discuss.openedx.org/t/ideas-for-naming-methods-in-a-class/10630
Github issue: #290
Dependencies: dependencies on other outstanding PRs, issues, etc.
Merge deadline: List merge deadline (if any)
Installation instructions: List any non-trivial installation
instructions.
Testing instructions:
Reviewers:
Merge checklist:
Post merge:
finished.
Author concerns: List any concerns about this PR - inelegant
solutions, hacks, quick-and-dirty implementations, concerns about
migrations, etc.