diff --git a/doc/sphinx/.gitignore b/doc/sphinx/.gitignore index f935021a8f8a7bd22f9d6703cafa5134bb6a57f8..7705395c26abd9044835278630dc14086fe4aee3 100644 --- a/doc/sphinx/.gitignore +++ b/doc/sphinx/.gitignore @@ -1 +1,2 @@ !.gitignore +*.pyc diff --git a/doc/sphinx/_templates/base b/doc/sphinx/_templates/base index ffe2d44b79dd8ca96c78dcf65fc41abbb5741d89..2a596e512ca340bf948279673d83e63de161de4a 100644 --- a/doc/sphinx/_templates/base +++ b/doc/sphinx/_templates/base @@ -1,3 +1,4 @@ + {% import "menu" as menu %} {% include "custom_sphinx" with context %} @@ -7,7 +8,7 @@ <head> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> - <title>{{ title }}</title> + <title>{{ title | cleantitle }}</title> <link rel="shortcut icon" href="/theme/favicon.ico" /> <link rel="stylesheet" href="/theme/design.css" /> <link rel="stylesheet" href="/theme/pygmentize.css" /> diff --git a/doc/sphinx/conf.py b/doc/sphinx/conf.py index 9fd55ad303c839eff3175c622e5e81daaf597387..a7cf79d0601437496f34229d2afaa3a32372d31a 100644 --- a/doc/sphinx/conf.py +++ b/doc/sphinx/conf.py @@ -18,7 +18,7 @@ import os # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. -#sys.path.insert(0, os.path.abspath('.')) +sys.path.insert(0, os.path.abspath('.')) # -- General configuration ------------------------------------------------ @@ -28,10 +28,12 @@ import os # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. + extensions = [ 'sphinx.ext.todo', 'sphinx.ext.mathjax', 'sphinx.ext.ifconfig', + 'ext.filters' ] # Add any paths that contain templates here, relative to this directory. diff --git a/doc/sphinx/ext/__init__.py b/doc/sphinx/ext/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/doc/sphinx/ext/filters.py b/doc/sphinx/ext/filters.py new file mode 100644 index 0000000000000000000000000000000000000000..97c0c73b21ecb5170aeb8c91e0d6e89852b18e81 --- /dev/null +++ b/doc/sphinx/ext/filters.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- +""" + .ext.filters + ~~~~~~~~~~~~ +""" + +import xml.etree.ElementTree as ET + +def add_jinja_filters(app): + app.builder.templates.environment.filters['cleantitle'] = (lambda x: ''.join(ET.fromstring('<p>'+x+'</p>').itertext())) + +def setup(app): + ''' + Adds extra jinja filters. + ''' + app.connect("builder-inited", add_jinja_filters) + return {'version': '0.0.1', 'parallel_read_safe': True} diff --git a/doc/sphinx/reference/box_session.rst b/doc/sphinx/reference/box_session.rst index 785b498ccbc407703cc39b28b30a943dc00c9960..e11522b0e480e19bbb295694da3e9f769559f6a0 100644 --- a/doc/sphinx/reference/box_session.rst +++ b/doc/sphinx/reference/box_session.rst @@ -2,7 +2,7 @@ .. highlight:: lua ------------------------------------------------------------------------------- - box.session + Package `box.session` ------------------------------------------------------------------------------- The ``box.session`` package allows querying the session state, writing to a diff --git a/doc/sphinx/reference/console.rst b/doc/sphinx/reference/console.rst index 884d6cba984cf9e0f89c58ff63d3a9868a110412..77b30efd4478df87b8cd9567008bafdb89b7b845 100644 --- a/doc/sphinx/reference/console.rst +++ b/doc/sphinx/reference/console.rst @@ -2,7 +2,7 @@ .. highlight:: lua ------------------------------------------------------------------------------- - console + Package `console` ------------------------------------------------------------------------------- The console package allows one Tarantool server to access another Tarantool diff --git a/doc/sphinx/reference/digest.rst b/doc/sphinx/reference/digest.rst index 785cf73624d6db4b9c0c4c003e3f5e6b5b528461..19a1907b06364cbe1372537243f88bd8476768ed 100644 --- a/doc/sphinx/reference/digest.rst +++ b/doc/sphinx/reference/digest.rst @@ -2,7 +2,7 @@ .. highlight:: lua ------------------------------------------------------------------------------- - Digest + Package `digest` ------------------------------------------------------------------------------- A "digest" is a value which is returned by a `Cryptographic hash function`_ applied diff --git a/doc/sphinx/reference/expirationd.rst b/doc/sphinx/reference/expirationd.rst index 805327c789e625dc37cc987fe9cb3daaff4b536f..141a55f08b963656d150bcd715bac363fcec6147 100644 --- a/doc/sphinx/reference/expirationd.rst +++ b/doc/sphinx/reference/expirationd.rst @@ -2,7 +2,7 @@ .. highlight:: lua ------------------------------------------------------------------------------- - expirationd + Package `expirationd` ------------------------------------------------------------------------------- For a commercial-grade example of a Lua rock that works with Tarantool, let us diff --git a/doc/sphinx/reference/fiber-ipc.rst b/doc/sphinx/reference/fiber-ipc.rst index 1ddcb1c53d1d648208686c3f4feee66674e73e5e..56b232e6f6bdbf1ef476ecf852c919a6f8ea941e 100644 --- a/doc/sphinx/reference/fiber-ipc.rst +++ b/doc/sphinx/reference/fiber-ipc.rst @@ -2,16 +2,16 @@ .. highlight:: lua ------------------------------------------------------------------------------- - Fiber-IPC + Package `fiber-ipc` ------------------------------------------------------------------------------- -The ``fiber-IPC`` package allows sending and receiving messages between +The ``fiber-ipc`` package allows sending and receiving messages between different processes. The words "different processes" in this context mean different connections, different sessions, or different fibers. Call ``fiber.channel()`` to allocate space and get a channel object, which will be called channel for examples in this section. Call the -other ``fiber-IPC`` routines, via channel, to send messages, receive +other ``fiber-ipc`` routines, via channel, to send messages, receive messages, or check ipc status. Message exchange is synchronous. The channel is garbage collected when no one is using it, as with any other Lua object. Use object-oriented syntax, for example @@ -32,7 +32,7 @@ other Lua object. Use object-oriented syntax, for example .. class:: channel - .. method:: :put(message[, timeout]) + .. method:: put(message[, timeout]) Send a message using a channel. If the channel is full, ``channel:put()`` blocks until there is a free slot in the channel. @@ -44,13 +44,13 @@ other Lua object. Use object-oriented syntax, for example Otherwise it returns true. :rtype: boolean - .. method:: :close() + .. method:: close() Close the channel. All waiters in the channel will be woken up. All following ``channel:put()`` or ``channel:get()`` operations will return an error (``nil``). - .. method:: :get([timeout]) + .. method:: get([timeout]) Fetch a message from a channel. If the channel is empty, ``channel:get()`` blocks until there is a message. @@ -60,7 +60,7 @@ other Lua object. Use object-oriented syntax, for example ``channel:put()`` or ``channel:broadcast()``. :rtype: lua_object - .. method:: :broadcast(message) + .. method:: broadcast(message) If the channel is empty, ``channel:broadcast()`` is equivalent to ``channel:put()``. Otherwise, ``channel:broadcast()`` sends the @@ -68,28 +68,28 @@ other Lua object. Use object-oriented syntax, for example :param message: - .. method:: :is_empty() + .. method:: is_empty() Check whether the specified channel is empty (has no messages). :return: true if the specified channel is empty :rtype: boolean - .. method:: :count() + .. method:: count() Find out how many messages are on the channel. The answer is 0 if the channel is empty. :return: the number of messages. :rtype: number - .. method:: :is_full() + .. method:: is_full() Check whether the specified channel is full. :return: true if the specified channel is full (has no room for a new message). :rtype: boolean - .. method:: :has_readers() + .. method:: has_readers() Check whether the specified channel is empty and has readers waiting for a message (because they have issued ``channel:get()`` and then blocked). @@ -97,7 +97,7 @@ other Lua object. Use object-oriented syntax, for example :return: true if blocked users are waiting. Otherwise false. :rtype: boolean - .. method:: :has_writers() + .. method:: has_writers() Check whether the specified channel is full and has writers waiting (because they have issued ``channel:put()`` and then blocked due to lack of room). @@ -105,7 +105,7 @@ other Lua object. Use object-oriented syntax, for example :return: true if blocked users are waiting. Otherwise false. :rtype: boolean - .. method:: :is_closed() + .. method:: is_closed() :return: true if the specified channel is already closed. Otherwise false. :rtype: boolean diff --git a/doc/sphinx/reference/fiber.rst b/doc/sphinx/reference/fiber.rst index eb77ade389ce5706d7560d53f4ed43670840a184..1b7a105a463d60c9943a1bc7fd7903b61e36332f 100644 --- a/doc/sphinx/reference/fiber.rst +++ b/doc/sphinx/reference/fiber.rst @@ -2,7 +2,7 @@ .. highlight:: lua ------------------------------------------------------------------------------- - Fiber + Package `fiber` ------------------------------------------------------------------------------- The ``fiber`` package allows for creating, running and managing *fibers*. @@ -104,21 +104,21 @@ can be reused when another fiber is created. .. class:: fiber_object - .. method:: :id() + .. method:: id() :param self: fiber object, for example the fiber object returned by ``fiber.create`` :return: id of the fiber. :rtype: number - .. method:: :name() + .. method:: name() :param self: fiber object, for example the fiber object returned by ``fiber.create`` :return: name of the fiber. :rtype: number - .. method:: :name(name) + .. method:: name(name) Change the fiber name. By default the Tarantool server's interactive-mode fiber is named 'interactive' and new @@ -131,7 +131,7 @@ can be reused when another fiber is created. :param string name: the new name of the fiber. :return: nil - .. method:: :status() + .. method:: status() Return the status of the specified fiber. @@ -141,7 +141,7 @@ can be reused when another fiber is created. “suspendedâ€, or “runningâ€. :rtype: string - .. method:: :cancel() + .. method:: cancel() Cancel a fiber. Running and suspended fibers can be canceled. After a fiber has been canceled, attempts to operate on it will diff --git a/doc/sphinx/reference/fio.rst b/doc/sphinx/reference/fio.rst index 7e3e8ec8b50af4355d2b65f74c73776b6852347d..79b740565e9306a395a428f4cb68e32e720d3dc0 100644 --- a/doc/sphinx/reference/fio.rst +++ b/doc/sphinx/reference/fio.rst @@ -2,7 +2,7 @@ .. highlight:: lua ------------------------------------------------------------------------------- - fio + Package `fio` ------------------------------------------------------------------------------- Tarantool supports file input/output with an API that is similar to POSIX @@ -284,7 +284,7 @@ access the same file simultaneously. .. class:: file-handle - .. method:: :close() + .. method:: close() Close a file that was opened with ``fio.open``. For details type "man 2 close". @@ -299,8 +299,8 @@ access the same file simultaneously. - true ... - .. method:: :pread(count, offset) - :pwrite(new-string, offset) + .. method:: pread(count, offset) + pwrite(new-string, offset) Perform read/write random-access operation on a file, without affecting the current seek position of the file. @@ -322,8 +322,8 @@ access the same file simultaneously. insert in ... - .. method:: :read(count) - :write(new-string) + .. method:: read(count) + write(new-string) Perform non-random-access read or write on a file. For details type "man 2 read" or "man 2 write". @@ -348,7 +348,7 @@ access the same file simultaneously. - true ... - .. method:: :truncate(new-size) + .. method:: truncate(new-size) Change the size of an open file. Differs from ``fio.truncate``, which changes the size of a closed file. @@ -364,7 +364,7 @@ access the same file simultaneously. - true ... - .. method:: :seek(position [, offset-from]) + .. method:: seek(position [, offset-from]) Shift position in the file to the specified position. For details type "man 2 seek". @@ -385,7 +385,7 @@ access the same file simultaneously. ... - .. method:: :stat() + .. method:: stat() Return statistics about an open file. This differs from ``fio.stat`` which return statistics about a closed file. For details type "man 2 stat". @@ -413,8 +413,8 @@ access the same file simultaneously. blocks: 8 ... - .. method:: :fsync() - :fdatasync() + .. method:: fsync() + fdatasync() Ensure that file changes are written to disk, for an open file. Compare ``fio.sync``, which is for all files. For details type diff --git a/doc/sphinx/reference/json.rst b/doc/sphinx/reference/json.rst index 8c203e63ad996f214df5702eaedf055d8dd17c7e..075909e90ba06d9f6616d44c4b56bb2b6b2c4ece 100644 --- a/doc/sphinx/reference/json.rst +++ b/doc/sphinx/reference/json.rst @@ -2,7 +2,7 @@ .. highlight:: lua ------------------------------------------------------------------------------- - JSON + Package `json` ------------------------------------------------------------------------------- The json package provides JSON manipulation routines. It is based on the diff --git a/doc/sphinx/reference/log.rst b/doc/sphinx/reference/log.rst index efc6b0d9875a7a55da8737a032d5048735516314..e8a10e3339f3d12f1f9925f053e94b3a04ff177e 100644 --- a/doc/sphinx/reference/log.rst +++ b/doc/sphinx/reference/log.rst @@ -2,7 +2,7 @@ .. highlight:: lua ------------------------------------------------------------------------------- - log + Package `log` ------------------------------------------------------------------------------- .. module:: log diff --git a/doc/sphinx/reference/msgpack.rst b/doc/sphinx/reference/msgpack.rst index d74537bb9b25fd77f25a2aa471b9015b4c711c77..73d0bc5577ecab37fb3876754fa4ddbe23dfc0ba 100644 --- a/doc/sphinx/reference/msgpack.rst +++ b/doc/sphinx/reference/msgpack.rst @@ -2,7 +2,7 @@ .. highlight:: lua ------------------------------------------------------------------------------- - MsgPack + Package `msgpack` ------------------------------------------------------------------------------- The ``msgpack`` package takes strings in MsgPack_ format and decodes them, or takes a diff --git a/doc/sphinx/reference/other.rst b/doc/sphinx/reference/other.rst index 602122f184d73fb06b63351fca82d3d8e2720b31..297d672cd0008fb70a0fa5667a51b576d218e458 100644 --- a/doc/sphinx/reference/other.rst +++ b/doc/sphinx/reference/other.rst @@ -2,7 +2,7 @@ .. highlight:: lua ------------------------------------------------------------------------------- - other functions + Miscellaneous ------------------------------------------------------------------------------- .. function:: tonumber64(value) diff --git a/doc/sphinx/reference/pickle.rst b/doc/sphinx/reference/pickle.rst index 466ab28fe35da8412207fe26ed7f0a80d29e9353..a74f83ca0aa3d68b412a9ba996bfda1481e8095e 100644 --- a/doc/sphinx/reference/pickle.rst +++ b/doc/sphinx/reference/pickle.rst @@ -2,7 +2,7 @@ .. highlight:: lua ------------------------------------------------------------------------------- - pickle + Package `pickle` ------------------------------------------------------------------------------- .. module:: pickle diff --git a/doc/sphinx/reference/socket.rst b/doc/sphinx/reference/socket.rst index 318ff64db21b14bfb5be84f49ba9c02e67872a0e..67f3c076dc6b126cec95ca0989d3ba4ef9b79e67 100644 --- a/doc/sphinx/reference/socket.rst +++ b/doc/sphinx/reference/socket.rst @@ -2,7 +2,7 @@ .. highlight:: lua ------------------------------------------------------------------------------- - socket + Package `socket` ------------------------------------------------------------------------------- The ``socket`` package allows exchanging data via BSD sockets with a local or @@ -91,7 +91,7 @@ the function invocations will look like ``sock:function_name(...)``. .. function:: __call(domain, type, protocol) Create a new TCP or UDP socket. The argument values - are the same as in the `Linux man page`_. + are the same as in the `Linux man page <http://man7.org/linux/man-pages/man2/socket.2.html>`_. :param domain: :param type: @@ -152,10 +152,11 @@ the function invocations will look like ``sock:function_name(...)``. .. class:: socket_object - .. method:: :sysconnect(host, port) + .. method:: sysconnect(host, port) Connect a socket to a remote host. The argument values are the same as - in the Linux man page. The host must be an IP address. + in the `Linux man page <http://man7.org/linux/man-pages/man2/connect.2.html>`_. + The host must be an IP address. Parameters: * Either: @@ -179,7 +180,7 @@ the function invocations will look like ``sock:function_name(...)``. sock:sysconnect('127.0.0.1', 80) - .. method:: :send(data) + .. method:: send(data) Send data over a connected socket. @@ -192,12 +193,12 @@ the function invocations will look like ``sock:function_name(...)``. The function ``sock:write(...)`` has the same parameters and same effect. - .. method:: :syswrite(size) + .. method:: syswrite(size) Write as much as possible data to the socket buffer if non-blocking. Rarely used. For details see `this description`_. - .. method:: :recv(size) + .. method:: recv(size) Read ``size`` bytes from a connected socket. An internal read-ahead buffer is used to reduce the cost of this call. @@ -210,11 +211,11 @@ the function invocations will look like ``sock:function_name(...)``. end, returns the remainder read from the socket (possibly an empty string), followed by "eof" status. - .. method:: :read(limit [, timeout]) - :read(delimiter [, timeout]) - :read({limit=limit} [, timeout]) - :read({delimiter=delimiter} [,timeout]) - :read({limit=limit, delimiter=delimiter} [, timeout]) + .. method:: read(limit [, timeout]) + read(delimiter [, timeout]) + read({limit=limit} [, timeout]) + read({delimiter=delimiter} [,timeout]) + read({limit=limit, delimiter=delimiter} [, timeout]) Read from a connected socket until some condition is true, and return the bytes that were read. @@ -234,12 +235,12 @@ the function invocations will look like ``sock:function_name(...)``. expression. :rtype: string - .. method:: :sysread(size) + .. method:: sysread(size) Return all available data from the socket buffer if non-blocking. Rarely used. For details see `this description`_. - .. method:: :bind(host [, port]) + .. method:: bind(host [, port]) Bind a socket to the given host/port. A UDP socket after binding can be used to receive data (see :meth:`socket_object.recvfrom()`). @@ -254,7 +255,7 @@ the function invocations will look like ``sock:function_name(...)``. :exception: nil, status, errno, errstr on error. - .. method:: :listen(backlog) + .. method:: listen(backlog) Start listening for incoming connections. @@ -265,7 +266,7 @@ the function invocations will look like ``sock:function_name(...)``. :return: true for success, false for error. :rtype: boolean - .. method:: :accept() + .. method:: accept() Accept a new client connection and create a new connected socket. It is good practice to set the socket's blocking mode explicitly @@ -275,7 +276,7 @@ the function invocations will look like ``sock:function_name(...)``. :rtype: userdata :exception: nil - .. method:: :sendto(host, port, data) + .. method:: sendto(host, port, data) Send a message on a UDP socket to a specified host. @@ -287,7 +288,7 @@ the function invocations will look like ``sock:function_name(...)``. :rtype: number :exception: status, errno, errstr. - .. method:: :recvfrom(limit) + .. method:: recvfrom(limit) Receive a message on a UDP socket. @@ -308,7 +309,7 @@ the function invocations will look like ``sock:function_name(...)``. ``message_sender.family = 'AF_INET'``, ``message_sender.port = 43065``. - .. method:: :shutdown(how) + .. method:: shutdown(how) Shutdown a reading end, a writing end, or both ends of a socket. @@ -317,7 +318,7 @@ the function invocations will look like ``sock:function_name(...)``. :return: true or false. :rtype: boolean - .. method:: :close() + .. method:: close() Close (destroy) a socket. A closed socket should not be used any more. A socket is closed automatically when its userdata is garbage collected by Lua. @@ -326,8 +327,8 @@ the function invocations will look like ``sock:function_name(...)``. sock is already closed, sock:close() returns false. :rtype: boolean - .. method:: :error() - :errno() + .. method:: error() + errno() Retrieve information about the last error that occurred on a socket, if any. Errors do not cause throwing of exceptions so these functions are usually necessary. @@ -336,9 +337,10 @@ the function invocations will look like ``sock:function_name(...)``. If there is no error, then ``sock:errno()`` will return 0 and ``sock:error()``. :rtype: number, string - .. method:: :setsockopt(level, name, value) + .. method:: setsockopt(level, name, value) - Set socket flags. The argument values are the same as in the `Linux man page`_. + Set socket flags. The argument values are the same as in the + `Linux man page <http://man7.org/linux/man-pages/man2/setsockopt.2.html>`_. The ones that Tarantool accepts are: * SO_ACCEPTCONN @@ -370,19 +372,20 @@ the function invocations will look like ``sock:function_name(...)``. Setting SO_LINGER is done with ``sock:linger(active)``. - .. method:: :getsockopt(level, name) + .. method:: getsockopt(level, name) Get socket flags. For a list of possible flags see ``sock:setsockopt()``. - .. method:: :linger([active]) + .. method:: linger([active]) - Set or clear the SO_LINGER flag. For a description of the flag, see `Linux man page`_. + Set or clear the SO_LINGER flag. For a description of the flag, see + `Linux man page <http://man7.org/linux/man-pages/man1/loginctl.1.html>`_. :param boolean active: :return: new active and timeout values. - .. method:: :nonblock([flag]) + .. method:: nonblock([flag]) ``sock:nonblock()`` returns the current flag value. |br| ``sock:nonblock(false)`` sets the flag to false and returns false. |br| @@ -390,15 +393,15 @@ the function invocations will look like ``sock:function_name(...)``. This function may be useful before invoking a function which might otherwise block indefinitely. - .. method:: :readable([timeout]) - :writeable([timeout]) - :wait([timout]) + .. method:: readable([timeout]) + writeable([timeout]) + wait([timout]) ``sock:readable()`` waits until something is readable, or until a timeout value expires. |br| ``sock:writable()`` waits until something is writable, or until a timeout value expires. |br| ``sock:wait()`` waits until something is either readable or writable, or until a timeout value expires. - .. method:: :name() + .. method:: name() The ``The sock:name()`` function is used to get information about the near side of the connection. If a socket was bound to ``xyz.com:45``, @@ -408,7 +411,7 @@ the function invocations will look like ``sock:function_name(...)``. :return: A table containing these fields: "host", "family", "type", "protocol", "port". :rtype: table - .. method:: :peer() + .. method:: peer() The ``sock:peer()`` function is used to get information about the far side of a connection. If a TCP connection has been made to a distant host ``tarantool.org:80``, ``sock:peer()`` @@ -420,8 +423,6 @@ the function invocations will look like ``sock:function_name(...)``. .. _Lua pattern: http://www.lua.org/pil/20.2.html .. _this description: https://github.com/tarantool/tarantool/wiki/sockets%201.6 -.. _linux man page: - ================================================= Example diff --git a/doc/sphinx/reference/tap.rst b/doc/sphinx/reference/tap.rst index ba308338145c3e07e334764d1ff419fed0fcdbcd..04ff65c71a61495c9f98a50a4a962b7a20bff0b3 100644 --- a/doc/sphinx/reference/tap.rst +++ b/doc/sphinx/reference/tap.rst @@ -2,7 +2,7 @@ .. highlight:: lua ------------------------------------------------------------------------------- - tap + Package `tap` ------------------------------------------------------------------------------- The tap package streamlines the testing of other packages. It allows writing of @@ -30,14 +30,14 @@ one can run tests and then use the results for statistics, decision-making, and .. class:: taptest - .. method:: :plan(count) + .. method:: plan(count) Indicate how many tests will be performed. :param number count: :return: nil - .. method:: :check() + .. method:: check() Checks the number of tests performed. This check should only be done after all planned tests are complete, so ordinarily ``taptest:check()`` @@ -48,14 +48,14 @@ one can run tests and then use the results for statistics, decision-making, and :return: nil - .. method:: :diag(message) + .. method:: diag(message) Display a diagnostic message. :param string message: the message to be displayed. :return: nil - .. method:: :ok(condition, test-name) + .. method:: ok(condition, test-name) This is a basic function which is used by other functions. Depending on the value of ``condition``, print 'ok' or 'not ok' along with @@ -87,7 +87,7 @@ one can run tests and then use the results for statistics, decision-making, and - true ... - .. method:: :fail(test-name) + .. method:: fail(test-name) ``taptest:fail('x')`` is equivalent to ``taptest:ok(false, 'x')``. Displays the message. @@ -97,7 +97,7 @@ one can run tests and then use the results for statistics, decision-making, and :return: true or false. :rtype: boolean - .. method:: :skip(message) + .. method:: skip(message) ``taptest:skip('x')`` is equivalent to ``taptest:ok(true, 'x' .. '# skip')``. @@ -115,7 +115,7 @@ one can run tests and then use the results for statistics, decision-making, and - true ... - .. method:: :is(got, expected, test-name) + .. method:: is(got, expected, test-name) Check whether the first argument equals the second argument. Displays extensive message if the result is false. @@ -126,7 +126,7 @@ one can run tests and then use the results for statistics, decision-making, and :return: true or false. :rtype: boolean - .. method:: :isnt(got, expected, test-name) + .. method:: isnt(got, expected, test-name) This is the negation of ``taptest:is(...)``. @@ -137,13 +137,13 @@ one can run tests and then use the results for statistics, decision-making, and :return: true of false. :rtype: boolean - .. method:: :isnil(value, test-name) - :isstring(value, test-name) - :isnumber(value, test-name) - :istable(value, test-name) - :isboolean(value, test-name) - :isudata(value, test-name) - :iscdata(value, test-name) + .. method:: isnil(value, test-name) + isstring(value, test-name) + isnumber(value, test-name) + istable(value, test-name) + isboolean(value, test-name) + isudata(value, test-name) + iscdata(value, test-name) Test whether a value has a particular type. Displays a long message if the value is not of the specified type. @@ -154,7 +154,7 @@ one can run tests and then use the results for statistics, decision-making, and :return: true of false. :rtype: boolean - .. method:: :is_deeply(got, expected, test-name) + .. method:: is_deeply(got, expected, test-name) Recursive version of ``tap-test:is(...)``, which can be be used to compare tables as well as scalar values. diff --git a/doc/sphinx/reference/uuid.rst b/doc/sphinx/reference/uuid.rst index 673b9eafe54c1ea5beeb703764e1b91eec1a9029..c40bb52d9e1a89d8e64ba2265595f48ad3b1e1d0 100644 --- a/doc/sphinx/reference/uuid.rst +++ b/doc/sphinx/reference/uuid.rst @@ -2,7 +2,7 @@ .. highlight:: lua ------------------------------------------------------------------------------- - UUID + Package `uuid` ------------------------------------------------------------------------------- A "UUID" is a `Universally unique identifier`_. If an application requires that @@ -50,7 +50,7 @@ The function that can determine whether a UUID is an all-zero value is: ``:isnil .. class:: uuid_cdata - .. method:: :bin([byte-order]) + .. method:: bin([byte-order]) :param byte-order: |br| 'l' - little-endian, |br| 'b' - big-endian, @@ -60,12 +60,12 @@ The function that can determine whether a UUID is an all-zero value is: ``:isnil :return: UUID converted from cdata input value. :rtype: 16-byte binary string - .. method:: :str() + .. method:: str() :return: UUID converted from cdata input value. :rtype: 36-byte hexadecimal string - .. method:: :isnil() + .. method:: isnil() The all-zero UUID value can be expressed as uuid.NULL, or as ``uuid.fromstr('00000000-0000-0000-0000-000000000000')``. diff --git a/doc/sphinx/reference/yaml.rst b/doc/sphinx/reference/yaml.rst index 056b0e8ad084494b9ccca7527b9aca96b3d0b19d..a4e2d269ed27709d4c14c0e8767b561ccc0e883b 100644 --- a/doc/sphinx/reference/yaml.rst +++ b/doc/sphinx/reference/yaml.rst @@ -2,7 +2,7 @@ .. highlight:: lua ------------------------------------------------------------------------------- - YAML + Package `yaml` ------------------------------------------------------------------------------- The ``yaml`` package takes strings in YAML_ format and decodes them, or takes a