-
Notifications
You must be signed in to change notification settings - Fork 41
enhance: evaluation result handling- include resource key address #262
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
Open
AkashS0510
wants to merge
15
commits into
main
Choose a base branch
from
resource_key
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
99b46bd
Enhance evaluation result handling: include resource key address
AkashS0510 afb9e1a
lint fix
AkashS0510 4806062
add meta in json provider even if its null
AkashS0510 85dd547
lint fix
AkashS0510 e3a1fe7
move resource_key addition logic to respective handlers
AkashS0510 625701e
lint fix
AkashS0510 52a1875
Update
AkashS0510 866f20c
change address to addresses
AkashS0510 ce9960a
lint fix
AkashS0510 fbf9aa1
make addresses list
AkashS0510 c40ff7b
lint fix
AkashS0510 8786453
fix
AkashS0510 539bfdd
Refactor
AkashS0510 ac4bd7e
Refactor
AkashS0510 e63e462
Add address extraction helper and refactor address handling in providers
refeed File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -82,7 +82,24 @@ def generate_evaluator_result(evaluator_obj, input_data, provider_module): | |
| continue | ||
|
|
||
| evaluation_result = evaluator_instance.evaluate(evaluator_input["value"], evaluator_data) | ||
| evaluation_result["meta"] = evaluator_input.get("meta") | ||
| meta = evaluator_input.get("meta") | ||
|
|
||
| # Include meta if it exists and isn't None | ||
| if meta: | ||
| evaluation_result["meta"] = meta | ||
|
|
||
| # Handle address - provider may have already set it | ||
| address = evaluator_input.get("address") | ||
| if address: | ||
| # Use the address directly from the provider result and add it to the evaluation result | ||
| evaluation_result["address"] = address | ||
| evaluation_result["message"] = f"{evaluation_result['message']} - (Address: `{address}`)" | ||
|
||
| # Check if address is in meta as a fallback for backward compatibility | ||
| elif meta and isinstance(meta, dict) and "address" in meta: | ||
| address = meta["address"] | ||
| evaluation_result["address"] = address | ||
| evaluation_result["message"] = f"{evaluation_result['message']} - (Address: `{address}`)" | ||
|
|
||
| evaluation_results.append(evaluation_result) | ||
| has_valid_evaluation = True | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.