scribe-org / Scribe-Data

Wikidata, Wiktionary and Wikipedia language data extraction
GNU General Public License v3.0
30 stars 69 forks source link

Update update_data.py tqdm progress bar only on a successful stage #155

Closed andrewtavis closed 3 months ago

andrewtavis commented 5 months ago

Terms

Description

As of now the update_data.py process allows will use a try-except to run the query here:

try:
    results = sparql.query().convert()
except HTTPError as err:
    print(f"HTTPError with {query_path}: {err}")

If the except block is entered, we still update the progress bar, but actually the exception triggers a retry later in the process. Ideally the progress bar would not be updated at this stage.

Contribution

Would be great to get some help here! Happy to support or get to it myself eventually 😊

henrikth93 commented 4 months ago

I will take a look at it!

andrewtavis commented 4 months ago

Thanks, @henrikth93! As discussed, would be good to even comment out the query functionality for a moment while you work on this and then figure out how to only update the progress bar on a "successful query" :)

axif0 commented 4 months ago

@andrewtavis, hello.. can I give a try on this?

andrewtavis commented 4 months ago

Hey @axif0 👋 This one is already assigned to @henrikth93. If he's fine with you taking over, then we can switch the assignment, or we can also try to find you a new issue :)

henrikth93 commented 4 months ago

Hello @axif0 and @andrewtavis! I am looking into this. If we can not find a new issue for @axif0, then maybe we can look into it together?

andrewtavis commented 4 months ago

@axif0, do you want to check out #96? For this what would likely be best would be to get the articles from Wikidata for the given language and then filter them out from the result 😊 Would be happy to discuss this further!

axif0 commented 4 months ago

Thanks @andrewtavis, I have commented there. Will you please have a look at the comment section of #96?

andrewtavis commented 3 months ago

Closed by #176 :) Thanks, @henrikth93! 🙌🚀