Skip to content
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

Out of date data which has been unpublished may be left accessible for download, if it is only data for region/country #18

Closed
simon-20 opened this issue Oct 13, 2023 · 0 comments · Fixed by #22

Comments

@simon-20
Copy link
Contributor

When this library generates the CSV files for the regions/countries, it generates them for all regions/countries, even when there is no data, so we get blank CSV files. But when the XLSX files are generated, they are only generated for regions/countries for which there is currently published data. And it seems that the XLSX files from the previous day are not deleted before they are all regenerated. This doesn't matter in the vast majority of cases, because the regeneration overwrites the file anyway.

But if all of the data for a region or country is deleted/unpublished (which is realistically possible for those regions and countries where there is only data from a single activity), then the existing XLSX file would not be deleted nor regenerated, so we would end up with out of date data being accessible.

Task: check for certain that this could happen, and fix.

Code which writes the Excel files to disk is group_data.py / group_results().

Relevant to think about: is it best to output an Excel file for every region/country regardless, meaning that we end up with some empty Excel files; or is it best to avoid outputting empty Excel files.

@simon-20 simon-20 changed the title Data which has been unpublished may be accessible if it is only data for region/country Out of date data which has been unpublished may be left accessible for download, if it is only data for region/country Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant