Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Improved library search #1896

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
cmaglie merged 1 commit into arduino:master from cmaglie:improve_lib_search
Sep 28, 2022
Merged

Improved library search #1896

cmaglie merged 1 commit into arduino:master from cmaglie:improve_lib_search
Sep 28, 2022

Conversation

Copy link
Member

@cmaglie cmaglie commented Sep 26, 2022

Please check if the PR fulfills these requirements

  • The PR has no duplicates (please search among the Pull Requests
    before creating one)
  • The PR follows
    our contributing guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • UPGRADING.md has been updated with a migration guide (for breaking changes)
  • What kind of change does this PR introduce?
    Applied some changes to extend the matching libraries found by a query:
    1. Library search is now done by looking also into libraries author and providedIncludes.
    2. The query string is split into words so the search for aaa bbb will match even if aaa and bbb are not found together (as a single stirng aaa bbb)
    3. Non-alphanumeric characters (excluding :) are translated into spaces before splitting the query into words.
  • What is the new behavior?
    All the above issues are fixed.

@cmaglie cmaglie self-assigned this Sep 26, 2022
@cmaglie cmaglie added priority: high Resolution is a high priority topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project criticality: high Of high impact labels Sep 26, 2022
Copy link

codecov bot commented Sep 26, 2022
edited
Loading

Codecov Report

Base: 36.58% // Head: 36.69% // Increases project coverage by +0.10% 🎉

Coverage data is based on head (d4a03de) compared to base (5730e2e).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@ Coverage Diff @@
## master #1896 +/- ##
==========================================
+ Coverage 36.58% 36.69% +0.10% 
==========================================
 Files 231 231 
 Lines 19696 19719 +23 
==========================================
+ Hits 7206 7235 +29 
+ Misses 11659 11654 -5 
+ Partials 831 830 -1 
Flag Coverage Δ
unit 36.69% <100.00%> (+0.10%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
commands/lib/search.go 92.50% <100.00%> (+12.83%) ⬆️
internal/integrationtest/arduino-cli.go 85.45% <100.00%> (+0.10%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@umbynos umbynos left a comment

Choose a reason for hiding this comment

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

code LGTM

Copy link
Contributor

@cmaglie, are you planning to update this PR with the board search equivalent or not? If not, I will do manual verification and compare the lib search behavior with IDE 1.x. Otherwise, I will wait for the update. Thank you!

Copy link
Member Author

cmaglie commented Sep 27, 2022

Not in this PR, I'm working on other tasks, let's start with libraries which is the most common scenario, I will open another PR for the platform search.

kittaakos reacted with thumbs up emoji

Copy link
Contributor

I have downloaded the CLI for macOS and manually compared dozens of search results with the Library manager from IDE 1.x. It's working great. Excellent job.

cmaglie reacted with hooray emoji

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

@kittaakos kittaakos Awaiting requested review from kittaakos

@per1234 per1234 Awaiting requested review from per1234

1 more reviewer

@umbynos umbynos umbynos approved these changes

Reviewers whose approvals may not affect merge requirements
Labels
criticality: high Of high impact priority: high Resolution is a high priority topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Milestone
No milestone

AltStyle によって変換されたページ (->オリジナル) /