Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
aa7089a5
Commit
aa7089a5
authored
Jan 20, 2017
by
Masood Malekghassemi
Browse files
Options
Downloads
Patches
Plain Diff
Be more verbose when generating Python documentation
parent
28ec869b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/distrib/python/docgen.py
+18
-7
18 additions, 7 deletions
tools/distrib/python/docgen.py
with
18 additions
and
7 deletions
tools/distrib/python/docgen.py
+
18
−
7
View file @
aa7089a5
...
@@ -28,11 +28,14 @@
...
@@ -28,11 +28,14 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from
__future__
import
print_function
import
argparse
import
argparse
import
os
import
os
import
os.path
import
os.path
import
shutil
import
shutil
import
subprocess
import
subprocess
import
sys
import
tempfile
import
tempfile
parser
=
argparse
.
ArgumentParser
()
parser
=
argparse
.
ArgumentParser
()
...
@@ -99,6 +102,7 @@ if args.submit:
...
@@ -99,6 +102,7 @@ if args.submit:
python_doc_dir
=
os
.
path
.
join
(
repo_dir
,
'
python
'
)
python_doc_dir
=
os
.
path
.
join
(
repo_dir
,
'
python
'
)
doc_branch
=
args
.
doc_branch
doc_branch
=
args
.
doc_branch
print
(
'
Cloning your repository...
'
)
subprocess
.
check_call
([
subprocess
.
check_call
([
'
git
'
,
'
clone
'
,
'
https://{}@github.com/{}/grpc
'
.
format
(
'
git
'
,
'
clone
'
,
'
https://{}@github.com/{}/grpc
'
.
format
(
github_user
,
github_repository_owner
)
github_user
,
github_repository_owner
)
...
@@ -110,8 +114,11 @@ if args.submit:
...
@@ -110,8 +114,11 @@ if args.submit:
subprocess
.
check_call
([
subprocess
.
check_call
([
'
git
'
,
'
checkout
'
,
'
upstream/gh-pages
'
,
'
-b
'
,
doc_branch
'
git
'
,
'
checkout
'
,
'
upstream/gh-pages
'
,
'
-b
'
,
doc_branch
],
cwd
=
repo_dir
)
],
cwd
=
repo_dir
)
print
(
'
Updating documentation...
'
)
shutil
.
rmtree
(
python_doc_dir
,
ignore_errors
=
True
)
shutil
.
rmtree
(
python_doc_dir
,
ignore_errors
=
True
)
shutil
.
copytree
(
DOC_PATH
,
python_doc_dir
)
shutil
.
copytree
(
DOC_PATH
,
python_doc_dir
)
print
(
'
Attempting to push documentation...
'
)
try
:
subprocess
.
check_call
([
'
git
'
,
'
add
'
,
'
--all
'
],
cwd
=
repo_dir
)
subprocess
.
check_call
([
'
git
'
,
'
add
'
,
'
--all
'
],
cwd
=
repo_dir
)
subprocess
.
check_call
([
subprocess
.
check_call
([
'
git
'
,
'
commit
'
,
'
-m
'
,
'
Auto-update Python documentation
'
'
git
'
,
'
commit
'
,
'
-m
'
,
'
Auto-update Python documentation
'
...
@@ -119,4 +126,8 @@ if args.submit:
...
@@ -119,4 +126,8 @@ if args.submit:
subprocess
.
check_call
([
subprocess
.
check_call
([
'
git
'
,
'
push
'
,
'
--set-upstream
'
,
'
origin
'
,
doc_branch
'
git
'
,
'
push
'
,
'
--set-upstream
'
,
'
origin
'
,
doc_branch
],
cwd
=
repo_dir
)
],
cwd
=
repo_dir
)
except
subprocess
.
CalledProcessError
:
print
(
'
Failed to push documentation. Examine this directory and push
'
'
manually: {}
'
.
format
(
repo_parent_dir
))
sys
.
exit
(
1
)
shutil
.
rmtree
(
repo_parent_dir
)
shutil
.
rmtree
(
repo_parent_dir
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment