8000 docs(helper): add missing helper docstrings by Yongxuanzhang · Pull Request #1927 · jina-ai/serve · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
8000

docs(helper): add missing helper docstrings #1927

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

Merged
merged 2 commits into from
Feb 13, 2021
Merged

docs(helper): add missing helper docstrings #1927

merged 2 commits into from
Feb 13, 2021

Conversation

Yongxuanzhang
Copy link
Contributor

No description provided.

@jina-bot jina-bot added size/S area/core This issue/PR affects the core codebase area/helper This issue/PR affects the helper functionality labels Feb 11, 2021
@codecov
Copy link
codecov bot commented Feb 11, 2021

Codecov Report

Merging #1927 (7447aca) into master (deff987) will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1927      +/-   ##
==========================================
+ Coverage   86.50%   86.52%   +0.01%     
==========================================
  Files         148      148              
  Lines        7042     7056      +14     
==========================================
+ Hits         6092     6105      +13     
- Misses        950      951       +1     
Impacted Files Coverage Δ
jina/drivers/convert.py 93.93% <0.00%> (-6.07%) ⬇️
jina/executors/indexers/keyvalue.py 98.70% <0.00%> (-1.30%) ⬇️
jina/types/document/converters.py 95.77% <0.00%> (-1.11%) ⬇️
jina/types/sets/document.py 94.87% <0.00%> (-0.75%) ⬇️
jina/drivers/index.py 96.29% <0.00%> (-0.26%) ⬇️
jina/drivers/querylang/queryset/helper.py
jina/drivers/querylang/queryset/dunderkey.py
jina/drivers/querylang/queryset/lookup.py
jina/types/querylang/queryset/helper.py 92.30% <0.00%> (ø)
jina/types/querylang/queryset/lookup.py 84.21% <0.00%> (ø)
... and 5 more

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 482903d...7447aca. Read the comment docs.

@github-actions
Copy link
github-actions bot commented Feb 11, 2021

Latency summary

Current PR yields:

  • 😶 index QPS at 914, delta to last 3 avg.: +0%
  • 🐢🐢 query QPS at 13, delta to last 3 avg.: -13%

Breakdown

Version Index QPS Query QPS
current 914 13
1.0.0 931 15
0.9.33 903 14

Backed by latency-tracking. Further commits will update this comment.

@Yongxuanzhang Yongxuanzhang marked this pull request as ready for review February 11, 2021 22:01
@Yongxuanzhang Yongxuanzhang requested a review from a team as a code owner February 11, 2021 22:01
Copy link
Member
@maximilianwerk maximilianwerk left a comment

Choose a reason for hiding this comment

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

I'd rather remove not used functions.

@@ -904,7 +948,10 @@ def run_async(func, *args, **kwargs):
"""

class RunThread(threading.Thread):
"""Create a running thread when in Jupyter notebook."""
Copy link
Member

Choose a reason for hiding this comment

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

This class is private to the function. Having docstrings is OK, but I'd still rename it to _RunThread in order to highlight, that it is private.

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

jina/helper.py Outdated
def run(self):
"""Run function for thread."""
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"""Run function for thread."""
"""Runs given `func` asynchronously."""

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

jina/helper.py Outdated
@@ -743,11 +757,41 @@ def typename(obj):


def rsetattr(obj, attr: str, val):
Copy link
Member

Choose a reason for hiding this comment

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

rsetattr and rgetattr are not used anywhere in the codebase anymore. Let's remove them.

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
Member
@nan-wang nan-wang left a comment

Choose a reason for hiding this comment

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

LGTM👍

@hanxiao hanxiao merged commit 1898092 into master Feb 13, 2021
@hanxiao hanxiao deleted the docs-helper branch February 13, 2021 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core This issue/PR affects the core codebase area/helper This issue/PR affects the helper functionality size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0