Skip to content
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

Closed

Conversation

Theo-flux
Copy link

@Theo-flux Theo-flux commented Jul 8, 2023

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:

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

Reviewers:

Merge checklist:

  • All reviewers approved
  • CI build is green
  • Version bumped
  • Changelog record added
  • Documentation updated (not only docstrings)
  • Commits are squashed

Post merge:

  • Create a tag
  • Check new version is pushed to PyPi after tag-triggered build is
    finished.
  • Delete working branch (if not needed anymore)

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

@openedx-webhooks
Copy link

openedx-webhooks commented Jul 8, 2023

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:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

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.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Jul 8, 2023
@mphilbrick211 mphilbrick211 added the needs test run Author's first PR to this repository, awaiting test authorization from Axim label Jul 10, 2023
@robrap
Copy link
Contributor

robrap commented Jul 10, 2023

@mphilbrick211: You can ping me once Contributor Agreement is complete. Thank you!

@e0d
Copy link

e0d commented Jul 10, 2023

@Theo-flux please see the details about our CLA requirement in this comment.

@e0d e0d removed the needs test run Author's first PR to this repository, awaiting test authorization from Axim label Jul 10, 2023
@Theo-flux Theo-flux changed the title feat: added toggle methods to basemodel feat:added toggle methods to basemodel Jul 10, 2023
@Theo-flux
Copy link
Author

@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

@e0d
Copy link

e0d commented Jul 10, 2023

Did you receive a document for e-signature yet?

@robrap
Copy link
Contributor

robrap commented Jul 12, 2023

@Theo-flux: Ed had written:

Did you receive a document for e-signature yet?

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.

@e0d e0d changed the title feat:added toggle methods to basemodel feat:added toggle methods to basemodel. Jul 12, 2023
@e0d e0d changed the title feat:added toggle methods to basemodel. feat:added toggle methods to basemodel Jul 12, 2023
@Theo-flux
Copy link
Author

@Theo-flux: Ed had written:

Did you receive a document for e-signature yet?

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.
@robrap I am still yet to receive a mail from docuSign. Is there anything that can be done to speed this up ?

@robrap
Copy link
Contributor

robrap commented Jul 13, 2023

@Theo-flux: I’m not sure if your response was lost, but the only thing you included was a quote.

@Theo-flux
Copy link
Author

@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.

@robrap
Copy link
Contributor

robrap commented Jul 13, 2023

@Theo-flux: Thanks and good luck.

Also, this time you commented twice, so not sure if you are experiencing connectivity issues.

@Theo-flux
Copy link
Author

OK. Yes I have connectivity issues at the moment. Thanks.

@Theo-flux
Copy link
Author

@robrap I am still yet to receive the mail. Could this be a problem from my end ?

@mphilbrick211
Copy link

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!

@Theo-flux
Copy link
Author

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.

@mphilbrick211
Copy link

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!

@Theo-flux
Copy link
Author

Theo-flux commented Jul 21, 2023

@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.

@e0d
Copy link

e0d commented Jul 21, 2023

@Theo-flux you should have received a message from DocuSign on or around the 13th. Can you double check?

@Theo-flux
Copy link
Author

@e0d I have gone through my mail still, I have nothing relating to DocuSign. Is it advisable I send another CLA request now ?

@e0d
Copy link

e0d commented Jul 21, 2023

@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.

@Theo-flux
Copy link
Author

@e0d Thanks, I just sent the mail now.

@Theo-flux
Copy link
Author

@mphilbrick211 @robrap @e0d Thanks for your help. The CLA has been signed and sent back. Thanks alot!

@e0d e0d changed the title feat:added toggle methods to basemodel feat:added toggle methods to basemodel Jul 21, 2023
@Theo-flux Theo-flux closed this Jul 22, 2023
@Theo-flux
Copy link
Author

I think i just mistakenly closed a comment or so @robrap

@robrap robrap reopened this Jul 23, 2023
@robrap
Copy link
Contributor

robrap commented Aug 16, 2023

@Theo-flux: I'm curious what your plans are for this. Thank you.

@Theo-flux
Copy link
Author

@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.

Copy link
Contributor

@robrap robrap left a 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.

  1. I added some comments on the tests, but it should be very quick work.
  2. 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
  3. 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!

#test is_disabled method
self.assertEqual(False, waffle.is_disabled())
#test is_toggle_on method
self.assertEqual(waffle.is_enabled(), waffle.is_toggle_on())
Copy link
Contributor

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.

Copy link
Author

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 ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. 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.
  1. [request] As I was writing the above, it made me think that we should probably rename is_toggle_on/off to is_toggled_on/off to be more consistent with the past tense of enabled/disabled? What do you think?

  2. 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.

Copy link
Contributor

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.

Copy link
Contributor

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.

edx_toggles/tests/test_waffle.py Outdated Show resolved Hide resolved
edx_toggles/tests/test_waffle.py Outdated Show resolved Hide resolved
@robrap robrap mentioned this pull request Aug 17, 2023
4 tasks
@mphilbrick211
Copy link

Hi @robrap! Would you mind enabling the tests on this again? Thanks!

Copy link
Contributor

@robrap robrap left a 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.

edx_toggles/toggles/internal/base.py Outdated Show resolved Hide resolved
@robrap robrap assigned Theo-flux and unassigned robrap Sep 26, 2023
@robrap robrap added the waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc. label Sep 29, 2023
@robrap
Copy link
Contributor

robrap commented Oct 16, 2023

@Theo-flux:

  1. Tests are failing again. It should be a quick fix, as noted in feat:added toggle methods to basemodel  #293 (comment), and it would be great to land this sooner rather than later.
  2. I updated the PR description with a link to the ticket Enhance BaseToggle with additional enabled/disabled toggle methods #290, and updated the ticket with the additional TODO items discussed in this PR. Once you land this, we can see what your appetite is for completing the work, or if we should open a new ticket with just the remaining work.

@Theo-flux
Copy link
Author

@robrap on it.

self.assertEqual(True, waffle.is_enabled())
# test is_disabled method
self.assertEqual(False, waffle.is_disabled())
# test is_toggle_on method
Copy link
Contributor

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Theo-flux? 😄

Copy link
Contributor

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.

@mphilbrick211
Copy link

HI @Theo-flux! Just checking in on this!

@robrap
Copy link
Contributor

robrap commented Nov 15, 2023

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!

@robrap
Copy link
Contributor

robrap commented Dec 5, 2023

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.

@robrap robrap closed this Dec 5, 2023
@openedx-webhooks
Copy link

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open-source-contribution PR author is not from Axim or 2U waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

6 participants