- Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix docs #1206
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
Fix docs #1206
Conversation
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good but let me try with this change locally to ensure the docs are generated properly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately this doesn't work as it doesn't only replace from
with from_
in the docstrings. Since we only want this change to be in docstrings we'll need a change within utils/templates/base
where docs are generated.
Have you tried running the utils/generate_api.py
script? Do a git clone https://github.com/elastic/elasticsearch
at the same directory where your elasticsearch-py
directory is and then try running the script. Committing the results of the script will be a part of this PR.
Let me know if you have trouble. :)
@sethmlarson Thanks for your reply. I ran successfuly In my understanding, changing only I could see some changes with my Git UI (GitKraken) after running the script (image below) I don't understand specifically why the first diff with The two diffs about In essence, I need to make it work only with Thanks for your time and patience. [noob alert here haha] |
@bartier Don't worry about the "included with analysis" you shouldn't have to commit any of the changes not related to And no worries, I'm here to help you through the process, I really appreciate you taking on this issue :D |
@sethmlarson Hi! Is my last commit a valid solution? I've changed A lint error in CI appeared and I'm not sure how should I fix it :/ BTW, this PR commit history is kind of messy. Will my PR be closed automatically by GitHub if I squash all commits to generate only one (and facilitate review code process)? I ask that because my fail PR #1205 looks that this happened. |
The lint error can be seen here: https://github.com/elastic/elasticsearch-py/pull/1206/checks?check_run_id=603994279 It is caused by the No worries on the commit history, I'll squash all commits to one when merging. |
@sethmlarson I escaped Can you check it again? :) PS: Made some mistakes here with my config.email =( |
💚 CLA has been signed |
9eeb4a3
to 4b69c4f
Compare @sethmlarson Now I guess everything is good. I fixed my mistakes with commit history I guess (and PR was not closed automatically haha). |
@sethmlarson Is there anything I need to do to keep this going on or something I maybe have done wrong? :) Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you!
This PR attempts to close issue #1196
As discussed in the issue,
from
is a reserved Python keyword, and parameters are passed withfrom_
to avoid a syntax error. See a example below:elasticsearch-py/elasticsearch/client/__init__.py
Lines 702 to 704 in 7dec9e3
Docs were not rendering the
_
underscore character and it would causes a syntax error if you usefrom
instead offrom_
.To correcly output underscore character it just needs a
\
before it.Resume of changes:
Hope it helps :)