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

Generate opensearch-py client from API specs #551

Merged
merged 1 commit into from
Oct 26, 2023

Conversation

saimedhi
Copy link
Collaborator

@saimedhi saimedhi commented Oct 26, 2023

Description

Generate all APIs

Issues Resolved

closes #489, #477

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.

@codecov
Copy link

codecov bot commented Oct 26, 2023

Codecov Report

Merging #551 (356bd96) into main (fa8f3a7) will increase coverage by 0.44%.
Report is 3 commits behind head on main.
The diff coverage is 84.41%.

@@            Coverage Diff             @@
##             main     #551      +/-   ##
==========================================
+ Coverage   70.63%   71.08%   +0.44%     
==========================================
  Files          83       83              
  Lines        7857     7756     -101     
==========================================
- Hits         5550     5513      -37     
+ Misses       2307     2243      -64     
Files Coverage Δ
opensearchpy/_async/client/__init__.py 44.98% <100.00%> (+0.73%) ⬆️
opensearchpy/_async/client/cat.py 65.78% <ø> (ø)
opensearchpy/_async/client/cluster.py 51.76% <100.00%> (ø)
opensearchpy/_async/client/dangling_indices.py 53.33% <ø> (ø)
opensearchpy/_async/client/ingest.py 50.00% <ø> (ø)
opensearchpy/_async/client/nodes.py 63.15% <ø> (ø)
opensearchpy/_async/client/snapshot.py 40.67% <100.00%> (+0.05%) ⬆️
opensearchpy/_async/client/tasks.py 64.28% <ø> (ø)
opensearchpy/client/__init__.py 60.59% <100.00%> (-0.20%) ⬇️
opensearchpy/client/cat.py 65.78% <ø> (ø)
... and 10 more

... and 10 files with indirect coverage changes

Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

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

Great!

if all_paths_have_deprecation and x_deprecation_message is not None:
api.update({"deprecation_message": x_deprecation_message})

if namespace == "indices" and name == "put_mapping":
Copy link
Member

@dblock dblock Oct 26, 2023

Choose a reason for hiding this comment

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

Do you want to try to extract the JSON patch logic from my other PR after this, and we can discuss whether it's a good idea, or do you want me to do it?

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Consolidating all patches in one place within overrides is efficient. However, creating a completely new spec for those endpoints might risk becoming outdated and misaligned with the main spec.

@dblock dblock merged commit 1190079 into opensearch-project:main Oct 26, 2023
61 checks passed
@saimedhi saimedhi deleted the merge/client branch December 14, 2023 20:30
roma2023 pushed a commit to roma2023/opensearch-py that referenced this pull request Dec 28, 2023
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.

Differences between Generated and Existing python client APIs
2 participants