meilisearch / meilisearch-dart

The Meilisearch API client written for Dart
https://meilisearch.com
MIT License
77 stars 26 forks source link

Remove useless code samples and add missing ones #357

Closed curquiza closed 11 months ago

curquiza commented 11 months ago

I created scripts to manage code samples (internal only)

  1. I found out the following code samples are still in this repo but not used by the documentation anymore, so I removed them:
meilisearch-dart
- 'faceted_search_2' not found in documentation
- 'get_keys_1' not found in documentation
- 'documents_guide_add_movie_1' not found in documentation
- 'getting_started_communicating_with_a_protected_instance' not found in documentation
- 'faceted_search_facets_1' not found in documentation
  1. I found the following code samples were missing:
meilisearch-dart
- 'get_typo_tolerance_1' not found
- 'update_typo_tolerance_1' not found
- 'reset_typo_tolerance_1' not found
- 'typo_tolerance_guide_1' not found
- 'typo_tolerance_guide_2' not found
- 'typo_tolerance_guide_3' not found
- 'typo_tolerance_guide_4' not found
- 'async_guide_canceled_by_1' not found
- 'facet_search_1' not found
- 'facet_search_3' not found

All of them were missing, because the related features are implemented.

curquiza commented 11 months ago

@ahmednfwela @brunoocasali be careful before fixing this kind of issue: https://github.com/meilisearch/meilisearch-dart/issues/340 -> the code samples were not implemented, so the full issue was not done 😊

But still a big thank for the PR @ahmednfwela of course 😄

ahmednfwela commented 11 months ago

yes my bad, sometimes I create 3/4 prs a day and forget to add the code samples 😅

curquiza commented 11 months ago

bors try

meili-bors[bot] commented 11 months ago

try

Build succeeded:

ahmednfwela commented 11 months ago

@curquiza I suggest also fixing the link at the top to https://github.com/meilisearch/documentation/blob/main/.code-samples.meilisearch.yaml

ahmednfwela commented 11 months ago

I made a PR that supersedes this https://github.com/meilisearch/meilisearch-dart/pull/358 @curquiza

curquiza commented 11 months ago

@curquiza I suggest also fixing the link at the top to https://github.com/meilisearch/documentation/blob/main/.code-samples.meilisearch.yaml

I changed the description. Before a kind of documentation existed at this link. I removed it. Not all the code samples are present in https://github.com/meilisearch/documentation/blob/main/.code-samples.meilisearch.yaml

I made a PR that supersedes this #358 @curquiza

Thank you! However, can we still merge this current PR? The goal is to provide an up to date documentation to the users as soon as possible @brunoocasali will review the other PR when he will come back from Holiday 😊

codecov[bot] commented 11 months ago

Codecov Report

Patch and project coverage have no change.

Comparison is base (d110365) 82.03% compared to head (750e82d) 82.03%. Report is 4 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #357 +/- ## ======================================= Coverage 82.03% 82.03% ======================================= Files 57 57 Lines 1353 1353 ======================================= Hits 1110 1110 Misses 243 243 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

ahmednfwela commented 11 months ago

yes sure! we can merge this PR now, but is there a place that contains all the code samples ?

meili-bors[bot] commented 11 months ago

Build failed:

curquiza commented 11 months ago

yes sure! we can merge this PR now, but is there a place that contains all the code samples ?

Nope most of them are in the file (https://github.com/meilisearch/documentation/blob/main/.code-samples.meilisearch.yaml) but

I created a script that takes into account these exception to check everything is update to date 😊

meili-bors[bot] commented 11 months ago

Build succeeded: