djay / covidthailand

Thailand Covid testing and case data gathered and combined from various sources for others to download or view
126 stars 15 forks source link

add special case for work deaths on 2021-09-23 and update test #112

Closed reduxionist closed 3 years ago

reduxionist commented 3 years ago

Fixes #80.

reduxionist commented 3 years ago

Got it, will do!

On Mon, Oct 11, 2021 at 10:42 AM Dylan Jay @.***> wrote:

@.**** requested changes on this pull request.

In covid_data.py https://github.com/djay/covidthailand/pull/112#discussion_r725768174:

@@ -1906,6 +1906,9 @@ def briefing_deaths_summary(text, date, file): en_risk: get_next_number(text, *th_risks, default=0, return_rest=False) for en_risk, th_risks in risks.items() }

  • on 2021-09-23, works risks were reported as '-' so we scrape the wrong number: 89

  • if file == "inputs/briefings/230964.pdf" and risk['Work'] == 89:

I probably would have fixed this by changing the regex to handle (-) in place of 0 since this could happen again or already have happened in the past.

In covid_data.py https://github.com/djay/covidthailand/pull/112#discussion_r725768623:

@@ -1906,6 +1906,9 @@ def briefing_deaths_summary(text, date, file): en_risk: get_next_number(text, *th_risks, default=0, return_rest=False) for en_risk, th_risks in risks.items() }

  • on 2021-09-23, works risks were reported as '-' so we scrape the wrong number: 89

  • if file == "inputs/briefings/230964.pdf" and risk['Work'] == 89:

pretty sure there is a setting in get_next_numbers to look for dash as 0

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/djay/covidthailand/pull/112#pullrequestreview-775780587, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAD2IJYSUZUSASBIS6AMKOTUGJMI3ANCNFSM5FWIOEAQ .

reduxionist commented 3 years ago

I did not know 'resolve conversation' hid them from the web display. Hope you caught my reponse to your requests, and how I re-implemented the patch to fit them, via email,

reduxionist commented 3 years ago

bump