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

Update models factory #21731

Merged
merged 20 commits into from
Jun 11, 2021
Merged

Conversation

mshaban-msft
Copy link

solves #18982

@mshaban-msft
Copy link
Author

@maririos
i added the new types we talked about offline
some already had a factory method, didn't have to add them (just checked inputs)
now i 'm just working on associating methods with appropriate region (common, sentiment, ..)

@mshaban-msft mshaban-msft force-pushed the 18982/update_models_factory branch from 9701455 to f0a80ca Compare June 9, 2021 16:47
Copy link
Member

@maririos maririos left a comment

Choose a reason for hiding this comment

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

Most docstrings need to be updated. I added a comment as an example

@maririos
Copy link
Member

maririos commented Jun 9, 2021

i added the new types we talked about offline
some already had a factory method, didn't have to add them (just checked inputs)

So here is the list we talked about of the types that need changes or to be added. There are still some missing from this list:

result classes (other **result classes found)
###################################
AnalyzeActionsResult
AnalyzeHealthcareEntitiesResult
ExtractKeyPhrasesActionResult
AnalyzeSentimentActionResult
TextAnalyticsActionResult
RecognizePiiEntitiesResult - looks like we already have it. might be worth checking that it has all appropriate parameters
RecognizeLinkedEntitiesActionResult
RecognizeEntitiesActionResult
RecognizePiiEntitiesActionResult - looks like we already have it. might be worth checking that it has all appropriate parameters
RecognizePiiEntitiesResultCollection - looks like we already have it. might be worth checking that it has all appropriate parameters
AnalyzeHealthcareEntitiesResultCollection

action classes (no other action class found!)
###################################
TextAnalyticsActions
AnalyzeSentimentAction (heads up I am changing a little this class.)
RecognizeLinkedEntitiesAction (heads up I am changing a little this class.)
RecognizeEntitiesAction (heads up I am changing a little this class.)
RecognizePiiEntitiesAction (heads up I am changing a little this class.)
ExtractKeyPhrasesAction (change already merged)

Model classes
###################################
CategorizedEntity (missing length property)
EntityDataSource
HealthcareEntity
HealthcareEntityAssertion
HealthcareEntityRelation
HealthcareEntityRelationRole
PiiEntity (missing length property)

@mshaban-msft
Copy link
Author

@maririos
the CI pipeline is failing
saying generated code isn't up to date, and i should rebase
i did the rebase, and still throwing the same error
what do you think about that?

@maririos
Copy link
Member

maririos commented Jun 9, 2021

Reading more on the error, it suggests to run other scripts according to what you changed. I suggest following

run 'eng\scripts\Export-API.ps1' if you changed public APIs (***/blob/master/CONTRIBUTING.md#public-api-additions).

You can do eng\scripts\Export-API.ps1 textanalytics so that it only runs this project

@check-enforcer
Copy link

This pull request is protected by Check Enforcer.

What is Check Enforcer?

Check Enforcer helps ensure all pull requests are covered by at least one check-run (typically an Azure Pipeline). When all check-runs associated with this pull request pass then Check Enforcer itself will pass.

Why am I getting this message?

You are getting this message because Check Enforcer did not detect any check-runs being associated with this pull request within five minutes. This may indicate that your pull request is not covered by any pipelines and so Check Enforcer is correctly blocking the pull request being merged.

What should I do now?

If the check-enforcer check-run is not passing and all other check-runs associated with this PR are passing (excluding license-cla) then you could try telling Check Enforcer to evaluate your pull request again. You can do this by adding a comment to this pull request as follows:
/check-enforcer evaluate
Typically evaulation only takes a few seconds. If you know that your pull request is not covered by a pipeline and this is expected you can override Check Enforcer using the following command:
/check-enforcer override
Note that using the override command triggers alerts so that follow-up investigations can occur (PRs still need to be approved as normal).

What if I am onboarding a new service?

Often, new services do not have validation pipelines associated with them. In order to bootstrap pipelines for a new service, please perform following steps:

For data-plane/track 2 SDKs Issue the following command as a pull request comment:

/azp run prepare-pipelines
This will run a pipeline that analyzes the source tree and creates the pipelines necessary to build and validate your pull request. Once the pipeline has been created you can trigger the pipeline using the following comment:
/azp run net - [service] - ci

For track 1 management-plane SDKs

Please open a separate PR and to your service SDK path in this file. Once that PR has been merged, you can re-run the pipeline to trigger the verification.

@mshaban-msft mshaban-msft force-pushed the 18982/update_models_factory branch from cf4da0f to 3dbad30 Compare June 10, 2021 22:28
@mshaban-msft mshaban-msft force-pushed the 18982/update_models_factory branch from 569e72c to c69448b Compare June 11, 2021 01:01
@mshaban-msft
Copy link
Author

@maririos
for the remaining models i haven't added yet (action classes)

action classes (no other action class found!)
###################################
TextAnalyticsActions
AnalyzeSentimentAction (heads up I am changing a little this class.)
RecognizeLinkedEntitiesAction (heads up I am changing a little this class.)
RecognizeEntitiesAction (heads up I am changing a little this class.)
RecognizePiiEntitiesAction (heads up I am changing a little this class.)
ExtractKeyPhrasesAction (change already merged)

they all have public constructors but with no parameters?
so my question is: do they need factory methods and add internal constructor for each or are we good?

@maririos
Copy link
Member

so my question is: do they need factory methods and add internal constructor for each or are we good?

Ohh right! we don't need to! great find! I think we are almost done with this!

@maririos
Copy link
Member

maririos commented Jun 11, 2021

you still need to (from previous comments):

You can do eng\scripts\Export-API.ps1 textanalytics so that it only runs this project

@maririos maririos merged commit 3a91b26 into Azure:master Jun 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants