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

Rename EntityExtractorMixin #11356

Closed
wants to merge 17 commits into from

Conversation

VitorLamego
Copy link

@VitorLamego VitorLamego commented Jul 18, 2022

Co-authore-by: AlGouvea [email protected]

Proposed changes:

Status (please check what you already did):

  • added some tests for the functionality
  • updated the documentation
  • updated the changelog (please check changelog for instructions)
  • reformat files using black (please check Readme for instructions)

@VitorLamego VitorLamego requested a review from a team July 18, 2022 22:19
@VitorLamego VitorLamego requested a review from a team as a code owner July 18, 2022 22:19
@VitorLamego VitorLamego requested review from sanchariGr and removed request for a team July 18, 2022 22:19
@VitorLamego VitorLamego changed the title Rename entity extractor mixin Rename EntityExtractorMixin Jul 18, 2022
@indam23 indam23 linked an issue Jul 20, 2022 that may be closed by this pull request
Copy link
Contributor

@indam23 indam23 left a comment

Choose a reason for hiding this comment

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

Thanks for addressing this!
The migration guide in the docs should also be updated to indicate the change. Since the migration will differ for users before and after the rename, I'd suggest adding a callout like e.g.

:::info Changed in 3.3

As of 3.3, the `EntityExtractorMixin` has been renamed back to `EntityExtractor`. The migration instructions below are valid for versions >= 3.0, <3.3.

:::

@indam23 indam23 removed request for a team and sanchariGr July 20, 2022 09:54
@VitorLamego VitorLamego requested a review from a team as a code owner August 1, 2022 21:55
indam23
indam23 previously approved these changes Aug 2, 2022
Copy link
Contributor

@indam23 indam23 left a comment

Choose a reason for hiding this comment

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

🚀

@indam23
Copy link
Contributor

indam23 commented Aug 3, 2022

@VitorLamego I'm adding one thing, which is a backwards compatibility EntityExtractorMixin class that will emit a deprecation warning when used.
The reason for this is to prevent breaking changes in a minor.

@indam23
Copy link
Contributor

indam23 commented Aug 3, 2022

Since I can't push to your fork, there's a branch & commit here with the suggested changes - could you pull these into your branch?
b1401df

@indam23 indam23 dismissed their stale review August 3, 2022 12:06

Will re-approve once deprecated class is added back for backwards compatibility

@VitorLamego
Copy link
Author

Done!

@indam23
Copy link
Contributor

indam23 commented Aug 4, 2022

Thanks, do you mind addressing the failing CI checks ? They're my fault, I added the logging module when testing locally.
The documentation check is failing because of a flaky link, don't worry about that one.

@VitorLamego
Copy link
Author

No problem! Is there any way I could help on documentation check ?? @melindaloubser1

@VitorLamego
Copy link
Author

Done @melindaloubser1 !

docs/docs/migration-guide.mdx Outdated Show resolved Hide resolved
@VitorLamego
Copy link
Author

Everything ok ? @melindaloubser1

@VitorLamego VitorLamego requested review from indam23 and removed request for ancalita August 18, 2022 15:38
@ancalita ancalita requested review from ancalita and removed request for indam23 August 19, 2022 14:49
Copy link
Member

@ancalita ancalita left a comment

Choose a reason for hiding this comment

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

@VitorLamego Approving this as Melinda is no longer a maintainer for this repo.
Please run make formatter to resolve the formatting check fail. Before that ensure that the version of black in your venv is 22.6.0.
Also you can run make lint and make types to check for any additional errors that this Code quality check could uncover and fix them before committing.

@CLAassistant
Copy link

CLAassistant commented Sep 11, 2022

CLA assistant check
All committers have signed the CLA.

@VitorLamego
Copy link
Author

Sorry for the delay! I believe it is ok now :) @ancalita

Copy link
Member

@ancalita ancalita left a comment

Choose a reason for hiding this comment

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

Looks good 👍🏻
A few things need ironing out before merging, please address the comments below 🙏🏻

docs/docs/migration-guide.mdx Outdated Show resolved Hide resolved
rasa/nlu/extractors/extractor.py Outdated Show resolved Hide resolved
@VitorLamego
Copy link
Author

It seems that errors on CI are not due to this issue, right ?? Anything else we could do to help ? @ancalita

@VitorLamego VitorLamego requested review from indam23 and ancalita and removed request for ancalita and indam23 September 15, 2022 19:03
This class will be removed in 4.0
"""

def __init_subclass__(cls, **kwargs: Any):
Copy link
Member

Choose a reason for hiding this comment

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

You also need to specify type hint for cls.

@ancalita
Copy link
Member

It seems that errors on CI are not due to this issue, right ?? Anything else we could do to help ? @ancalita

I've restarted the jobs, could have been flaky incidents.

This class will be removed in 4.0
"""

def __init_subclass__(cls, **kwargs: Any):

Choose a reason for hiding this comment

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

Suggested change
def __init_subclass__(cls, **kwargs: Any):
def __init_subclass__(cls: EntityExtractor, **kwargs: Any):

@VitorLamego VitorLamego closed this Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rename EntityExtractorMixin for consistency
6 participants