dev-python/os-api-ref: initial import

Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
This commit is contained in:
Alessandro Barbieri
2021-07-11 02:38:20 +02:00
parent 57d37bc93f
commit 6fe56ee56c
3 changed files with 56 additions and 0 deletions

View File

@@ -0,0 +1 @@
DIST os-api-ref-2.2.0.tar.gz 93273 BLAKE2B 9da508d51993f5b71474d39e818bfdc897023a6104e708c6c30b807bb20891f05685aa241605d1cf30540b75108e7914c932ba7aa6fa1619961c11ab2c7ee6d8 SHA512 3d25b3cd702c611577c86c206a60f92d929191f9e75c210e04c639c2a597ea58d31c81c17b79e41276c3e5b391e2c7bb95a9d7483b0f248e230d03550da3af96

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>lssndrbarbieri@gmail.com</email>
<name>Alessandro Barbieri</name>
</maintainer>
<longdescription lang="en">
This project is a collection of sphinx stanzas that assist in building an API Reference site for an OpenStack project in RST. RST is great for unstructured English, but displaying semi structured (and repetitive) data in tables is not its strength. This provides tooling to insert semi-structured data describing request and response parameters and status or error messages, and turn those into nice tables.
The project also includes a set of styling (and javascript) that is expected to layer on top of a Sphinx theme base. This addition provides a nice set of collapsing sections for REST methods and javascript controls to expand / collapse all sections.
Features
Sphinx stanza rest_method describing the method and resource for a REST API call. Lets authors write simply and also gives readers a clean way to scan all methods then click a button to get more information about a method.
Sphinx stanza rest_parameters used to insert semi-structured data into the RST files describing the parameters users cansend with the request. The stanza points to a structured YAML file, parameters.yaml.
Sphinx stanza rest_status_code used to insert pointers to error or status codes returned by the service. Points to a structured YAML file, http_codes.yaml.
</longdescription>
</pkgmetadata>

View File

@@ -0,0 +1,39 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="8"
PYTHON_COMPAT=( python3_{8..9} )
inherit distutils-r1
DESCRIPTION="Sphinx Extensions to support API reference sites in OpenStack"
HOMEPAGE="https://docs.openstack.org/os-api-ref/latest"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64"
RDEPEND="
>=dev-python/openstackdocstheme-2.2.1[${PYTHON_USEDEP}]
>=dev-python/pyyaml-3.1.2[${PYTHON_USEDEP}]
>=dev-python/six-1.10.0[${PYTHON_USEDEP}]
dev-python/sphinx[${PYTHON_USEDEP}]
"
BDEPEND="
${RDEPEND}
test? (
>=dev-python/beautifulsoup-4.6.0[${PYTHON_USEDEP}]
>=dev-python/sphinx-testing-1.0.1[${PYTHON_USEDEP}]
>=dev-python/subunit-1.0.0[${PYTHON_USEDEP}]
>=dev-python/testtools-2.2.0[${PYTHON_USEDEP}]
)
"
distutils_enable_tests pytest
distutils_enable_sphinx doc/source ">=dev-python/openstackdocstheme-2.2.1"
python_test() {
pytest -vv --deselect os_api_ref/tests/test_microversions.py::TestMicroversions::test_parameters_table || die
}