Commit Graph

32 Commits

Author SHA1 Message Date
Kefu Chai
dde92124b5 admin/doc-requirements: use funcparserlib from github
funcparserlib is pulled in as a dependency by blockdiag. the latest version of
funcparserlib available on pypi is v0.3.6 which is not compatible with
Python3.8.

in this change, funcparserlib is installed from github instead to
address the build failure like:

  File "/home/docs/checkouts/readthedocs.org/user_builds/ceph/envs/41855/lib/python3.8/site-packages/sphinxcontrib/seqdiag.py", line 26, in <module>
    import seqdiag.utils.rst.nodes
  File "/home/docs/checkouts/readthedocs.org/user_builds/ceph/envs/41855/lib/python3.8/site-packages/seqdiag/utils/rst/nodes.py", line 16, in <module>
    from blockdiag.utils.rst import nodes
  File "/home/docs/checkouts/readthedocs.org/user_builds/ceph/envs/41855/lib/python3.8/site-packages/blockdiag/utils/rst/nodes.py", line 21, in <module>
    import blockdiag.builder
  File "/home/docs/checkouts/readthedocs.org/user_builds/ceph/envs/41855/lib/python3.8/site-packages/blockdiag/builder.py", line 16, in <module>
    from blockdiag import parser
  File "/home/docs/checkouts/readthedocs.org/user_builds/ceph/envs/41855/lib/python3.8/site-packages/blockdiag/parser.py", line 43, in <module>
    from funcparserlib.parser import (a, finished, forward_decl, many, maybe, skip,
  File "/home/docs/checkouts/readthedocs.org/user_builds/ceph/envs/41855/lib/python3.8/site-packages/funcparserlib/parser.py", line 123
    except NoParseError, e:
                       ^
SyntaxError: invalid syntax

once https://github.com/vlasovskikh/funcparserlib/issues/65 is
addressed, we should drop this change.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2021-09-06 22:30:03 +08:00
Kefu Chai
1a36bf82fc admin, doc: introduce sphinxcontrib.seqdiag
for rendering sequence-diagram. unlike ditaa, seqdiag allows us to
create sequence-diagram without worrying about the layout. and the
syntax is quite like that of dot.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-08-02 19:02:56 +08:00
Kefu Chai
4968baa252 admin/doc-requirements.txt: pin sphinx and sphinx_rtd_theme to a certain version
to ensure that we can have reproducible builds

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-04-14 23:24:38 +08:00
Kefu Chai
6dea67ac2d admin: require sphinx>=3.2.1
loosen the required sphinx version.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-04-14 09:03:03 +08:00
Kefu Chai
275c6bd1b7 doc: switch to sphinx_rtd_theme
Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-03-04 19:00:47 +08:00
Kefu Chai
202b805aaf doc: build mon_command_api.rst using a homebrew extension
so we can build the command doc using ReadTheDoc infra, without adding
the generated rst file to the source repo.

before this change, all the commands are ordered alphabetically. after
this change, command docs are generated by two directives, and are
ordered separately. we could restructure the directives and merge them.

but let's leave it for a future change if this is important.

for more details on writing sphinx directives, see
https://www.sphinx-doc.org/en/master/extdev/markupapi.html and
https://docutils.sourceforge.io/docs/howto/rst-directives.html

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-01-08 11:35:42 +08:00
Kefu Chai
2f1f16ed86 admin/doc-requirements.txt: require breathe >= 4.20
to be compatible with Sphinx 3.2
see https://github.com/michaeljones/breathe/tree/v4.20.0#change-log

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-12-14 16:26:49 +08:00
Courtney Caldwell
ca2261781e
mgr/dashboard/api: generate offline API docs
Generate Sphinx documentation from OpenAPI YAML spec:
- Fixed Docs controller doc generation
- Now dashboard Python doesn't fails if dashboard/frontend/dist doesn't exist
- OpenAPI added to @ceph/api CODEOWNERS
- Renamed Ceph-Dashboard API to Ceph REST or RESTful API.
- OpenAPI Docs: fixed decorators and docstrings.
- Sphinx Docs: updated dashboard and dev ones.

Co-authored-by: Ernesto Puerta <epuertat@redhat.com>
Fixes: https://tracker.ceph.com/issues/45863
Signed-off-by: Courtney Caldwell <ccaldwel@redhat.com>
Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
2020-09-28 12:03:03 +02:00
Kefu Chai
7ca85e77d0 doc: replace luminous with |stable-release|
"luminous" is a magic number in these contexts, and we should use a
constant for representing it.

the "sphinx_substitution_extensions" sphinx extension is introduced for
performing the global subsitution.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-09-01 09:53:17 +08:00
Kefu Chai
fce56ad60c admin/doc-requirements: bump up sphinx to 3.2.1
* use the latest stable sphinx
* unpin breathe, sphinx-autodoc-typehints, so pip can choose the
  compatible versions without worrying about the compile failures.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-08-28 20:35:21 +08:00
Kefu Chai
b83be6f33b admin: move python-common deps out of doc-requirements.txt
to address the build failure of

python -m pip install --exists-action=w --no-cache-dir -r admin/doc-requirements.txt
ERROR: ../src/python-common is not a valid editable requirement. It should either be a path to a local project or a VCS URL (beginning with svn+, git+, hg+, or bzr+).

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-07-06 19:19:22 +08:00
Kefu Chai
83d03234ef admin/doc-requirements: pin sphinx-autodoc-typehints to 1.10.3
to silence following error:

ERROR: sphinx-autodoc-typehints 1.11.0 has requirement Sphinx>=3.0, but you'll have sphinx 2.4.3 which is incompatible.

* update breathe to the latest release, 4.14.2, which supports sphinx <
  3.0
* pin sphinx to 2.4.4 the last sphinx before 3.0.0. as if sphinx >= 3.0
is used, we have errors like:

Invalid C declaration: Expected identifier in nested name, got keyword: int [error at 18]
  CEPH_RADOS_API int rados_aio_append (rados_ioctx_t io, const char *oid, rados_completion_t completion, const char *buf, size_t len)
  ------------------^

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-06-22 10:37:57 +08:00
Sebastian Wagner
47330807dc doc/api: Add a generated reference of all mon commands.
Generate a ReST document which contains all mon commands.

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2020-05-05 12:51:50 +02:00
Kefu Chai
6a93a30f0e
Merge pull request #33592 from tchaikov/wip-doc-search
doc,admin: fix the builtin search

Reviewed-by: Brad Hubbard <bhubbard@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
2020-02-28 11:33:05 +08:00
Kefu Chai
afaba1640f admin/doc-requirements: bump sphinx version
to pick up the fix to address the search when using dirhtml builder

see https://github.com/sphinx-doc/sphinx/pull/6741

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-02-28 10:08:49 +08:00
Sebastian Wagner
30d415974c doc: Add sphinx_autodoc_typehints extension
`mgr/orchestrator_modules.rst` makes heavy use type hints.

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2020-02-27 13:16:00 +01:00
Sebastian Wagner
667f9e28ab doc: add prettytable to admin/doc-requirements.txt
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2020-02-17 10:24:01 +01:00
Kefu Chai
35909b8dff
Merge pull request #32301 from tchaikov/wip-build-doc
admin/doc-requirements.txt: bump up Sphinx and breathe

Reviewed-by: Sage Weil <sage@redhat.com>
2019-12-17 23:27:21 +08:00
Sage Weil
92595f3f9d admin/build-doc: do not use system site-packages
Don't use site-packages, since the host might have the same version, and
it won't have the ditaa and breathe.

Require Cython to make the venv sufficient.

Signed-off-by: Sage Weil <sage@redhat.com>
2019-12-17 08:47:25 -06:00
Kefu Chai
bb0c10e567 admin/doc-requirements.txt: bump Sphinx and breathe
* use the latest Sphinx
* use the latest breathe. also, since there is no need to be compatible
  with python2. we can move to 4.14.0 which is python3 only.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-12-17 22:27:30 +08:00
Kefu Chai
ace8cb15a6 admin/build-doc: use python3
to address https://github.com/sphinx-doc/sphinx/issues/3620, we need to
use sphinx with its fix at
e049f86b2d
in other words, we need to use sphinx v2.0.0 and up. but sphinx 2.0
requires python >= 3.5, so we have to use python3 for building the
documents.

in this change:

* doc-requirements.txt: install python3 packages on debian derivatives
* build-doc: install python3.6 packages from EPEL7, and use python3
  venv for using sphinx2
* doc-requirements.txt: bump up all python packages to latest
  stable.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-08-07 17:55:06 +08:00
Alfredo Deza
7ab6a39005 tools: pin the version of breathe that works with Python2
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2019-04-23 09:09:09 -04:00
Kefu Chai
358e85be8a doc: bump up sphinx and pyyaml versions
* bump up pyyaml version to address CVE-2017-18342, see
  https://nvd.nist.gov/vuln/detail/CVE-2017-18342
* bump up sphinx to the latest stable

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-01-21 23:22:42 +08:00
Noah Watkins
bb887b78f8 doc: show edit on github links and version warnings
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2018-11-02 14:49:15 -07:00
Noah Watkins
c475484f43 doc: install build-doc deps without git clone
With `-e` the repository is cloned, leading to `git clean` skipping
the cloned dependencies due to the `.git` directory, and forcing manual
removal.

[nwatkins@daq ceph]$ git clean -dxf
Skipping repository build-doc/virtualenv/src/breathe
Skipping repository build-doc/virtualenv/src/sphinx-ditaa

Signed-off-by: Noah Watkins <nwatkins@redhat.com>
2018-10-03 15:49:27 -07:00
Kefu Chai
fda079d5ed doc: switch to upstream sphinx-ditaa
it works with setuptools and is now compatible with py3

the py3 branch is created to track the upstream's master branch

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-09-11 23:05:26 +08:00
Alfredo Deza
88a1114cb3 admin: bump sphinx to 1.6
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2017-08-16 08:20:00 -04:00
Kefu Chai
cd69ded7af doc: Switch doxygen integration back to breathe
* asphyxiate needs more toolings, see
  https://github.com/ceph/asphyxiate/issues/1
* this commit basically reverts c96064
* use `autodoxygen` directive to doxygen referenced source files
* do not call `doxygen` explicitly in `build-doc`, `autodoxygen`
  will take care of it.

Fixes: #6115
Fixes: #6115
Signed-off-by: Kefu Chai <kchai@redhat.com>
2015-03-20 17:17:16 +08:00
Alfredo Deza
99c42e13eb make sure we use a version of sphinx that we can handle
Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
2013-09-09 14:00:59 -04:00
Sage Weil
70360f840e github.com/NewDreamNetwork -> github.com/ceph 2012-03-02 11:00:08 -08:00
Tommi Virtanen
c960641666 doc: Switch doxygen integration from breathe to asphyxiate.
TODO: path of librados.h is now just the basename

TODO: no enum support for now

TODO: no @bug support for now

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2012-01-09 19:03:56 -08:00
Tommi Virtanen
2bdf9078ef doc: Reorganize pip calls to use a requirements file.
The conditional before running pip install was unnecessary,
"pip install" on already installed packages is fast (as long
as it's not --upgrade), and --quiet makes it not spam the
console.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2011-12-06 12:13:03 -08:00