Skip to content

Conversation

@pesap
Copy link
Collaborator

@pesap pesap commented Oct 18, 2025

No description provided.

@pesap pesap requested a review from daniel-thom October 18, 2025 20:31
@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 88.17204% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.36%. Comparing base (2728279) to head (189d184).

Files with missing lines Patch % Lines
src/chronify/store.py 70.00% 9 Missing ⚠️
src/chronify/csv_utils.py 88.23% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #54      +/-   ##
==========================================
- Coverage   91.45%   91.36%   -0.09%     
==========================================
  Files          44       46       +2     
  Lines        3464     3556      +92     
==========================================
+ Hits         3168     3249      +81     
- Misses        296      307      +11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

dict
File information including columns, detected format, size, and recommendations
"""
import duckdb
Copy link
Collaborator

Choose a reason for hiding this comment

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

This function could reside in csv_io.py. It doesn't need self, right?

def _get_file_size(path: str | Path) -> int:
try:
return os.path.getsize(path)
except (OSError, FileNotFoundError):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't you return an error if the file doesn't exist?



@lru_cache(maxsize=32)
def _get_file_size(path: str | Path) -> int:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this needed? Wouldn't it be risky? It seems like someone could change the file during a session.

"""
return self.ingest_from_csvs((path,), src_schema, dst_schema, connection=connection)
if _should_use_auto_detect(auto_detect) and _is_large_file(path):
logger.info(f"Processing large file {path} with auto-detection optimizations")
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is the optimization?

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.

4 participants