Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Object oriented code #662

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

Merged
merged 11 commits into from
Feb 20, 2023
Merged

Object oriented code #662

merged 11 commits into from
Feb 20, 2023

Conversation

Azanul
Copy link
Contributor

@Azanul Azanul commented Jan 24, 2023

Pull Request

Related issue

Fixes #604

What does this PR do?

  • Converts root level functions to class methods

PR checklist

Please check if your PR fulfills the following requirements:

  • Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
  • Have you read the contributing guidelines?
  • Have you made sure that the title is accurate and descriptive of the changes?

Thank you so much for contributing to Meilisearch!

@Azanul Azanul marked this pull request as ready for review January 24, 2023 06:08
@Azanul
Copy link
Contributor Author

Azanul commented Jan 24, 2023

@sanders41 @bidoubiwa

Copy link
Contributor

@alallema alallema left a comment

Choose a reason for hiding this comment

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

Thanks, @Azanul, for this PR!
I made a few small comments 😃

Also, I wonder if TaskHandler is really appropriate I think I will prefer to call this class just Task for consistency in the SDK, but it means that we have to rename the class Task(CamelBase): in the models

Class docstring update

Co-authored-by: Amélie <[email protected]>
@Azanul
Copy link
Contributor Author

Azanul commented Feb 1, 2023

Also, I wonder if TaskHandler is really appropriate I think I will prefer to call this class just Task for consistency in the SDK, but it means that we have to rename the class Task(CamelBase): in the models

Do you have a name for class Task(CamelBase): in mind?

Copy link
Contributor

@alallema alallema left a comment

Choose a reason for hiding this comment

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

Thanks, @Azanul for this PR!
Sorry for the delay but I had a hard time deciding on the naming I think for now it's fine let's leave it like that it stays consistent with others' SDK. And if ever we want to change it we will do it in another PR
Thank you again LGTM! 🎉

@alallema
Copy link
Contributor

bors merge

bors bot added a commit that referenced this pull request Feb 20, 2023
662: Object oriented code r=alallema a=Azanul

# Pull Request

## Related issue
Fixes #604 

## What does this PR do?
- Converts root level functions to class methods

## PR checklist
Please check if your PR fulfills the following requirements:
- [X] Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
- [X] Have you read the contributing guidelines?
- [X] Have you made sure that the title is accurate and descriptive of the changes?

Thank you so much for contributing to Meilisearch!


Co-authored-by: Azanul <[email protected]>
Co-authored-by: Azanul Haque <[email protected]>
Co-authored-by: Amélie <[email protected]>
@bors
Copy link
Contributor

bors bot commented Feb 20, 2023

This PR was included in a batch that successfully built, but then failed to merge into main. It will not be retried.

Additional information:

Response status code: 422
{"message":"1 review requesting changes and 1 approving review by reviewers with write access.","documentation_url":"https://docs.github.com/articles/about-protected-branches"}

@alallema
Copy link
Contributor

Hi @sanders41,
Sorry to ask this but could you please approve this PR if all is good with you? Please feel free if you have a concern or feedback. I could bypass Bors but I'd rather not have to.

@alallema
Copy link
Contributor

bors merge

@bors
Copy link
Contributor

bors bot commented Feb 20, 2023

@bors bors bot merged commit cd8ac78 into meilisearch:main Feb 20, 2023
@alallema alallema added the enhancement New feature or request label Feb 22, 2023
bors bot added a commit that referenced this pull request Feb 22, 2023
693: Update version for the next release (v0.25.0) r=alallema a=alallema

## ⚠️ Breaking changes

* Update the return type of methods (#676) `@sanders41`

## 🚀 Enhancements

* Transform all the `task` methods to a `TaskHandler` class (#662) `@Azanul`

Thanks again to `@Azanul,` `@alallema,` `@brunoocasali` and `@sanders41!` 🎉


Co-authored-by: alallema <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Keep the code object oriented everywhere
3 participants