-
Notifications
You must be signed in to change notification settings - Fork 0
config wikidata max results per search #8
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
Conversation
| for x in attempting_items: | ||
| raw_matches = search_entities(x.name, "en", dict_result=True) | ||
| raw_matches = search_entities( | ||
| x.name, config.LANGUAGE_CODE, dict_result=True, max_results=max_results |
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.
also configured language here where it was previously missed
| requires-python = "<4.0,>=3.13" | ||
| dependencies = [ | ||
| "wikibaseintegrator (>=0.12.12,<0.13.0)", | ||
| "wikibaseintegrator @ git+https://github.com/LeMyst/WikibaseIntegrator.git@301067883ddce0bca31fdd54973c3d6c8cbbcb7d", |
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.
This is temporary to get around a login issue.
| wbi = WikibaseIntegrator() | ||
|
|
||
| WIKIDATA_MAX_RESULTS_PER_SEARCH: int = int( | ||
| os.getenv("WIKIDATA_MAX_RESULTS_PER_SEARCH", 50) |
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.
using 50 to match the library's default, but realistically, we probably want just 5, which is what I've set in the public repo var
| AIRTABLE_BASE_ID: ${{ vars.AIRTABLE_BASE_ID }} | ||
| WIKIDATA_BOT_PW: ${{ secrets.WIKIDATA_BOT_PW }} | ||
| WIKIDATA_BOT_USERNAME: ${{ secrets.WIKIDATA_BOT_USERNAME }} | ||
| WIKIDATA_MAX_RESULTS_PER_SEARCH: ${{ vars.WIKIDATA_MAX_RESULTS_PER_SEARCH }} |
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.
Core fix making results configurable to reduce noise and airtable limits.
No description provided.