-
Notifications
You must be signed in to change notification settings - Fork 26
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
Create code samples from code, a.k.a. code excerpts #358
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #358 +/- ##
=======================================
Coverage 82.03% 82.03%
=======================================
Files 57 57
Lines 1353 1353
=======================================
Hits 1110 1110
Misses 243 243 ☔ View full report in Codecov by Sentry. |
@curquiza @brunoocasali the internal tool still needs more work, but I want your opinion if you agree with this approach. |
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.
I'm very sorry @ahmednfwela for taking so long here 😢
That's very cool @ahmednfwela let's go for it! Do you think it would be possible to do that with other languages but using the same tooling?
Also, can you update the CONTRIBUTING?
@brunoocasali Yes we can definitely do that with any language that supports comments, the tooling is language agnostic. we can ship the tooling as an exe file that's built from a different repository |
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.
LGTM!
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.
LGTM
bors merge |
Build succeeded: |
376: Update version for the next release (v0.16.0) r=curquiza a=meili-bot _This PR is auto-generated._ The automated script updates the version of meilisearch-dart to a new version: "v0.16.0" --- Parr of the work of #375 --- This version introduces features released on Meilisearch v1.7.0 🎉 Check out the changelog of [Meilisearch v1.7.0](https://github.com/meilisearch/meilisearch/releases/tag/v1.7.0) for more information on the changes. ##⚠️ Breaking changes * `scoreDetails` feature is not experimental anymore. You can directly use `showRankingScoreDetails` during a search without activating the experimental feature 🎉 ## 🚀 Enhancements * Add text separators (#379) ahmednfwela ## ⚙️ Maintenance/misc * Create code samples from code, a.k.a. code excerpts (#358) ahmednfwela * Update dart version and checkout (#367) brunoocasali * fix ci steps (#378) ahmednfwela * docs: Add readme section about dio (#380) ahmednfwela Co-authored-by: meili-bot <[email protected]> Co-authored-by: Ahmed Fwela <[email protected]> Co-authored-by: Clémentine U. - curqui <[email protected]>
Pull Request
What does this PR do?
This PR completely automates updating the code samples file .code-samples.meilisearch.yaml
it creates a new PRIVATE
tool
that does 2 thingsthe private tool checks dart files in
lib/
andtest/
directory for lines that follow this pattern:where
key
is a key in.code-samples.meilisearch.yaml
This run shows CI fail in action, due to format mismatch for key
search_parameter_guide_show_ranking_score_1
between code file and yaml file.This commit f9109a0 shows how to fix the failed run, by running
dart run ./tool/bin/meili.dart update-samples
in the root directory of the repo.this should simplify adding samples, and avoid issues like #357
Update
I have also added functionality to detect missing and useless keys, see this failing run for example: https://github.com/meilisearch/meilisearch-dart/actions/runs/6262599763/job/17005143489?pr=358#step:4:159
PR checklist
WIP
Please check if your PR fulfills the following requirements:
Thank you so much for contributing to Meilisearch!