Skip to content

[SC 7429] Add title as an optional parameter in the run_test #244

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

Conversation

AnilSorathiya
Copy link
Contributor

Internal Notes for Reviewers

External Release Notes

@AnilSorathiya AnilSorathiya added the internal Not to be externalized in the release notes label Nov 25, 2024
commit 5027f07
Merge: a711bf0 0efdb80
Author: Anil Sorathiya <anil@validmind.ai>
Date:   Fri Nov 29 16:11:49 2024 +0000

    Merge branch 'main' into anilsorathiya/sc-7429/add-title-parameter-in-run-test-interface

commit a711bf0
Merge: 220fcf4 6eb78fa
Author: Anil Sorathiya <anil@validmind.ai>
Date:   Tue Nov 26 18:40:03 2024 +0000

    Merge branch 'main' into anilsorathiya/sc-7429/add-title-parameter-in-run-test-interface

commit 220fcf4
Author: Anil Sorathiya <anil@validmind.ai>
Date:   Tue Nov 26 18:11:55 2024 +0000

    format the file

commit f27bcd0
Author: Anil Sorathiya <anil@validmind.ai>
Date:   Tue Nov 26 18:11:12 2024 +0000

    send title to backend

commit 77766a9
Author: Anil Sorathiya <anil@validmind.ai>
Date:   Mon Nov 25 13:32:17 2024 +0000

    add title as an optional parameter in the run_test
@johnwalz97 johnwalz97 force-pushed the anilsorathiya/sc-7429/add-title-parameter-in-run-test-interface branch from 5027f07 to c8897e5 Compare November 29, 2024 18:04
Copy link
Contributor

@cachafla cachafla 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 left a change suggestion to make use of the new property that was added.

AnilSorathiya and others added 2 commits December 4, 2024 11:43
Co-authored-by: Andres Rodriguez <andres@validmind.ai>
Co-authored-by: Andres Rodriguez <andres@validmind.ai>
Copy link
Contributor

github-actions bot commented Dec 4, 2024

PR Summary

This pull request introduces enhancements to the ValidMind library by adding support for optional titles in test result descriptions. The changes allow users to specify a custom title for test results, which can be used in place of the default test ID-derived name. This enhancement is reflected across various functions and classes responsible for generating and handling test results, including generate_description, background_generate_description, get_result_description, build_test_result, _run_composite_test, _run_comparison_test, and run_test.

Key changes include:

  • Addition of an optional title parameter to several functions and methods related to test result generation and handling.
  • Modification of the TestResult class to include a title attribute and a test_name property that returns the custom title if available.
  • Updates to the serialize method to include the title in the serialized output.

Additionally, the PR includes a new code example in a Jupyter notebook demonstrating how to log an image as a test result, and updates the Python version in the notebook metadata.

Test Suggestions

  • Test the generate_description function with and without the title parameter to ensure it correctly uses the custom title when provided.
  • Verify that the TestResult class correctly returns the custom title via the test_name property.
  • Check the serialization output of TestResult to ensure the title is included.
  • Run integration tests to ensure that the optional title feature works across the entire test result generation and logging workflow.
  • Test the new code example in the Jupyter notebook to ensure it correctly logs an image as a test result.

@AnilSorathiya AnilSorathiya merged commit b389d51 into main Dec 4, 2024
6 checks passed
@johnwalz97 johnwalz97 deleted the anilsorathiya/sc-7429/add-title-parameter-in-run-test-interface branch December 5, 2024 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal Not to be externalized in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants