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

Move main_input, main_output, and _extract_content out of app.py #1706

Merged
merged 10 commits into from
Jan 9, 2025

Conversation

sfc-gh-gtokernliang
Copy link
Contributor

@sfc-gh-gtokernliang sfc-gh-gtokernliang commented Jan 3, 2025

Description

Moved main_input, main_output, and _extract_content out of app.py for easier reuse

Other details good to know for developers

N/A

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to
    not work as expected)
  • New Tests
  • This change includes re-generated golden test results
  • This change requires a documentation update

Important

Refactored main_input, main_output, and _extract_content functions to signature.py and added tests in test_signature_utils.py.

  • Refactoring:
    • Moved main_input, main_output, and _extract_content from app.py to signature.py for better reusability.
  • Testing:
    • Added test_signature_utils.py to test main_input and main_output functions.
  • Misc:
    • Updated api.trulens.3.11.yaml to reflect changes in function locations.

This description was created by Ellipsis for 5b6c7be. It will automatically update as commits are pushed.

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Jan 3, 2025
src/core/trulens/core/utils/signature.py Outdated Show resolved Hide resolved
Args:
func: The main function whose main output we are guessing.

sig: The signature of the above function.
Copy link
Contributor

Choose a reason for hiding this comment

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

I take it the sig and bindings was just copied artifacts from main_input?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

src/core/trulens/core/utils/signature.py Outdated Show resolved Hide resolved
src/core/trulens/core/utils/signature.py Outdated Show resolved Hide resolved
src/core/trulens/core/utils/signature.py Show resolved Hide resolved
src/core/trulens/core/utils/signature.py Show resolved Hide resolved
@sfc-gh-gtokernliang sfc-gh-gtokernliang merged commit b6c9d5f into main Jan 9, 2025
9 of 10 checks passed
@sfc-gh-gtokernliang sfc-gh-gtokernliang deleted the garett/moving-things-out branch January 9, 2025 21:16
@sfc-gh-jreini sfc-gh-jreini mentioned this pull request Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:XL This PR changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants