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

Validate TSV files for processing #97

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sumanbalayar08
Copy link

@sumanbalayar08 sumanbalayar08 commented Jun 30, 2024

Summary

Added data validation and enhanced error handling for input files in the school center allocation script.

Pull request type

Please try to limit your pull request to one type, and submit multiple pull requests if needed.

Please tick the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behaviour?

The current script does not validate the input data, which can lead to errors and incorrect allocations when invalid data is provided.

Issue Number: N/A

What is the current behaviour?

Please describe the changes or updates being made by this pull request.

  • Added a validate_data function to check the integrity of input files for schools, centers, and preferences.
  • Enhanced error handling for file operations to catch common issues like file not found, permission errors, and malformed data.
  • The script now exits with a relevant error message if validation fails or if there are issues with reading the files.

Checklist

Please review and complete the following checklist before submitting your pull request:

  • I have tested the changes locally and they work as intended.
  • I have provided a detailed description of the changes made.
  • I have reviewed the formatting and ensured it follows the project's style guidelines.
  • I have assigned the appropriate labels to the pull request.
  • I have added necessary documentation or updated existing documentation for the changes made.
  • I have addressed code review feedback and resolved any conflicts with the main branch.

Other information

Include screenshots of the component before and after the change.

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.

2 participants