Skip to content

Conversation

frances-h
Copy link
Contributor

Resolve #741

@frances-h frances-h requested a review from a team as a code owner March 27, 2025 14:19
@frances-h frances-h requested review from amontanez24 and R-Palazzo and removed request for a team March 27, 2025 14:19
Copy link

codecov bot commented Mar 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.47%. Comparing base (f26cfc7) to head (c8c1bdc).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #755      +/-   ##
==========================================
+ Coverage   95.43%   95.47%   +0.04%     
==========================================
  Files         112      112              
  Lines        4379     4357      -22     
==========================================
- Hits         4179     4160      -19     
+ Misses        200      197       -3     
Flag Coverage Δ
integration 79.89% <90.90%> (+0.17%) ⬆️
unit 83.38% <100.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@frances-h frances-h requested a review from pvk-developer March 27, 2025 17:05
Copy link
Contributor

@R-Palazzo R-Palazzo left a comment

Choose a reason for hiding this comment

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

Looks good!
I looked for all the pd.to_datetime we're doing in the library and I'm pasting them here to decide if we should use _convert_datetime_column in those situations:

real_data[field] = pd.to_datetime(real_data[field])

real_data[column] = pd.to_datetime(

@frances-h frances-h removed the request for review from amontanez24 March 28, 2025 17:16
Copy link
Member

@pvk-developer pvk-developer left a comment

Choose a reason for hiding this comment

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

LGTM!

@frances-h frances-h requested a review from R-Palazzo March 31, 2025 15:07

# Run and Assert
with pytest.raises(ValueError, match="Column 'visits' is not a valid datetime"):
expected_msg = re.escape("Error converting column 'visits' to timestamp: ")
Copy link
Contributor

Choose a reason for hiding this comment

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

Should the actual error be included in the message?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is, but since it's a pandas error I didn't want to have the test fail if the message ever gets updated. Instead I just have the test match the initial substring we add.

@frances-h frances-h merged commit 2bd9681 into main Apr 1, 2025
55 checks passed
@frances-h frances-h deleted the issue-741-consolidate-datetime-handling branch April 1, 2025 14:02
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.

Consolidate handling of datetime columns
4 participants