-
Notifications
You must be signed in to change notification settings - Fork 27
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
[1.4.0] Refactor Settings and Add Pagination, Separator and Dictionary Settings #417
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
All 'reset' functions had the same exact implementation with the only chane being the API path. By reusing a single function we can have the same functionality with 100 less lines of code.
All 'get' functions had the same exact implementation with the only change being the API path. By reusing a single function we can have the same functionality with 100 less lines of code.
All 'update' functions more or less had the same exact implementation with the only change being the API path and how the data was encoded. By reusing a single function we can have the same functionality with 150 less lines of code.
Running integration tests highlighted that I was a bit overzealous with my previous refactor. This one function uses a different HTTP method, in this instance it was cleaner to just have some duplication. I've added a comment for future reference.
Throwing tests are better than force unwrapping as it allows the test runner to complete and prepare a proper report. Removed many instances of force unwrapping by using a better data initialiser.
Sherlouk
changed the title
Refactor Settings and Add Pagination, Separator and Dictionary Settings
[1.4.0] Refactor Settings and Add Pagination, Separator and Dictionary Settings
Sep 23, 2023
This was referenced Sep 23, 2023
Merged
This was
linked to
issues
Sep 27, 2023
curquiza
approved these changes
Sep 27, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bors merge
meili-bors bot
added a commit
that referenced
this pull request
Sep 27, 2023
417: [1.4.0] Refactor Settings and Add Pagination, Separator and Dictionary Settings r=curquiza a=Sherlouk # Pull Request ## Related issue Fixes #308 Fixes changes raised under meilisearch/integration-guides#286 (#406) -⚠️ Wait for v1.4.0 ## What does this PR do? - Refactors index settings to improve reuse (functionally identical, but around 300 less lines of code) - Cleaning up some unsafe practices in unit tests - Adds support for three new types of index-level settings (improving parity) All integration tests have been run against v1.4.0 (pre-release) RC 2 and is running locally. CI uses the latest version of the executable (1.3.0) and thus will not work and will throw errors. This is expected. This PR won't be merged until after the 1.4.0 release due to Swift being a tier 3 project, as such we can simply re-run CI once that's released. This PR starts to contain a little bit of cleanup with some various nit picks (nothing that changes the code style though). ## 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: James Sherlock <15193942+Sherlouk@users.noreply.github.com>
This was referenced Sep 27, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request
Related issue
Fixes #308⚠️ Wait for v1.4.0
Fixes changes raised under meilisearch/integration-guides#286 (#406) -
What does this PR do?
All integration tests have been run against v1.4.0 (pre-release) RC 2 and is running locally. CI uses the latest version of the executable (1.3.0) and thus will not work and will throw errors. This is expected. This PR won't be merged until after the 1.4.0 release due to Swift being a tier 3 project, as such we can simply re-run CI once that's released.
This PR starts to contain a little bit of cleanup with some various nit picks (nothing that changes the code style though).
PR checklist
Please check if your PR fulfills the following requirements:
Thank you so much for contributing to Meilisearch!