Skip to content

Fix df from result table error message + old types #543

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

Merged
merged 42 commits into from
Jun 18, 2024

Conversation

mayamarom10
Copy link
Member

@mayamarom10 mayamarom10 commented Jun 18, 2024

fixed error message in case of none existing type
added old type names in kusto to default dictionary #542

Copy link

github-actions bot commented Jun 18, 2024

Test Results

    6 files  ±0      6 suites  ±0   25m 40s ⏱️ + 5m 41s
  292 tests ±0    266 ✅ ±0   26 💤 ±0  0 ❌ ±0 
1 752 runs  ±0  1 596 ✅ ±0  156 💤 ±0  0 ❌ ±0 

Results for commit 5ae5218. ± Comparison against base commit 0865ed5.

♻️ This comment has been updated with latest results.

if isinstance(converter, str):
frame[column_name] = frame[column_name].astype(converter)
else:
if converter is None:
Copy link
Collaborator

Choose a reason for hiding this comment

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

move this before the isinstance

@@ -18,14 +18,22 @@ def default_dict() -> Converter:
return {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add a test with an alias name, and with a missing type name

ohadbitt
ohadbitt previously approved these changes Jun 18, 2024
if isinstance(converter, str):
frame[column_name] = frame[column_name].astype(converter)
else:
if converter is None:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Move None check before isinstance

assert type(df_int_to_float.iloc[0].RecordInt) is numpy.float64
assert df.iloc[0].RecordInt == 5678

# Testing missing type conversion
raised = False
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use pytest.raises

@mayamarom10 mayamarom10 merged commit 5c19093 into master Jun 18, 2024
11 checks passed
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.

3 participants