Skip to content

Conversation

@saumya1317
Copy link
Contributor

  • Implement CSVValidator class with comprehensive validation
  • Validate file existence, date format, data types, duplicates
  • Detect missing values, non-numeric data, invalid dates
  • Provide structured error messages with sample rows
  • Add validate_input_csv, validate_price_csv, validate_signals_csv
  • Include 22 comprehensive test cases with 100% pass rate
  • Add usage examples and documentation

Closes #11

- Implement CSVValidator class with comprehensive validation
- Validate file existence, date format, data types, duplicates
- Detect missing values, non-numeric data, invalid dates
- Provide structured error messages with sample rows
- Add validate_input_csv, validate_price_csv, validate_signals_csv
- Include 22 comprehensive test cases with 100% pass rate
- Add usage examples and documentation

Closes OPCODE-Open-Spring-Fest#11
@saumya1317
Copy link
Contributor Author

hii @ayushkrtiwari pls do check

@ayushkrtiwari ayushkrtiwari requested a review from Copilot October 27, 2025 18:00
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a comprehensive CSV validator to the quantitative research framework for validating user-provided price and signals files. The validator checks file existence, date formats, data types, missing values, and duplicate dates, providing structured error messages to help users identify and fix data issues before backtesting.

Key Changes:

  • Implemented CSVValidator class with validation methods for file structure, dates, data types, and duplicates
  • Added three convenience functions: validate_input_csv, validate_price_csv, and validate_signals_csv
  • Created 22 comprehensive test cases covering all validation scenarios with 100% pass rate

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/quant_research_starter/data/validator.py Core implementation of validation logic including CSVValidator, ValidationError, and validation functions
tests/test_validator.py Comprehensive test suite covering all validation scenarios including edge cases
src/quant_research_starter/data/init.py Export validator components from the data module
examples/csv_validation_example.py Usage examples demonstrating validation workflows and error handling patterns

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ayushkrtiwari ayushkrtiwari added Type:Medium junior developers talks Semver:minor minor version changes labels Oct 27, 2025
- Import Any from typing module
- Fix return type annotation in validate_input_csv function
- Addresses Copilot AI feedback on type hints
@ayushkrtiwari ayushkrtiwari merged commit c427d09 into OPCODE-Open-Spring-Fest:main Oct 27, 2025
8 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hacktoberfest-accepted PR:Accept To acknowledge the PR Semver:minor minor version changes Type:Medium junior developers talks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: CSV Validator

2 participants