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

implement API for EvaluationResult protocol #55

Merged
merged 14 commits into from
Jan 22, 2019

Conversation

yuki-mt
Copy link
Member

@yuki-mt yuki-mt commented Jan 8, 2019

What is this PR for?

add method for EvaluationResult protocol to return detailed evaluation result to a client.
related to rekcurd/rekcurd-python#24

Change in frontend will be the next PR.

This PR includes

  • move API code about evaluation to api_evaluation.py
    • also, move test code to drucker_dashboard/test/test_api_evaluation.py
  • add response marshalling to evaluation APIs.
  • update grpc submodule to add result_path to EvaluationResultRequest grpc-proto#13
  • add API and core method for EvaluationResult protocol
  • add f.seek(0) and reset iteration in hash_util.py to prevent StopIteration Error due to more file reading.

What type of PR is it?

Feature, Bugfix

What is the issue?

N/A

How should this be tested?

python -m unittest test/test_api_evaluation.py

@yuki-mt
Copy link
Member Author

yuki-mt commented Jan 8, 2019

Probably this PR has conflict with #54 , so I will fix this PR and remove WIP after #54 is merged

res = json.dumps(value)
else:
res = value
self._result = res
Copy link
Member Author

Choose a reason for hiding this comment

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

This is to

  • get result as dict in Python while storing in db as string.
  • result contains result_id in the dict

@yuki-mt yuki-mt changed the title [WIP] implement API for EvaluationResult protocol implement API for EvaluationResult protocol Jan 11, 2019
@yuki-mt
Copy link
Member Author

yuki-mt commented Jan 11, 2019

I resolved conflict. Please review it

@codecov-io
Copy link

codecov-io commented Jan 11, 2019

Codecov Report

Merging #55 into master will decrease coverage by 1.95%.
The diff coverage is 59.37%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #55      +/-   ##
==========================================
- Coverage   83.91%   81.96%   -1.96%     
==========================================
  Files          29       30       +1     
  Lines        1343     1397      +54     
==========================================
+ Hits         1127     1145      +18     
- Misses        216      252      +36
Impacted Files Coverage Δ
drucker_dashboard/utils/hash_util.py 31.57% <0%> (-40.65%) ⬇️
drucker_dashboard/apis/__init__.py 92.68% <100%> (+0.37%) ⬆️
drucker_dashboard/apis/api_service.py 93.67% <100%> (+18.21%) ⬆️
drucker_dashboard/apis/api_application.py 100% <100%> (+0.88%) ⬆️
drucker_dashboard/apis/api_evaluation.py 57.65% <57.65%> (ø)
drucker_dashboard/models/evaluation_result.py 79.16% <63.63%> (-13.7%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 57dc2ba...be1742f. Read the comment docs.

@yuki-mt
Copy link
Member Author

yuki-mt commented Jan 11, 2019

we need the same version of drucker-grpc between dashboard and client to pass e2e test...

So we need to do

  1. release implement method for EvaluationResult protocol rekcurd-python#24
  2. update drucker, merge, and release fix test for rekcurd 0.4.4 python-client#14
  3. update drucker_client in this PR

@yuki-mt
Copy link
Member Author

yuki-mt commented Jan 16, 2019

I updated drucker-client and fix e2e test. Please review it now

Copy link
Member

@keigohtr keigohtr left a comment

Choose a reason for hiding this comment

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

Please check my comments, thank you :)

drucker_dashboard/apis/api_evaluation.py Show resolved Hide resolved
drucker_dashboard/apis/api_evaluation.py Outdated Show resolved Hide resolved
drucker_dashboard/apis/api_evaluation.py Outdated Show resolved Hide resolved
drucker_dashboard/apis/api_evaluation.py Show resolved Hide resolved
Copy link
Member

@keigohtr keigohtr left a comment

Choose a reason for hiding this comment

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

Almost LGTM.
Could you check my comment?

drucker_dashboard/models/evaluation_result.py Show resolved Hide resolved
Copy link
Member

@keigohtr keigohtr left a comment

Choose a reason for hiding this comment

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

LGTM

@yuki-mt yuki-mt merged commit 1d4fcd7 into master Jan 22, 2019
@yuki-mt yuki-mt deleted the feature/EvaluateResult_proto branch January 22, 2019 05:38
@yuki-mt yuki-mt mentioned this pull request Jan 22, 2019
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