chore(python): fix autogenerated docs/index.rst to support nested dir #1246
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR #1114 added docs/index.rst to python templates. PR #1114 didn't generate docs/index.rst properly for python-orchestration-airflow because it only detects versions in the 1st level of the
/google/cloud/<API>
directory. As a result, no versions are detected. The versions for python-orchestration-airflow are 1 level deeper at/google/cloud/orchestration/airflow
. I've also found and fixed a bug where I wasn't checking if the path is a directory.I've included the steps I used for testing after cloning synthtool.
After cloning python-orchestration-airflow, I completed the following steps
rm -rf owlbot.py
to delete owlbot.py to avoid having to customize owlbot.py to autogenerate docs/index.rstdocker run --user $(id -u):$(id -g) --rm -v $(pwd):/repo -w /repo testindexrst
docs/index.rst
looks correct and versions are missing