Skip to content

Add validations for case names, dates, and download URLs in _sanity_check#1519

Open
Luis-manzur wants to merge 3 commits into
mainfrom
1512-better-validations-for-dates-names-and-urls
Open

Add validations for case names, dates, and download URLs in _sanity_check#1519
Luis-manzur wants to merge 3 commits into
mainfrom
1512-better-validations-for-dates-names-and-urls

Conversation

@Luis-manzur
Copy link
Copy Markdown
Contributor

This pull request introduces new validations to the _check_sanity method in AbstractSite to enhance data integrity checks and improve error handling.

Enhancements to _check_sanity validations:

  • Added checks for suspicious file extensions in download_urls using a regular expression to detect potentially unsafe or unexpected file types.
  • Introduced validation for forbidden characters in case_names, logging warnings when detected.
  • Added a new sanity check to ensure case_dates are not earlier than the year 1900, raising an exception for invalid dates.

@Luis-manzur Luis-manzur linked an issue Jul 31, 2025 that may be closed by this pull request
@Luis-manzur Luis-manzur requested review from flooie and grossir July 31, 2025 17:47
@Luis-manzur Luis-manzur assigned flooie and grossir and unassigned flooie Jul 31, 2025
@flooie
Copy link
Copy Markdown
Contributor

flooie commented Aug 25, 2025

Looks like we added validation for url endings --- can we remove this please and focus just on the validation for dates

@flooie flooie assigned Luis-manzur and unassigned grossir Aug 25, 2025
@flooie
Copy link
Copy Markdown
Contributor

flooie commented Aug 25, 2025

I think I would want to add more tests and do further research into the other components and I think it complicates this PR.

@Luis-manzur Luis-manzur assigned flooie and unassigned Luis-manzur Aug 25, 2025
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 this pull request may close these issues.

Better Date Validation for impossible dates

3 participants