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

[backport][2.9][PR #70446] Refactor Python API examples and docs #70851

Merged
merged 2 commits into from Aug 6, 2020

Conversation

webknjaz
Copy link
Member

SUMMARY

Backport of 8d97c8c + partial backport of 4816bb4. It should be merged on top of PR #70842

This change is a follow-up for #70445. When I looked at #69758, I noticed that
there's two places with almost the same example in the repo.
It'd be way easier to maintain just one piece of code and include it in other
place dynamically.

It's basically a merge of two almost identical examples originally
stored as a Python module + its copy-paste in the docs.

The patch also changes the docs RST file to include contents of the example
file instead of holding a copy of similar code.

ISSUE TYPE
  • Docs Pull Request Backport
COMPONENT NAME

docs/docsite/rst/dev_guide/developing_api.rst
examples/scripts/uptime.py

ADDITIONAL INFORMATION

N/A

@ansibot ansibot added affects_2.9 This issue/PR affects Ansible v2.9 backport This PR does not target the devel branch. core_review In order to be merged, this PR must follow the core review workflow. docs This issue/PR relates to or includes documentation. docsite This issue/PR relates to the documentation website. needs_triage Needs a first human triage before being processed. support:core This issue/PR relates to code supported by the Ansible Engineering Team. test This PR relates to tests. labels Jul 23, 2020
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Aug 1, 2020
@relrod
Copy link
Member

relrod commented Aug 6, 2020

@webknjaz Can you resolve the two conflicts?

@webknjaz
Copy link
Member Author

webknjaz commented Aug 6, 2020

Oh it!

webknjaz and others added 2 commits August 6, 2020 20:07
It is a partial backport of ansible#70224

(partially cherry picked from commit 4816bb4)
PR ansible#70446: it's a follow-up for ansible#70445.

It includes a merge of `examples/scripts/uptime.py` and a similar
code snippet from `docs/docsite/rst/dev_guide/developing_api.rst`.

This patch also changes the docs RST file to include contents of
the example file instead of holding a copy of a similar code.

(cherry picked from commit 20bb915)
@webknjaz
Copy link
Member Author

webknjaz commented Aug 6, 2020

@relrod done!

@webknjaz webknjaz requested a review from relrod August 6, 2020 18:08
@ansibot ansibot removed the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Aug 6, 2020
@relrod
Copy link
Member

relrod commented Aug 6, 2020

Thanks much!

@relrod relrod merged commit e5609db into ansible:stable-2.9 Aug 6, 2020
@sivel sivel removed the needs_triage Needs a first human triage before being processed. label Aug 6, 2020
@ansible ansible locked and limited conversation to collaborators Sep 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.9 This issue/PR affects Ansible v2.9 backport This PR does not target the devel branch. core_review In order to be merged, this PR must follow the core review workflow. docs This issue/PR relates to or includes documentation. docsite This issue/PR relates to the documentation website. support:core This issue/PR relates to code supported by the Ansible Engineering Team. test This PR relates to tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants