Known limitations
This page collects the behaviours of the current version that differ from what one may expect. Each was reproduced on small test sources. When a workaround exists it is given.
Declarations
- Derived types
type :: name,type, public :: nameandtype, extends(...) :: nameare listed without description and without component descriptions. Usetype name. In a module made private by aprivatestatement, thepublic :: namestatement of a type must follow the definition. Type-bound procedures are not documented.- Kinds are not shown
real(8),real(kind=dp)andreal(c_double)are all displayed asreal(characterlengths are kept).- Optional flag of dimension arguments
An argument used only to dimension an optional array may be reported as optional (see Examples).
- Preprocessing
#ifdefand#ifare not evaluated. The code of every branch is read: the modules used in several branches are all listed (this is whympiandsf_mpiboth appear fored_read_input).- Order
Module variables are listed alphabetically (and the variables of derived types in declaration order); routines follow the order of the source in the module.
- Case
All names are lower-cased by the parser. Use lower-case names in the directives (
f:automodule:: sf_arrays) and roles.
Directives and options
:include-private:does nothingUse
:forceadd-members:(names of private members to document) or:members:.:undoc-members:excludesIt is the list of members to hide, the reverse of the Python autodoc option of the same name. Undocumented members are always displayed. It overrides
:members:.:hide-output:needs a valueWrite
:hide-output: 1. A bare option is ignored.:subsection_type:acceptsrubricandtitleonlyThe value
sectionis treated asrubric.:indent:Only
tabandspace. Set the width once withfortran_indent.f:autointerfaceCurrently returns the argument list only, not the full description. Use
f:autoroutinewith the name of the interface: it produces thef:interfaceblock with the arguments merged from the specific procedures.f:autosrcfileand capital lettersThe name is lower-cased before it is compared with the base name of the file: files with capitals in their name (
SF_ARRAYS.f90) are never found. Usef:automodule.f:autosrcfile :objtype:Takes a single value.
- Object directives take no options
f:autoroutine,f:autotype,f:autovariable,f:autoprogramand the other object directives do not accept:noindex:or any other option.- Unknown object names
The warning
Wrong routine name: ...is followed by a PythonKeyErrorthat stops the directive. Check the name (and its case).- Configuration values that are not read
fortran_encodingandfortran_subsection_typeare declared but currently ignored.
Domain
- Signatures with
result(...)or a leading type are not parsed .. f:function:: f(x) result(y)and.. f:function:: real function f(x)are displayed as raw text; the object has no index entry and cannot be referenced. Writef(x)and describe the result in a:rfield.:rneeds a name:returns: textwithout a name raises anIndexError. Write:r real y: text.- Types and attributes containing spaces
In a
:pfield,real, dimension(:,:) Aandx [intent(in), optional]are mis-analysed. Use:type A: ...or attributes without inner parentheses or spaces.f:currentmoduleThe argument is ignored and the current module is always reset to nothing. After an
f:auto*object directive, the objects that follow are therefore not linked to a module.f:modulehas no contentText has to follow, not be indented under the directive.
- Ambiguous names
A message
more than one target foundis printed and the first match is used. Usemodule/nameorpreferred-crossrefs.- Incremental builds
Fortran files are not dependencies of the pages that document them; use
sphinx-build -Eor touch the.rstfile after editing a source.- Unresolved names in comments
A role in a Fortran comment that points to something not documented in the project (for example
:f:func:`parse_input_variable`inED_INPUT_VARS, which belongs to SciFortran) is simply displayed as text, without a link. It only warns whennitpicky = True.
Comments
!>/!!are not markersThe description is read from the lines after the opening statement. Doxygen-style markers are copied verbatim (
!> textgives> text). See Formatting Fortran (.f90) Code for Auto-Documentation.useorimplicit nonebefore the description hides itThe comment must be the first thing after the signature.
$1,$2positional descriptions do not workThe parser has support for lines such as
$2: descriptionin the header comment of a routine, but the pattern does not match a line beginning with$. Use the name of the argument.x is scaled in placesets the description ofxand stays in the text. Start sentences with another word.The continuation lines of a variable are joined without any separator (add a trailing space), a bare
!ends the description, and a variable cannot hold a literal block or several paragraphs. Only the first:Label var:`value`line of a variable is kept.:Default:A variable with an initialiser and a
:Default var:`...`line in its comment shows two:Default:fields. Keep one.