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

samples directory now passes the missing-function-docstring linter #640

Merged
merged 5 commits into from
Dec 22, 2023

Conversation

macohen
Copy link
Contributor

@macohen macohen commented Dec 22, 2023

Description

The samples directory has docstrings on all functions. This is progress on #610. The missing-function-docstring linter has not been enabled in setup.cfg because work in other directories is still needed and I wanted to break up the work into smaller commits; merges.

Issues Resolved

N/A - progress on #610

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Mark Cohen <markcoh@amazon.com>
…l continue to work on this before committing setup.cfg

Signed-off-by: Mark Cohen <markcoh@amazon.com>
…'t fail while work on docstrings continues

Signed-off-by: Mark Cohen <markcoh@amazon.com>
Copy link

codecov bot commented Dec 22, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (e323ab2) 72.12% compared to head (8752a16) 72.12%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #640   +/-   ##
=======================================
  Coverage   72.12%   72.12%           
=======================================
  Files          89       89           
  Lines        7939     7939           
=======================================
  Hits         5726     5726           
  Misses       2213     2213           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

"""
an example showing how to create an synchronous connection to OpenSearch, create an index, index a document
and search to return the document
:return:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hello @macohen,

Thanks for your contribution! I've noticed that :return: appears to be empty at several places. Could you please fill it or remove it if not essential?

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! thanks for the review. :)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Linter is failing. Could you please run nox -rs format

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah. I saw that after I pushed. fixing log_collection_sample.py

@saimedhi saimedhi added the skip-changelog Skips changelog verifier label Dec 22, 2023
Signed-off-by: Mark Cohen <markcoh@amazon.com>
Signed-off-by: Mark Cohen <markcoh@amazon.com>
@saimedhi saimedhi merged commit 7b0b58d into opensearch-project:main Dec 22, 2023
54 checks passed
roma2023 pushed a commit to roma2023/opensearch-py that referenced this pull request Dec 28, 2023
…pensearch-project#640)

* updated files with docstrings to pass pylint

Signed-off-by: Mark Cohen <markcoh@amazon.com>

* updated samples to prepare for enabling missing-docstring linter; will continue to work on this before committing setup.cfg

Signed-off-by: Mark Cohen <markcoh@amazon.com>

* removed missing-function-docstring from setup.cfg so the linter doesn't fail while work on docstrings continues

Signed-off-by: Mark Cohen <markcoh@amazon.com>

* corrected unnecessary return docstring values

Signed-off-by: Mark Cohen <markcoh@amazon.com>

* fixing failure in 'black' on reformatting

Signed-off-by: Mark Cohen <markcoh@amazon.com>

---------

Signed-off-by: Mark Cohen <markcoh@amazon.com>
Signed-off-by: roma2023 <romasaparhan19@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-changelog Skips changelog verifier
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants