Skip to content

Conversation

@Dishant10
Copy link
Contributor

Pull Request

Related issue

Fixes #363

What does this PR do?

Makes the type variable an enum and all the cases are made as per the issue description.

  • ...

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!

Copy link
Member

@brunoocasali brunoocasali left a comment

Choose a reason for hiding this comment

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

Hi @Dishant10, thanks for your PR!

The CI must pass in order to merge your contribution! Check the linter messages and make sure your tests are passing locally :)

@Dishant10
Copy link
Contributor Author

@brunoocasali can you please guide me what do I have to do in order to fix the other two failing tests.
Thank you!!

@Dishant10
Copy link
Contributor Author

Any updates ? @brunoocasali
Thank you!!

Copy link
Member

@brunoocasali brunoocasali left a comment

Choose a reason for hiding this comment

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

I left some comments they should help you fix the remaining issues + get this PR approved :)


/// Type of the task.
public let type: String
//public let type: String
Copy link
Member

Choose a reason for hiding this comment

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

You should remove this comment.

public let type: String
//public let type: String
public enum Type:Codable {
case indexCreation
Copy link
Member

Choose a reason for hiding this comment

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

The indentation is not following the guidelines of the project. Also, you can move this enum to the bottom of the file but still inside of the scope of the public struct Task.

Type is a protected word in Swift, so you can use TaskType instead.

case dumpCreation
case taskCancelation
case taskDeletion
case snapshotCreation
Copy link
Member

Choose a reason for hiding this comment

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

You still have to fix these typing errors to make your tests pass:

image

Example, from this:

XCTAssertEqual("indexCreation", task.type)
to this:
XCTAssertEqual(Task.TaskType.indexCreation, task.type)

/// Type of the task.
public let type: String
//public let type: String
public enum Type:Codable {
Copy link
Member

Choose a reason for hiding this comment

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

Also, there is some GithubAction annotations, please fix them:

image

@Dishant10
Copy link
Contributor Author

Thank you! @brunoocasali this will help me a lot!
I will fix these as soon as possible!
Thank you!

@brunoocasali brunoocasali added enhancement New feature or request stale Pull request or issue that has recieve no activity for a long time. labels Apr 10, 2023
@Dishant10
Copy link
Contributor Author

Hii @brunoocasali I'm sorry I was away for some time. I've made some changes, how can I test and get the messages on my local before raising a PR. ?
Thank you!!

@Dishant10
Copy link
Contributor Author

I also had some doubts while fixing typing issues as you mentioned in the IndexesResults.swift file. So I want to test it locally first.

@brunoocasali
Copy link
Member

Hii @brunoocasali I'm sorry I was away for some time. I've made some changes, how can I test and get the messages on my local before raising a PR. ? Thank you!!

Hi @Dishant10 good to see you here!

You can follow the instructions written here:
https://github.com/meilisearch/meilisearch-swift/blob/main/CONTRIBUTING.md#development-workflow

@brunoocasali
Copy link
Member

Closing due to inactivity!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request stale Pull request or issue that has recieve no activity for a long time.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make the type of a Task a enum of values

2 participants