Commit Graph

78 Commits

Author SHA1 Message Date
Kefu Chai
8bd8a8badb doc: add in-doc search from read the docs
readthedocs-sphinx-search features better user experience than the
builtin search offered by sphinx

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-04-10 08:38:06 +08:00
Kefu Chai
0cb56e0f13 doc: use plantweb as fallback of sphinx-ditaa
RTD does not support installing system packages, the only ways to install
dependencies are setuptools and pip. while ditaa is a tool written in
Java. so we need to find a native python tool allowing us to render ditaa
images. plantweb is able to the web service for rendering the ditaa
diagram. so let's use it as a fallback if "ditaa" is not around.

also start a new line after the directive, otherwise planweb server will
return 500 at seeing the diagram.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-04-10 08:38:06 +08:00
Kefu Chai
c0615a4d27
Merge pull request #33911 from tchaikov/wip-cephfs-doc
pybind/cephfs, doc: add python binding doc

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2020-03-24 23:01:16 +08:00
Kefu Chai
58270ebaf7 admin/build-doc: add dot to the check list
also print the missing list in stderr

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-03-15 12:50:45 +08:00
Kefu Chai
c20e074efa admin/build-doc: add optional "_" prefix before function names to match
as compilers targeting ELF does not add the leading "_" to symbol names,
while clang on OSX always do this.

and remove the underscore from the symbol name when generating the
function name, as the compiler will add it back for us.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-03-15 12:50:45 +08:00
Kefu Chai
ea67a42f99 admin/build-doc: drop --no-as-needed on Darwin
which is not supported by ld on OSX.

also, pass the rpath argument as a new command line argument instead
using -rpath=foo, which is not supported by llvm linker.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-03-15 12:50:45 +08:00
Kefu Chai
e88f8eeaf8 admin/install-doc: error out if missing deps
we should not `set -e` at the very beginning of this script, which fails
the script if any dependency is missing without printing out error
messages.

in this change `set -e` is removed. and refactor the code to print the
error message.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-03-15 10:56:10 +08:00
Kefu Chai
7357fde070 doc/cephfs: add python binding doc
and restructure cephfs/api to move the javadoc for cephfs to this
directory

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-03-12 18:46:48 +08:00
Kefu Chai
b9e282f0e3 admin/build-doc: use "ceph" for prefix of functions defined by libcephfs
if some python module tries to `import cephfs`, it should not fail.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-03-11 22:43:08 +08:00
Kefu Chai
1183f26719 admin/build-doc: pass -rpath to linker
to make sure the dummy cythonized python binding is able to find the dummy C binding.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-03-11 22:43:08 +08:00
Brad Hubbard
8ccf43bce9 admin/serve-doc: Switch to python3 only
Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
2020-02-29 10:29:21 +10: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
Varsha Rao
62f9b4d65c admin/build-doc: Fix doxygen typo
Signed-off-by: Varsha Rao <varao@redhat.com>
2020-01-09 17:14:47 +05:30
Kefu Chai
b87781c120 admin/build-doc: always install python3-* for build deps
since we've dropped the support of python36-*, i.e. python packages
provided by EPEL7 before RHEL7/CentOS7 included python3. as before the
inclusion of python3 as supported python3, python packages are named
python36-*. and they don't provide python3-*. so we had to install
python36-* explicitly. now that we are able to use the python3-*
packages, we can just install python3-*.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-01-04 17:05:06 +08: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
Yuval Lifshitz
e17e4bfcc0 build-doc: allow building docs on fedora 30
Signed-off-by: Yuval Lifshitz <yuvalif@yahoo.com>
2019-09-04 16:14:56 +03: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
Kefu Chai
d185c46a43 admin,doc/_ext/ceph_releases.py: use yaml.safe_load()
see
https://github.com/yaml/pyyaml/wiki/PyYAML-yaml.load(input)-Deprecation

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-06-09 22:20:14 +08:00
Samuel Just
7915c89e19 admin/build-doc: use PeeringState* for gen_state_diagram.py
Signed-off-by: Samuel Just <sjust@redhat.com>
2019-05-01 11:22:29 -07: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
Abhishek Lekshmanan
6b6d6ccab8 tools: admin/build-doc: keep-going when finding warnings
This allows the build to fail, but also report a list of warnings so that
multiple runs are not required to find all the errors in doc changes

Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2019-03-19 13:49:53 +01: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
Aleksei Gutikov
649545e5d8 doc: compile dot into svg
Png images included into docs are useless because of small resolution.
http://docs.ceph.com/docs/master/dev/peering/#state-model

While SVG is vector and supported by Sphinx.

Signed-off-by: Aleksei Gutikov <aleksey.gutikov@synesis.ru>
2018-07-23 10:53:52 +03:00
Boris Ranto
93cd098103 build-doc: Upgrade ceph python libraries
If you have python ceph bindings installed on your system, the doc-build
script will fail since pip detects them and fails to install the updated
bindings in the virtualenv. This fixes the issue by adding --upgrade
flag to pip so that it overrides the system-installed libraries.

Signed-off-by: Boris Ranto <branto@redhat.com>
2018-03-05 22:46:39 +01:00
Jason Dillaman
f309180b96 admin/build-doc: support renamed python2 RPMs
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2018-01-04 09:55:16 -05:00
Kefu Chai
f8cc72ff1c admon/build-doc: be compatible with py3
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-09-11 23:05:26 +08: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
Kefu Chai
c6056be36a doc: remove manpage-howto.txt
since manpages are built as part of "make" process, we can dispense with
the manual steps.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-08-22 11:11:17 +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
Alfredo Deza
d3543ef8b0 admin: do not allow errors or warnings from doc build
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2017-08-16 08:20:00 -04:00
Yu Shengzuo
e97f6eb081 doc: correct the package name in ceph/admin/build-doc
In document, it is called 'libxml2-devel', one of the dependent
package of CentOS/RHEL7. But the 'build-doc' check 'libxml-devel'.
And it id also called 'libxml2-devel' in software of yum repo .
So correct the checked package name in ceph/admin/build-doc.

Signed-off-by: Yu Shengzuo <yu.shengzuo@99cloud.net>
2017-04-20 05:14:29 +00:00
Abhishek Lekshmanan
10ff461fc0 script: serve-doc print the port we're serving
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2017-04-10 19:16:56 +02:00
Abhishek Lekshmanan
a69efc7760 script: build-doc use python2 only for virtualenv
This is because the sphinx-ditaa package and ceph's rbd/rgw/rados pybind
require python2

Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2017-04-10 19:15:25 +02:00
Kefu Chai
5b9ec53512 admin/build-doc: support optional argument for specifying sphinx builders
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-03-21 13:47:05 +08:00
Kefu Chai
8fd95430fe doc: add doc for pybind of rgw
Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-11-09 21:07:29 +08:00
Sage Weil
fba798dcad remove autotools
Signed-off-by: Sage Weil <sage@redhat.com>
2016-09-07 11:50:14 -04:00
Kefu Chai
133d2f9fb4 admin/build-doc: s/iquote /iquote/
currently this works fine, but we ran into this problem before. and
technically "-iquote<dir>" is the valid syntax, and "-iquote <dir>"
is not. see https://gcc.gnu.org/onlinedocs/gcc/Directory-Options.html

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-08-09 17:08:45 +08:00
Kefu Chai
333877023e doc,pybind: bypass sanity check if building doc
the empty .so file does not compile at all, so we need to bypass the
sanity check, if we are building docs. and what sphinx needs is just the
docstrings.

Fixes: http://tracker.ceph.com/issues/16940
Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-08-09 17:08:45 +08:00
Kefu Chai
0fa22f0d1b admin/build-doc: use doc_deps.deb.txt for build-deps instead
also update `doc_deps.deb.txt` according to the changes in build-doc.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-05-24 14:08:11 +08:00
Kefu Chai
8ce8429f86 admin/build-doc: remove librbd-dev from build-dependencies
Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-05-24 12:58:43 +08:00
lafont
54ec7556bc doc: update the "building doc" part
* In the doc, the explicit and outdated list of required
  dependencies is removed. Now, launching `./admin/build-doc`
  is suggested because the script gives the missing dependencies.
* Little refactoring of the "Debian checking dependencies" part
  in the script `./admin/build-doc`.
* In the suggested "apt-get" command to install dependencies, the
  option `-o APT::Install-Recommends=true` is added just in case.

Signed-off-by: François Lafont <francois.lafont@ac-versailles.fr>
2016-05-18 16:23:08 +02:00
Mehdi Abaakouk
10f125f765 pybind: move cephfs to Cython
This change moves cephfs binding to Cython.

Closes-bug: #14818
Signed-off-by: Mehdi Abaakouk <sileht@redhat.com>
2016-02-29 10:58:52 +01:00
Mehdi Abaakouk
67f95c8f66 Update the documentation
Signed-off-by: Mehdi Abaakouk <sileht@redhat.com>
2016-02-17 15:16:56 +01:00