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

Genesys validate_df #782

Merged
merged 4 commits into from
Oct 26, 2023
Merged

Genesys validate_df #782

merged 4 commits into from
Oct 26, 2023

Conversation

angelika233
Copy link
Contributor

Summary

Added new parameter to flow and task

Importance

data validation

Checklist

This PR:

  • follows the guidelines laid out in CONTRIBUTING.md
  • links relevant issue(s)
  • adds/updates tests (if appropriate)
  • adds/updates docstrings (if appropriate)
  • adds an entry in CHANGELOG.md

@angelika233 angelika233 requested a review from Diego-H-S October 25, 2023 14:21
@@ -488,6 +497,8 @@ def run(
end = end_date.replace("-", "")

file_name = f"WEBMESSAGE_{start}-{end}.csv"
if validate_df_dict:
Copy link
Collaborator

@Diego-H-S Diego-H-S Oct 25, 2023

Choose a reason for hiding this comment

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

to check whether validate_df_dict exists or, on the contrary, is None, I would recommend one of the following structures:

if validate_df_dict is not None:

or, the best one:

if isinstance(validate_df_dict, dict):

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the suggestion! For now, I won't be changing it because this if statement format is used in every flow that uses validate_df

@@ -327,6 +334,8 @@ def run(
report_columns (List[str], optional): List of exisiting column in report. Defaults to None.
conversationId_list (List[str], optional): List of conversationId passed as attribute of GET method. Defaults to None.
key_list (List[str], optional): List of keys needed to specify the columns in the GET request method. Defaults to None.
validate_df_dict (Dict[str,Any], optional): A dictionary with optional list of tests to verify the output dataframe. If defined, triggers
the `validate_df` task from task_utils. Defaults to None.

Returns:
List[str]: List of file names.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I leave it here because I can't leave a comment in the correspondent line.
In line 463 you have another data frame where to apply the same function. Or do you want to apply that functionality only to that specific view type?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Collaborator

@Diego-H-S Diego-H-S left a comment

Choose a reason for hiding this comment

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

Please, have a look at the two comments and let me know if you have doubts.

@angelika233 angelika233 requested a review from Diego-H-S October 26, 2023 07:33
Copy link
Collaborator

@Diego-H-S Diego-H-S left a comment

Choose a reason for hiding this comment

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

As I told Angelika, applying this function to some endpoints in Genesys, is quite tricky and might make the flow fail.
I'm going to approve it because if nothing is passed, it can't break the flow, but I rather recommend before changing any flow, contacting the owner and asking first.

@m-paz m-paz merged commit 96066e4 into dev Oct 26, 2023
3 checks passed
@trymzet trymzet deleted the genesys_validate_df branch March 19, 2024 12:24
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