Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.devtools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bob
bob.devtools
Commits
98080d8d
Commit
98080d8d
authored
6 years ago
by
André Anjos
Browse files
Options
Downloads
Patches
Plain Diff
[scripts] Add script to dump sphinx catalogs
parent
64b607c4
No related branches found
No related tags found
No related merge requests found
Pipeline
#25717
failed
6 years ago
Stage: build
Stage: deploy
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
bob/devtools/scripts/dumpsphinx.py
+46
-0
46 additions, 0 deletions
bob/devtools/scripts/dumpsphinx.py
conda/meta.yaml
+2
-1
2 additions, 1 deletion
conda/meta.yaml
setup.py
+2
-0
2 additions, 0 deletions
setup.py
with
50 additions
and
1 deletion
bob/devtools/scripts/dumpsphinx.py
0 → 100644
+
46
−
0
View file @
98080d8d
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import
logging
logger
=
logging
.
getLogger
(
__name__
)
from
sphinx.ext
import
intersphinx
import
click
from
.
import
bdt
from
..log
import
verbosity_option
@click.command
(
context_settings
=
dict
(
ignore_unknown_options
=
True
,
allow_extra_args
=
True
,
),
epilog
=
'''
Examples:
1. Dumps objects documented in python 3.x:
$ bdt dumpsphinx https://docs.python.org/3/objects.inv
2. Dumps objects documented in numpy:
$ bdt dumpsphinx https://docs.scipy.org/doc/numpy/objects.inv
3. Dumps objects documented in matplotlib:
$ bdt dumpsphinx http://matplotlib.org/objects.inv
'''
)
@click.argument
(
'
url
'
)
@verbosity_option
()
@bdt.raise_on_error
def
dumpsphinx
(
url
):
"""
Dumps all the objects given an sphinx catalog/inventory URL
This command is useful when you are struggling to do proper links from your
documentation.
"""
intersphinx
.
inspect_main
([
url
])
This diff is collapsed.
Click to expand it.
conda/meta.yaml
+
2
−
1
View file @
98080d8d
...
...
@@ -39,10 +39,10 @@ requirements:
-
gitpython
-
python-gitlab
-
requests
-
sphinx
test
:
requires
:
-
sphinx
-
sphinx_rtd_theme
imports
:
-
{{
name
}}
...
...
@@ -54,6 +54,7 @@ test:
-
bdt changelog --help
-
bdt release --help
-
bdt visibility --help
-
bdt dumpsphinx --help
-
sphinx-build -aEW ${PREFIX}/share/doc/{{ name }}/doc {{ project_dir }}/sphinx
about
:
...
...
This diff is collapsed.
Click to expand it.
setup.py
+
2
−
0
View file @
98080d8d
...
...
@@ -13,6 +13,7 @@ requires = [
'
requests
'
,
'
gitpython
'
,
'
python-gitlab
'
,
'
sphinx
'
,
]
setup
(
...
...
@@ -42,6 +43,7 @@ setup(
'
changelog = bob.devtools.scripts.changelog:changelog
'
,
'
lasttag = bob.devtools.scripts.lasttag:lasttag
'
,
'
visibility = bob.devtools.scripts.visibility:visibility
'
,
'
dumpsphinx = bob.devtools.scripts.dumpsphinx:dumpsphinx
'
,
],
},
classifiers
=
[
...
...
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
register
or
sign in
to comment