I am using doxygen in my c++ project for generating documentation. My project contains both class functions and procedural calls like,
//AAA.h
namespace NAME
{
Class EXPORT AAA
{
/*!
* \brief Sample function.
*
* \param a is an integer value.
*
* This is a sample function.
*/
void SampleFunction(int a);
}
}'
after building this this code the doxygen is working fine and getting a detailed documentation.
But when i tried this with a procedural call like,
//BBB.h
namespace NAME2
{
/*!
* \brief This is a function
*
* \param b is a float
*
* This is a function
*/
void function(float b);
}
After building the code the document creates but missing the html file for its description, ie,
the doxygen creates with function name with brief statement.But when i click the function name it shows that html file is missing for the function description. And following is the doxyfile for the doxygen in my project. For generating the entire docs which field is to be changed in the doxyfile?
# Doxyfile 1.5.5
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = "SAMPLE"
PROJECT_NUMBER = 0.0
OUTPUT_DIRECTORY = internal_docs/
CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ABBREVIATE_BRIEF = "The $name class" \
"The $name widget" \
"The $name file" \
is \
provides \
specifies \
contains \
represents \
a \
an \
the
ALWAYS_DETAILED_SEC = NO
INLINE_INHERITED_MEMB = NO
FULL_PATH_NAMES = NO
STRIP_FROM_PATH = ../src/
STRIP_FROM_INC_PATH =
SHORT_NAMES = YES
JAVADOC_AUTOBRIEF = NO
QT_AUTOBRIEF = NO
MULTILINE_CPP_IS_BRIEF = NO
INHERIT_DOCS = YES
SEPARATE_MEMBER_PAGES = NO
TAB_SIZE = 8
ALIASES =
OPTIMIZE_OUTPUT_FOR_C = NO
OPTIMIZE_OUTPUT_JAVA = NO
OPTIMIZE_FOR_FORTRAN = NO
OPTIMIZE_OUTPUT_VHDL = NO
BUILTIN_STL_SUPPORT = NO
CPP_CLI_SUPPORT = NO
SIP_SUPPORT = NO
DISTRIBUTE_GROUP_DOC = NO
SUBGROUPING = YES
TYPEDEF_HIDES_STRUCT = NO
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
EXTRACT_ALL = NO
EXTRACT_PRIVATE = YES
EXTRACT_STATIC = YES
EXTRACT_LOCAL_CLASSES = YES
EXTRACT_LOCAL_METHODS = YES
EXTRACT_ANON_NSPACES = NO
HIDE_UNDOC_MEMBERS = NO
HIDE_UNDOC_CLASSES = NO
HIDE_FRIEND_COMPOUNDS = NO
HIDE_IN_BODY_DOCS = NO
INTERNAL_DOCS = NO
CASE_SENSE_NAMES = YES
HIDE_SCOPE_NAMES = NO
SHOW_INCLUDE_FILES = YES
INLINE_INFO = YES
SORT_MEMBER_DOCS = NO
# GG setting below to YES will cause things to be alphabetic
SORT_BRIEF_DOCS = YES
SORT_GROUP_NAMES = NO
SORT_BY_SCOPE_NAME = NO
GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES
GENERATE_BUGLIST = YES
GENERATE_DEPRECATEDLIST= YES
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
SHOW_USED_FILES = YES
SHOW_DIRECTORIES = NO
FILE_VERSION_FILTER =
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
QUIET = YES
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_IF_DOC_ERROR = YES
WARN_NO_PARAMDOC = YES
WARN_FORMAT = "$file:$line: $text"
WARN_LOGFILE =
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
INPUT = ../internal_include/ ../include/
INPUT_ENCODING = UTF-8
FILE_PATTERNS = *.c \
*.cc \
*.cxx \
*.cpp \
*.c++ \
*.d \
*.java \
*.ii \
*.ixx \
*.ipp \
*.i++ \
*.inl \
*.h \
*.hh \
*.hxx \
*.hpp \
*.h++ \
*.idl \
*.odl \
*.cs \
*.php \
*.php3 \
*.inc \
*.m \
*.mm \
*.dox \
*.py \
*.f90 \
*.f \
*.vhd \
*.vhdl \
*.C \
*.CC \
*.C++ \
*.II \
*.I++ \
*.H \
*.HH \
*.H++ \
*.CS \
*.PHP \
*.PHP3 \
*.M \
*.MM \
*.PY \
*.F90 \
*.F \
*.VHD \
*.VHDL
RECURSIVE = YES
EXCLUDE =
EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS =
EXCLUDE_SYMBOLS =
EXAMPLE_PATH =
EXAMPLE_PATTERNS = *
EXAMPLE_RECURSIVE = NO
IMAGE_PATH =
INPUT_FILTER =
FILTER_PATTERNS =
FILTER_SOURCE_FILES = NO
#---------------------------------------------------------------------------
# configuration options related to source browsing
#---------------------------------------------------------------------------
# GG changed below to NO 7/16/2010
SOURCE_BROWSER = NO
INLINE_SOURCES = NO
STRIP_CODE_COMMENTS = YES
# GG changed below to NO 7/16/2010
REFERENCED_BY_RELATION = NO
# GG changed below to NO 7/16/2010
REFERENCES_RELATION = NO
# GG changed below to NO 7/16/2010
REFERENCES_LINK_SOURCE = NO
USE_HTAGS = NO
# GG changed below to NO 7/16/2010
VERBATIM_HEADERS = NO
#---------------------------------------------------------------------------
# configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
ALPHABETICAL_INDEX = NO
COLS_IN_ALPHA_INDEX = 5
IGNORE_PREFIX =
#---------------------------------------------------------------------------
# configuration options related to the HTML output
#---------------------------------------------------------------------------
GENERATE_HTML = YES
HTML_OUTPUT = html
HTML_FILE_EXTENSION = .html
HTML_HEADER =
HTML_FOOTER = external_docs/files/footer.html
HTML_STYLESHEET =
HTML_ALIGN_MEMBERS = YES
GENERATE_HTMLHELP = NO
GENERATE_DOCSET = NO
DOCSET_FEEDNAME = "Doxygen generated docs"
DOCSET_BUNDLE_ID = org.doxygen.Project
HTML_DYNAMIC_SECTIONS = NO
CHM_FILE =
HHC_LOCATION =
GENERATE_CHI = NO
BINARY_TOC = NO
TOC_EXPAND = NO
#GG line below changed
DISABLE_INDEX = YES
ENUM_VALUES_PER_LINE = 1
#GG line below changed
GENERATE_TREEVIEW = NO
TREEVIEW_WIDTH = 250
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
GENERATE_LATEX = NO
LATEX_OUTPUT = latex
LATEX_CMD_NAME = latex
MAKEINDEX_CMD_NAME = makeindex
COMPACT_LATEX = NO
PAPER_TYPE = a4wide
EXTRA_PACKAGES =
LATEX_HEADER =
PDF_HYPERLINKS = YES
USE_PDFLATEX = YES
LATEX_BATCHMODE = NO
LATEX_HIDE_INDICES = NO
#---------------------------------------------------------------------------
# configuration options related to the RTF output
#---------------------------------------------------------------------------
GENERATE_RTF = NO
RTF_OUTPUT = rtf
COMPACT_RTF = NO
RTF_HYPERLINKS = NO
RTF_STYLESHEET_FILE =
RTF_EXTENSIONS_FILE =
#---------------------------------------------------------------------------
# configuration options related to the man page output
#---------------------------------------------------------------------------
GENERATE_MAN = NO
MAN_OUTPUT = man
MAN_EXTENSION = .3
MAN_LINKS = NO
#---------------------------------------------------------------------------
# configuration options related to the XML output
#---------------------------------------------------------------------------
GENERATE_XML = NO
XML_OUTPUT = xml
XML_SCHEMA =
XML_DTD =
XML_PROGRAMLISTING = YES
#---------------------------------------------------------------------------
# configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
GENERATE_AUTOGEN_DEF = NO
#---------------------------------------------------------------------------
# configuration options related to the Perl module output
#---------------------------------------------------------------------------
GENERATE_PERLMOD = NO
PERLMOD_LATEX = NO
PERLMOD_PRETTY = YES
PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = YES
EXPAND_ONLY_PREDEF = YES
SEARCH_INCLUDES = YES
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
PREDEFINED = EXPORT =
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
# Configuration::additions related to external references
#---------------------------------------------------------------------------
TAGFILES =
GENERATE_TAGFILE =
ALLEXTERNALS = NO
EXTERNAL_GROUPS = YES
PERL_PATH = /usr/bin/perl
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
CLASS_DIAGRAMS = NO
MSCGEN_PATH =
HIDE_UNDOC_RELATIONS = YES
HAVE_DOT = NO
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
GROUP_GRAPHS = YES
UML_LOOK = NO
TEMPLATE_RELATIONS = NO
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES
CALL_GRAPH = YES
CALLER_GRAPH = NO
GRAPHICAL_HIERARCHY = YES
DIRECTORY_GRAPH = YES
DOT_IMAGE_FORMAT = png
DOT_PATH =
DOTFILE_DIRS =
DOT_GRAPH_MAX_NODES = 50
MAX_DOT_GRAPH_DEPTH = 1000
DOT_TRANSPARENT = YES
DOT_MULTI_TARGETS = NO
GENERATE_LEGEND = YES
DOT_CLEANUP = YES
#---------------------------------------------------------------------------
# Configuration::additions related to the search engine
#---------------------------------------------------------------------------
SEARCHENGINE = NO
From the doxygen FAQ:
When I set EXTRACT_ALL to NO none of my functions are shown in the documentation.
In order for global functions, variables, enums, typedefs, and defines to be documented you should document the file in which these commands are located using a comment block containing a \file (or #file) command.
For member functions or functions that are part of a namespace you should document either the class or namespace.
Can you check that you have included a \file command in the file BBB.h or try documenting the namespace NAME2?
If EXTRACT_ALL=YES does not work, try to format the doc as following:
// Format:
/**
*
*/
// ex:
//BBB.h
namespace NAME2
{
/**
* \brief This is a function
*
* \param b is a float
*
* This is a function
*/
void function(float b);
}
Related
I have a mature Fortran code which I would like to modernise and as part of this process incorporate doxygen comments throughout. The code contains header files which contain lists of variables (and previously common blocks) that could then be included in subroutines where access to these variables are required. Regardless of what I do, I can not get doxygen(1.8.13) to process these files. I have written a simpler example involving three files below to show what I mean:
MODULE.f
!> #brief An example of a module with global variables defined
!> #details The purpose is to explain why the global variables in group VARGROUP2 in the included file do not appear in the doxygen output.
!> #details Why? Please help! I can not see where I have made a mistake
MODULE EXAMPLE
INTEGER N
PARAMETRER(N=10)
!> #name VARGROUP1
!! Parameters in group 1
!> #{
DOUBLE PRECISION GR1_GLOBAL1 !< Example of a global variable
DOUBLE PRECISION GR1_GLOBAL2 !< Another example of a global variable
DOUBLE PRECISION GR1_VECTOR(N) !< An example of a global vector variable
!> #}
#include "VARIABLES.h"
!> #name VARGROUP3
!! Parameters in group 3
!> #{
DOUBLE PRECISION GR3_GLOBAL1 !< Example of a global variable
DOUBLE PRECISION GR3_GLOBAL2 !< Another example of a global variable
!> #}
CONTAINS
!> #brief An example of a subroutine within a module
!> #details A simple Hello World Program
SUBROUTINE EXSUB
INTEGER I !< Example of a local variable
I = 0
GR1_GLOBAL1 = 0
GR2_GLOBAL1 = 0
WRITE(*,*) 'HELLO WORLD'
WRITE(*,*) I,GR1_GLOBAL1,GR2_GLOBAL1
END SUBROUTINE EXSUB
END MODULE EXAMPLE
The included header file (VARIABLES.h):
!> #name VARGROUP2
!! Parameters in group 2
!> #{
DOUBLE PRECISION GR2_GLOBAL1 !< Example of a global variable
DOUBLE PRECISION GR2_GLOBAL2 !< Another example of a global variable
!> #}
And for completeness, the FORTRAN program which makes use of this module (PROG.f):
PROGRAM PROG
USE EXAMPLE
CALL EXSUB
END
When I try to doxygen this, the HTML output successfully shows VARGROUP1 and VARGROUP3. However, VARGROUP2 (as defined in the VARIABLES.h file) are not present. I have tried many options in doxygen such as FORCE_LOCAL_INCLUDES, ENABLE_PREPOSSESSING, MACRO_EXPANSION and SEARCH_INCLUDES.
Any help you can offer would be much appreciated.
Note I tried this all with 1.8.13 (the version that can be installed in Ubuntu 18.04 with apt-get). I have since experimented with a more recent version (1.8.19) but this makes matters even worse, since now none of the variable groups appear !!
For completeness, below is the doxygen configuration (generated by doxywizard), taking into account Albert's comments:
# Doxyfile 1.8.13
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = "Example which does not work"
PROJECT_NUMBER =
PROJECT_BRIEF =
PROJECT_LOGO =
OUTPUT_DIRECTORY = /home/USER/SCRATCH/OFFICIAL_CHANGE/TEST/doxytest/OUTPUT
CREATE_SUBDIRS = NO
ALLOW_UNICODE_NAMES = NO
OUTPUT_LANGUAGE = English
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ABBREVIATE_BRIEF = "The $name class" \
"The $name widget" \
"The $name file" \
is \
provides \
specifies \
contains \
represents \
a \
an \
the
ALWAYS_DETAILED_SEC = NO
INLINE_INHERITED_MEMB = NO
FULL_PATH_NAMES = YES
STRIP_FROM_PATH =
STRIP_FROM_INC_PATH =
SHORT_NAMES = NO
JAVADOC_AUTOBRIEF = NO
QT_AUTOBRIEF = NO
MULTILINE_CPP_IS_BRIEF = NO
INHERIT_DOCS = YES
SEPARATE_MEMBER_PAGES = NO
TAB_SIZE = 4
ALIASES =
TCL_SUBST =
OPTIMIZE_OUTPUT_FOR_C = NO
OPTIMIZE_OUTPUT_JAVA = NO
OPTIMIZE_FOR_FORTRAN = YES
OPTIMIZE_OUTPUT_VHDL = NO
EXTENSION_MAPPING = "EXTENSION_MAPPING= .h=fortran"
MARKDOWN_SUPPORT = YES
TOC_INCLUDE_HEADINGS = 0
AUTOLINK_SUPPORT = YES
BUILTIN_STL_SUPPORT = NO
CPP_CLI_SUPPORT = NO
SIP_SUPPORT = NO
IDL_PROPERTY_SUPPORT = YES
DISTRIBUTE_GROUP_DOC = NO
GROUP_NESTED_COMPOUNDS = NO
SUBGROUPING = YES
INLINE_GROUPED_CLASSES = NO
INLINE_SIMPLE_STRUCTS = NO
TYPEDEF_HIDES_STRUCT = NO
LOOKUP_CACHE_SIZE = 0
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
EXTRACT_ALL = YES
EXTRACT_PRIVATE = YES
EXTRACT_PACKAGE = YES
EXTRACT_STATIC = YES
EXTRACT_LOCAL_CLASSES = YES
EXTRACT_LOCAL_METHODS = YES
EXTRACT_ANON_NSPACES = YES
HIDE_UNDOC_MEMBERS = NO
HIDE_UNDOC_CLASSES = NO
HIDE_FRIEND_COMPOUNDS = NO
HIDE_IN_BODY_DOCS = NO
INTERNAL_DOCS = YES
CASE_SENSE_NAMES = YES
HIDE_SCOPE_NAMES = NO
HIDE_COMPOUND_REFERENCE= NO
SHOW_INCLUDE_FILES = YES
SHOW_GROUPED_MEMB_INC = YES
FORCE_LOCAL_INCLUDES = YES
INLINE_INFO = YES
SORT_MEMBER_DOCS = YES
SORT_BRIEF_DOCS = YES
SORT_MEMBERS_CTORS_1ST = YES
SORT_GROUP_NAMES = YES
SORT_BY_SCOPE_NAME = YES
STRICT_PROTO_MATCHING = NO
GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES
GENERATE_BUGLIST = YES
GENERATE_DEPRECATEDLIST= YES
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
SHOW_USED_FILES = YES
SHOW_FILES = YES
SHOW_NAMESPACES = YES
FILE_VERSION_FILTER =
LAYOUT_FILE =
CITE_BIB_FILES =
#---------------------------------------------------------------------------
# Configuration options related to warning and progress messages
#---------------------------------------------------------------------------
QUIET = NO
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_IF_DOC_ERROR = YES
WARN_NO_PARAMDOC = NO
WARN_AS_ERROR = NO
WARN_FORMAT = "$file:$line: $text"
WARN_LOGFILE =
#---------------------------------------------------------------------------
# Configuration options related to the input files
#---------------------------------------------------------------------------
INPUT = /home/USER/SCRATCH/OFFICIAL_CHANGE/TEST/doxytest
INPUT_ENCODING = UTF-8
FILE_PATTERNS = *.c \
*.cc \
*.cxx \
*.cpp \
*.c++ \
*.java \
*.ii \
*.ixx \
*.ipp \
*.i++ \
*.inl \
*.idl \
*.ddl \
*.odl \
*.h \
*.hh \
*.hxx \
*.hpp \
*.h++ \
*.cs \
*.d \
*.php \
*.php4 \
*.php5 \
*.phtml \
*.inc \
*.m \
*.markdown \
*.md \
*.mm \
*.dox \
*.py \
*.pyw \
*.f90 \
*.f95 \
*.f03 \
*.f08 \
*.f \
*.for \
*.tcl \
*.vhd \
*.vhdl \
*.ucf \
*.qsf
RECURSIVE = YES
EXCLUDE =
EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS =
EXCLUDE_SYMBOLS =
EXAMPLE_PATH =
EXAMPLE_PATTERNS = *
EXAMPLE_RECURSIVE = NO
IMAGE_PATH =
INPUT_FILTER =
FILTER_PATTERNS =
FILTER_SOURCE_FILES = NO
FILTER_SOURCE_PATTERNS =
USE_MDFILE_AS_MAINPAGE =
#---------------------------------------------------------------------------
# Configuration options related to source browsing
#---------------------------------------------------------------------------
SOURCE_BROWSER = YES
INLINE_SOURCES = YES
STRIP_CODE_COMMENTS = YES
REFERENCED_BY_RELATION = YES
REFERENCES_RELATION = YES
REFERENCES_LINK_SOURCE = YES
SOURCE_TOOLTIPS = YES
USE_HTAGS = YES
VERBATIM_HEADERS = YES
CLANG_ASSISTED_PARSING = NO
CLANG_OPTIONS =
#---------------------------------------------------------------------------
# Configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
ALPHABETICAL_INDEX = YES
COLS_IN_ALPHA_INDEX = 5
IGNORE_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the HTML output
#---------------------------------------------------------------------------
GENERATE_HTML = YES
HTML_OUTPUT = html
HTML_FILE_EXTENSION = .html
HTML_HEADER =
HTML_FOOTER =
HTML_STYLESHEET =
HTML_EXTRA_STYLESHEET =
HTML_EXTRA_FILES =
HTML_COLORSTYLE_HUE = 220
HTML_COLORSTYLE_SAT = 100
HTML_COLORSTYLE_GAMMA = 80
HTML_TIMESTAMP = NO
HTML_DYNAMIC_SECTIONS = NO
HTML_INDEX_NUM_ENTRIES = 100
GENERATE_DOCSET = NO
DOCSET_FEEDNAME = "Doxygen generated docs"
DOCSET_BUNDLE_ID = org.doxygen.Project
DOCSET_PUBLISHER_ID = org.doxygen.Publisher
DOCSET_PUBLISHER_NAME = Publisher
GENERATE_HTMLHELP = NO
CHM_FILE =
HHC_LOCATION =
GENERATE_CHI = NO
CHM_INDEX_ENCODING =
BINARY_TOC = NO
TOC_EXPAND = NO
GENERATE_QHP = NO
QCH_FILE =
QHP_NAMESPACE = org.doxygen.Project
QHP_VIRTUAL_FOLDER = doc
QHP_CUST_FILTER_NAME =
QHP_CUST_FILTER_ATTRS =
QHP_SECT_FILTER_ATTRS =
QHG_LOCATION =
GENERATE_ECLIPSEHELP = NO
ECLIPSE_DOC_ID = org.doxygen.Project
DISABLE_INDEX = NO
GENERATE_TREEVIEW = NO
ENUM_VALUES_PER_LINE = 4
TREEVIEW_WIDTH = 250
EXT_LINKS_IN_WINDOW = NO
FORMULA_FONTSIZE = 10
FORMULA_TRANSPARENT = YES
USE_MATHJAX = NO
MATHJAX_FORMAT = HTML-CSS
MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
MATHJAX_EXTENSIONS =
MATHJAX_CODEFILE =
SEARCHENGINE = YES
SERVER_BASED_SEARCH = NO
EXTERNAL_SEARCH = NO
SEARCHENGINE_URL =
SEARCHDATA_FILE = searchdata.xml
EXTERNAL_SEARCH_ID =
EXTRA_SEARCH_MAPPINGS =
#---------------------------------------------------------------------------
# Configuration options related to the LaTeX output
#---------------------------------------------------------------------------
GENERATE_LATEX = YES
LATEX_OUTPUT = latex
LATEX_CMD_NAME = latex
MAKEINDEX_CMD_NAME = makeindex
COMPACT_LATEX = NO
PAPER_TYPE = a4
EXTRA_PACKAGES =
LATEX_HEADER =
LATEX_FOOTER =
LATEX_EXTRA_STYLESHEET =
LATEX_EXTRA_FILES =
PDF_HYPERLINKS = YES
USE_PDFLATEX = YES
LATEX_BATCHMODE = NO
LATEX_HIDE_INDICES = NO
LATEX_SOURCE_CODE = NO
LATEX_BIB_STYLE = plain
LATEX_TIMESTAMP = NO
#---------------------------------------------------------------------------
# Configuration options related to the RTF output
#---------------------------------------------------------------------------
GENERATE_RTF = NO
RTF_OUTPUT = rtf
COMPACT_RTF = NO
RTF_HYPERLINKS = NO
RTF_STYLESHEET_FILE =
RTF_EXTENSIONS_FILE =
RTF_SOURCE_CODE = NO
#---------------------------------------------------------------------------
# Configuration options related to the man page output
#---------------------------------------------------------------------------
GENERATE_MAN = NO
MAN_OUTPUT = man
MAN_EXTENSION = .3
MAN_SUBDIR =
MAN_LINKS = NO
#---------------------------------------------------------------------------
# Configuration options related to the XML output
#---------------------------------------------------------------------------
GENERATE_XML = NO
XML_OUTPUT = xml
XML_PROGRAMLISTING = YES
#---------------------------------------------------------------------------
# Configuration options related to the DOCBOOK output
#---------------------------------------------------------------------------
GENERATE_DOCBOOK = NO
DOCBOOK_OUTPUT = docbook
DOCBOOK_PROGRAMLISTING = NO
#---------------------------------------------------------------------------
# Configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
GENERATE_AUTOGEN_DEF = NO
#---------------------------------------------------------------------------
# Configuration options related to the Perl module output
#---------------------------------------------------------------------------
GENERATE_PERLMOD = NO
PERLMOD_LATEX = NO
PERLMOD_PRETTY = YES
PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = YES
EXPAND_ONLY_PREDEF = NO
SEARCH_INCLUDES = YES
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
PREDEFINED =
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
# Configuration options related to external references
#---------------------------------------------------------------------------
TAGFILES =
GENERATE_TAGFILE =
ALLEXTERNALS = NO
EXTERNAL_GROUPS = YES
EXTERNAL_PAGES = YES
PERL_PATH = /usr/bin/perl
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
CLASS_DIAGRAMS = NO
MSCGEN_PATH =
DIA_PATH =
HIDE_UNDOC_RELATIONS = YES
HAVE_DOT = YES
DOT_NUM_THREADS = 0
DOT_FONTNAME = Helvetica
DOT_FONTSIZE = 10
DOT_FONTPATH =
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
GROUP_GRAPHS = YES
UML_LOOK = NO
UML_LIMIT_NUM_FIELDS = 10
TEMPLATE_RELATIONS = NO
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES
CALL_GRAPH = NO
CALLER_GRAPH = NO
GRAPHICAL_HIERARCHY = YES
DIRECTORY_GRAPH = YES
DOT_IMAGE_FORMAT = png
INTERACTIVE_SVG = NO
DOT_PATH =
DOTFILE_DIRS =
MSCFILE_DIRS =
DIAFILE_DIRS =
PLANTUML_JAR_PATH =
PLANTUML_CFG_FILE =
PLANTUML_INCLUDE_PATH =
DOT_GRAPH_MAX_NODES = 50
MAX_DOT_GRAPH_DEPTH = 0
DOT_TRANSPARENT = NO
DOT_MULTI_TARGETS = NO
GENERATE_LEGEND = YES
DOT_CLEANUP = YES
Thanks Albert for all your input. I am now in a position to suggest an answer to my question and summarise where I went wrong.
The problem is that although the code originally posted is correct from the perspective of the compiler, Doxygen expects each file to be a function, subroutine, module or main. Therefore, to 'trick' Doxygen into thinking the code is valid, a couple #ifdef statements can be used to make it appear to Doxygen it is a MODULE (see VARIABLES.h below). Note that from the compiler's perspective, it is not fooled and does not class the contents of the header file as a module.
The other change required was to the configuration of Doxygen since a .h file will be processed as a C header file. Therefore, extension mapping is required to redefine all .h files to be fortran (see the doxywizard configuration output below).
The three files are now the following:
!> #brief An example of a module with global variables defined
!> #details The purpose is to explain why the global variables in group VARGROUP2 in the included file do not appear in the DOXYGEN ouptut.
!> #details Why? Please help! I can not see where I have made a mistake
!> #details I added the suggestion made by Albert and also renamed the header file to a fortran F file
MODULE EXAMPLE
INTEGER N !< Size of vector
PARAMETER(N=10)
!> #name VARGROUP1
!! Parameters in group 1
DOUBLE PRECISION GR1_GLOBAL1 !< Example of a global variable
DOUBLE PRECISION GR1_GLOBAL2 !< Another example of a global variable
DOUBLE PRECISION GR1_VECTOR(N) !< An example of a global vector variable
!> #}
#include "VARIABLES.h"
!> #name VARGROUP3
!! Parameters in group 3
DOUBLE PRECISION GR3_GLOBAL1 !< Example of a global variable
DOUBLE PRECISION GR3_GLOBAL2 !< Another example of a global variable
!> #}
CONTAINS
!> #brief An example of a subroutine within a module
!> #details A simple Hello World Program
SUBROUTINE EXSUB
INTEGER I !< Example of a local variable
I = 0
GR1_GLOBAL1 = 1
GR2_GLOBAL1 = 2
GR3_GLOBAL1 = 3
WRITE(*,*) 'HELLO WORLD'
WRITE(*,*) I,GR1_GLOBAL1,GR2_GLOBAL1,GR3_GLOBAL1
END SUBROUTINE EXSUB
END MODULE EXAMPLE
The contents of the file that is included is as follows (VARIABLES.h). The #ifdef constructs are the important bits:
#ifdef DOXYGEN
MODULE VARGROUP2
#endif
!> #name VARGROUP2
!! Parameters in group 2
!> #{
DOUBLE PRECISION GR2_GLOBAL1 !< Example of a global variable
DOUBLE PRECISION GR2_GLOBAL2 !< Another example of a global variable
!> #}
#ifdef DOXYGEN
END
#endif
For completeness, the FORTRAN code that utilises the EXAMPLE module and creates the program is as follows:
PROGRAM PROG
USE EXAMPLE
CALL EXSUB
END
Also, the doxygen configuration (as outputted by doxywizard) is as follows, noting the need to use extension mapping to force doxygen into thinking .h files contain fortran code:
# Doxyfile 1.8.13
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = "Example Module"
PROJECT_NUMBER =
PROJECT_BRIEF =
PROJECT_LOGO =
OUTPUT_DIRECTORY = /home/rwhg1/SCRATCH/OFFICIAL_CHANGE/TEST/doxytest
CREATE_SUBDIRS = NO
ALLOW_UNICODE_NAMES = NO
OUTPUT_LANGUAGE = English
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ABBREVIATE_BRIEF = "The $name class" \
"The $name widget" \
"The $name file" \
is \
provides \
specifies \
contains \
represents \
a \
an \
the
ALWAYS_DETAILED_SEC = NO
INLINE_INHERITED_MEMB = NO
FULL_PATH_NAMES = YES
STRIP_FROM_PATH =
STRIP_FROM_INC_PATH =
SHORT_NAMES = NO
JAVADOC_AUTOBRIEF = NO
QT_AUTOBRIEF = NO
MULTILINE_CPP_IS_BRIEF = NO
INHERIT_DOCS = YES
SEPARATE_MEMBER_PAGES = NO
TAB_SIZE = 4
ALIASES =
TCL_SUBST =
OPTIMIZE_OUTPUT_FOR_C = NO
OPTIMIZE_OUTPUT_JAVA = NO
OPTIMIZE_FOR_FORTRAN = YES
OPTIMIZE_OUTPUT_VHDL = NO
EXTENSION_MAPPING = f=FortranFixed \
h=FortranFixed
MARKDOWN_SUPPORT = YES
TOC_INCLUDE_HEADINGS = 0
AUTOLINK_SUPPORT = YES
BUILTIN_STL_SUPPORT = NO
CPP_CLI_SUPPORT = NO
SIP_SUPPORT = NO
IDL_PROPERTY_SUPPORT = YES
DISTRIBUTE_GROUP_DOC = NO
GROUP_NESTED_COMPOUNDS = NO
SUBGROUPING = YES
INLINE_GROUPED_CLASSES = NO
INLINE_SIMPLE_STRUCTS = NO
TYPEDEF_HIDES_STRUCT = NO
LOOKUP_CACHE_SIZE = 0
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
EXTRACT_ALL = YES
EXTRACT_PRIVATE = NO
EXTRACT_PACKAGE = NO
EXTRACT_STATIC = NO
EXTRACT_LOCAL_CLASSES = YES
EXTRACT_LOCAL_METHODS = YES
EXTRACT_ANON_NSPACES = YES
HIDE_UNDOC_MEMBERS = YES
HIDE_UNDOC_CLASSES = YES
HIDE_FRIEND_COMPOUNDS = NO
HIDE_IN_BODY_DOCS = NO
INTERNAL_DOCS = NO
CASE_SENSE_NAMES = NO
HIDE_SCOPE_NAMES = NO
HIDE_COMPOUND_REFERENCE= NO
SHOW_INCLUDE_FILES = YES
SHOW_GROUPED_MEMB_INC = YES
FORCE_LOCAL_INCLUDES = YES
INLINE_INFO = YES
SORT_MEMBER_DOCS = YES
SORT_BRIEF_DOCS = NO
SORT_MEMBERS_CTORS_1ST = NO
SORT_GROUP_NAMES = NO
SORT_BY_SCOPE_NAME = NO
STRICT_PROTO_MATCHING = NO
GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES
GENERATE_BUGLIST = YES
GENERATE_DEPRECATEDLIST= YES
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
SHOW_USED_FILES = YES
SHOW_FILES = YES
SHOW_NAMESPACES = YES
FILE_VERSION_FILTER =
LAYOUT_FILE =
CITE_BIB_FILES =
#---------------------------------------------------------------------------
# Configuration options related to warning and progress messages
#---------------------------------------------------------------------------
QUIET = NO
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_IF_DOC_ERROR = YES
WARN_NO_PARAMDOC = NO
WARN_AS_ERROR = NO
WARN_FORMAT = "$file:$line: $text"
WARN_LOGFILE =
#---------------------------------------------------------------------------
# Configuration options related to the input files
#---------------------------------------------------------------------------
INPUT = /home/rwhg1/SCRATCH/OFFICIAL_CHANGE/TEST/doxytest
INPUT_ENCODING = UTF-8
FILE_PATTERNS = *.f \
*.for \
*.h
RECURSIVE = YES
EXCLUDE =
EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS =
EXCLUDE_SYMBOLS =
EXAMPLE_PATH =
EXAMPLE_PATTERNS = *
EXAMPLE_RECURSIVE = NO
IMAGE_PATH =
INPUT_FILTER =
FILTER_PATTERNS = *.f \
*.for \
*..h
FILTER_SOURCE_FILES = NO
FILTER_SOURCE_PATTERNS =
USE_MDFILE_AS_MAINPAGE =
#---------------------------------------------------------------------------
# Configuration options related to source browsing
#---------------------------------------------------------------------------
SOURCE_BROWSER = NO
INLINE_SOURCES = YES
STRIP_CODE_COMMENTS = YES
REFERENCED_BY_RELATION = YES
REFERENCES_RELATION = YES
REFERENCES_LINK_SOURCE = YES
SOURCE_TOOLTIPS = YES
USE_HTAGS = NO
VERBATIM_HEADERS = YES
CLANG_ASSISTED_PARSING = NO
CLANG_OPTIONS =
#---------------------------------------------------------------------------
# Configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
ALPHABETICAL_INDEX = YES
COLS_IN_ALPHA_INDEX = 5
IGNORE_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the HTML output
#---------------------------------------------------------------------------
GENERATE_HTML = YES
HTML_OUTPUT = html
HTML_FILE_EXTENSION = .html
HTML_HEADER =
HTML_FOOTER =
HTML_STYLESHEET =
HTML_EXTRA_STYLESHEET =
HTML_EXTRA_FILES =
HTML_COLORSTYLE_HUE = 220
HTML_COLORSTYLE_SAT = 100
HTML_COLORSTYLE_GAMMA = 80
HTML_TIMESTAMP = NO
HTML_DYNAMIC_SECTIONS = NO
HTML_INDEX_NUM_ENTRIES = 100
GENERATE_DOCSET = NO
DOCSET_FEEDNAME = "Doxygen generated docs"
DOCSET_BUNDLE_ID = org.doxygen.Project
DOCSET_PUBLISHER_ID = org.doxygen.Publisher
DOCSET_PUBLISHER_NAME = Publisher
GENERATE_HTMLHELP = NO
CHM_FILE =
HHC_LOCATION =
GENERATE_CHI = NO
CHM_INDEX_ENCODING =
BINARY_TOC = NO
TOC_EXPAND = NO
GENERATE_QHP = NO
QCH_FILE =
QHP_NAMESPACE = org.doxygen.Project
QHP_VIRTUAL_FOLDER = doc
QHP_CUST_FILTER_NAME =
QHP_CUST_FILTER_ATTRS =
QHP_SECT_FILTER_ATTRS =
QHG_LOCATION =
GENERATE_ECLIPSEHELP = NO
ECLIPSE_DOC_ID = org.doxygen.Project
DISABLE_INDEX = NO
GENERATE_TREEVIEW = YES
ENUM_VALUES_PER_LINE = 4
TREEVIEW_WIDTH = 250
EXT_LINKS_IN_WINDOW = NO
FORMULA_FONTSIZE = 10
FORMULA_TRANSPARENT = YES
USE_MATHJAX = NO
MATHJAX_FORMAT = HTML-CSS
MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
MATHJAX_EXTENSIONS =
MATHJAX_CODEFILE =
SEARCHENGINE = YES
SERVER_BASED_SEARCH = NO
EXTERNAL_SEARCH = NO
SEARCHENGINE_URL =
SEARCHDATA_FILE = searchdata.xml
EXTERNAL_SEARCH_ID =
EXTRA_SEARCH_MAPPINGS =
#---------------------------------------------------------------------------
# Configuration options related to the LaTeX output
#---------------------------------------------------------------------------
GENERATE_LATEX = YES
LATEX_OUTPUT = latex
LATEX_CMD_NAME = latex
MAKEINDEX_CMD_NAME = makeindex
COMPACT_LATEX = NO
PAPER_TYPE = a4
EXTRA_PACKAGES =
LATEX_HEADER =
LATEX_FOOTER =
LATEX_EXTRA_STYLESHEET =
LATEX_EXTRA_FILES =
PDF_HYPERLINKS = YES
USE_PDFLATEX = YES
LATEX_BATCHMODE = NO
LATEX_HIDE_INDICES = NO
LATEX_SOURCE_CODE = NO
LATEX_BIB_STYLE = plain
LATEX_TIMESTAMP = NO
#---------------------------------------------------------------------------
# Configuration options related to the RTF output
#---------------------------------------------------------------------------
GENERATE_RTF = NO
RTF_OUTPUT = rtf
COMPACT_RTF = NO
RTF_HYPERLINKS = NO
RTF_STYLESHEET_FILE =
RTF_EXTENSIONS_FILE =
RTF_SOURCE_CODE = NO
#---------------------------------------------------------------------------
# Configuration options related to the man page output
#---------------------------------------------------------------------------
GENERATE_MAN = NO
MAN_OUTPUT = man
MAN_EXTENSION = .3
MAN_SUBDIR =
MAN_LINKS = NO
#---------------------------------------------------------------------------
# Configuration options related to the XML output
#---------------------------------------------------------------------------
GENERATE_XML = NO
XML_OUTPUT = xml
XML_PROGRAMLISTING = YES
#---------------------------------------------------------------------------
# Configuration options related to the DOCBOOK output
#---------------------------------------------------------------------------
GENERATE_DOCBOOK = NO
DOCBOOK_OUTPUT = docbook
DOCBOOK_PROGRAMLISTING = NO
#---------------------------------------------------------------------------
# Configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
GENERATE_AUTOGEN_DEF = NO
#---------------------------------------------------------------------------
# Configuration options related to the Perl module output
#---------------------------------------------------------------------------
GENERATE_PERLMOD = NO
PERLMOD_LATEX = NO
PERLMOD_PRETTY = YES
PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = YES
EXPAND_ONLY_PREDEF = NO
SEARCH_INCLUDES = YES
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
PREDEFINED =
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = NO
#---------------------------------------------------------------------------
# Configuration options related to external references
#---------------------------------------------------------------------------
TAGFILES =
GENERATE_TAGFILE =
ALLEXTERNALS = NO
EXTERNAL_GROUPS = YES
EXTERNAL_PAGES = YES
PERL_PATH = /usr/bin/perl
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
CLASS_DIAGRAMS = NO
MSCGEN_PATH =
DIA_PATH =
HIDE_UNDOC_RELATIONS = YES
HAVE_DOT = YES
DOT_NUM_THREADS = 0
DOT_FONTNAME = Helvetica
DOT_FONTSIZE = 10
DOT_FONTPATH =
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
GROUP_GRAPHS = YES
UML_LOOK = NO
UML_LIMIT_NUM_FIELDS = 10
TEMPLATE_RELATIONS = NO
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES
CALL_GRAPH = YES
CALLER_GRAPH = YES
GRAPHICAL_HIERARCHY = YES
DIRECTORY_GRAPH = YES
DOT_IMAGE_FORMAT = png
INTERACTIVE_SVG = NO
DOT_PATH = /usr/bin/dot
DOTFILE_DIRS =
MSCFILE_DIRS =
DIAFILE_DIRS =
PLANTUML_JAR_PATH =
PLANTUML_CFG_FILE =
PLANTUML_INCLUDE_PATH =
DOT_GRAPH_MAX_NODES = 50
MAX_DOT_GRAPH_DEPTH = 0
DOT_TRANSPARENT = NO
DOT_MULTI_TARGETS = NO
GENERATE_LEGEND = YES
DOT_CLEANUP = YES
The resulting HTML output from Doxygen shows the contents of the header file as a module, which is obviously incorrect. This workaround is hopefully good enough, but if anyone has a better solution, I'm all ears!
In the end, I opted to write a FORTRAN program which pre-processes the FORTRAN file to be processed by DOXYGEN. The purpose of this program was to replace all instances of #include "filename.xxx" with the contents of filename.xxx. Initially, this was used to ensure the contents of the header files were processed properly (without the need to set up 'fake' modules to contain the variables). However, it was also useful to separate the function descriptions (i.e. the #brief and #details cards) as some of these were very long! Anyway, I thought this might be useful for the community (use at your own risk):
!> #brief A program that inserts all included files into a FORTRAN input file
!> #details Requires two inputs:
!> #details 1/. the FORTRAN input file containing '#include' directives
!> #details 2./ the output filename for the new FORTRAN input file
PROGRAM MAIN
IMPLICIT NONE
CHARACTER*1000 ARG1,ARG2,INCFILE
CHARACTER*90000 BUFFER
LOGICAL YESNO
INTEGER CONT,IE,COUNTER
! **** Get original FORTRAN file to which included files to be added
CALL GETARG(1,ARG1)
! **** Get name of new FORTRAN file
CALL GETARG(2,ARG2)
C **** Check file exists already
INQUIRE(FILE=ARG1,EXIST=YESNO)
IF(YESNO) THEN
OPEN(10,FILE=ARG1,STATUS='OLD')
ELSE
STOP
ENDIF
C **** Check output file does not exist
INQUIRE(FILE=ARG2,EXIST=YESNO)
IF(YESNO) THEN
WRITE(*,'(A)') 'OUTPUT FILE ALREADY EXISTS'
STOP
ENDIF
OPEN(20,FILE=ARG2,STATUS='NEW')
C **** Loop through input file. If pre-processor directive
C '#include' exists, then call INSERTINCLUDE. If not then simply
C copy the line to the output file
CONT = 0
COUNTER = 20
DO WHILE(CONT.GE.0)
READ(10,'(A)',END=999) BUFFER
IF(BUFFER(1:8).EQ.'#include') THEN
COUNTER = COUNTER + 1
CALL INSERTINCLUDE(BUFFER,COUNTER)
ELSE
WRITE(20,'(A)') TRIM(BUFFER)
ENDIF
ENDDO
999 CONTINUE
CLOSE(10)
CLOSE(20)
END
!> #brief A recursive subroutine which replaces an '#include' line with the contents of the file being referenced
!> #details Subroutine is recursive so can include files that are included within another included file
!> #details Useful to keep lengthy Doxygen comments separate from the actual code aswell
RECURSIVE SUBROUTINE INSERTINCLUDE(BUFFER,COUNTER)
IMPLICIT NONE
CHARACTER*90000 BUFFER !> A character buffer which is hopefully large enough to hold the contents of each line in the included file (also initially contains the '#include' line with the file to be opened)
CHARACTER*1000 INCFILE !> Included file to be opened
INTEGER COUNTER !> A unique LUN number for the included file which increments by 1 for every recursive instance of this subroutine
INTEGER IE,CONT2,NEXTCOUNTER
LOGICAL YESNO
C **** DETERMINE THE DOUBLE QUOTATION MARKS SURROUNDING THE FILE TO BE INCLUDED
WRITE(*,'(A)') TRIM(BUFFER)
IE = INDEX(BUFFER,'"')
INCFILE = BUFFER(IE+1:)
IE = INDEX(INCFILE,'"')
INCFILE = INCFILE(1:IE-1)
WRITE(*,'(2A)') 'INCLUDING ',TRIM(INCFILE)
C **** CHECK THE FILE TO BE INCLUDED EXISTS. IF YES THEN OPEN
INQUIRE(FILE=INCFILE,EXIST=YESNO)
IF(YESNO) THEN
OPEN(COUNTER,FILE=INCFILE,STATUS='OLD')
ELSE
WRITE(*,'(A)') 'COULD NOT OPEN INCLUDE FILE'
STOP
ENDIF
C **** LOOP THROUGH THE INCLUDED FILE AND COPY CONTENTS TO LUN 20 (I.E. THE MAIN OUTPUT FILE)
C IF ANOTHER '#include' IS FOUND THEN RUN ANOTHER INSTANCE OF THIS SUBROUTINE
CONT2 = 0
DO WHILE(CONT2.GE.0)
READ(COUNTER,'(A)',END=888) BUFFER
IF(BUFFER(1:8).EQ.'#include') THEN
NEXTCOUNTER = COUNTER + 1
CALL INSERTINCLUDE(BUFFER,NEXTCOUNTER)
ELSE
WRITE(20,'(A)') TRIM(BUFFER)
ENDIF
ENDDO
888 WRITE(*,'(2A)') 'FINISHED INCLUDING ',TRIM(INCFILE)
CLOSE(COUNTER)
END
There is no doubt an easier way probably, but this worked for me.
I'm using Doxygen 1.8.11 to document a large base of Python code. I'm using it because I wanted the LaTeX documentation support (in addition to .html).
Originally, I documented my code following the Doxygen recommendations, meaning without docstrings. This means something like:
""" description at beginning of file """
##
# description of a class
#
class Class(object):
##
# Constructor
# #param a a variable
# #param b another variable
def __init__(a,b):
......etc.
I didn't like this and I found doxypy 0.4.1 and use this as an input filter to my code. Now, I write:
""" description at beginning of file """
class Class(object):
"""description of class
def __init__(a,b):
"""Constructor
#param a a variable
#param b another variable
"""
......etc.
Although I don't really care whether the Python gods are angered by not using docsstrings, I wanted to try to be conformant and anyway, this works better with other tools I'm using.
The problem I found (that I worked around in a very nasty way - with a not good side-effect also) is that when I use the docstring documented code, with doxypy, it converts the above to:
## description at beginning of file
#
##
# description of a class
#
class Class(object):
##
# Constructor
# #param a a variable
# #param b another variable
def __init__(a,b):
......etc.
Now, here's the problem. The first line in my file used to have a docstring, even in the Doxygen suggested format. I found that if I did not have this docstring, Doxygen would act as if the code is not documented and would not include it in my documentation (I need to be clear here and say that this problem was only for things that were def'd - not classes - i.e. functions
in my software declared like:
def func(a,b)
...
It simply would not put these in the documentation unless I set the EXTRACT_ALL parameter in the Doxygen configuration file. Obviously, I don't want to extract everything and wanted some control - but unsetting this made these defs disappear.
So, I circumvented some kind of doxygen problem by putting that docstring at the top of my code. Now, when I switched to doxypy as my input filter, this
docstring is gone. And I can find no way to make doxypy ignore this string. So I hacked doxypy to shove a docstring at the front of the emitted lines and now it works - but code listing references are off by a line (Doxygen warned me about this in the manual). (I could still fix this by including a dummy line at the top of the file and instead of doxygen appending a docstring, it could simply replace the dummy line).
So, my questions are:
is there any way to get def'd functions included in my documentation without a docstring at the top of the file and without using the EXTRACT_ALL setting? Is this a known issue or am I doing something wrong?
is there any way to get doxypy to not convert a docstring to the doxygen format? i.e. some specially tagged docstring not to convert.
Thanks for any help.
here's my doxygen config file (with comments stripped):
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = SignalIntegrity
PROJECT_NUMBER = 1.0
PROJECT_BRIEF = "Signal Integrity Tools in Python"
PROJECT_LOGO = ../AppIcon2.ico
OUTPUT_DIRECTORY =
CREATE_SUBDIRS = NO
ALLOW_UNICODE_NAMES = NO
OUTPUT_LANGUAGE = English
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ABBREVIATE_BRIEF =
ALWAYS_DETAILED_SEC = NO
INLINE_INHERITED_MEMB = NO
FULL_PATH_NAMES = YES
STRIP_FROM_PATH = ../..
STRIP_FROM_INC_PATH = ../..
SHORT_NAMES = NO
JAVADOC_AUTOBRIEF = NO
QT_AUTOBRIEF = NO
MULTILINE_CPP_IS_BRIEF = NO
INHERIT_DOCS = YES
SEPARATE_MEMBER_PAGES = NO
TAB_SIZE = 4
ALIASES =
TCL_SUBST =
OPTIMIZE_OUTPUT_FOR_C = NO
OPTIMIZE_OUTPUT_JAVA = YES
OPTIMIZE_FOR_FORTRAN = NO
OPTIMIZE_OUTPUT_VHDL = NO
EXTENSION_MAPPING =
MARKDOWN_SUPPORT = YES
AUTOLINK_SUPPORT = YES
BUILTIN_STL_SUPPORT = NO
CPP_CLI_SUPPORT = NO
SIP_SUPPORT = NO
IDL_PROPERTY_SUPPORT = YES
DISTRIBUTE_GROUP_DOC = NO
GROUP_NESTED_COMPOUNDS = NO
SUBGROUPING = YES
INLINE_GROUPED_CLASSES = NO
INLINE_SIMPLE_STRUCTS = NO
TYPEDEF_HIDES_STRUCT = NO
LOOKUP_CACHE_SIZE = 0
EXTRACT_ALL = NO
EXTRACT_PRIVATE = NO
EXTRACT_PACKAGE = YES
EXTRACT_STATIC = YES
EXTRACT_LOCAL_CLASSES = YES
EXTRACT_LOCAL_METHODS = NO
EXTRACT_ANON_NSPACES = YES
HIDE_UNDOC_MEMBERS = YES
HIDE_UNDOC_CLASSES = YES
HIDE_FRIEND_COMPOUNDS = NO
HIDE_IN_BODY_DOCS = NO
INTERNAL_DOCS = NO
CASE_SENSE_NAMES = YES
HIDE_SCOPE_NAMES = YES
HIDE_COMPOUND_REFERENCE= NO
SHOW_INCLUDE_FILES = YES
SHOW_GROUPED_MEMB_INC = NO
FORCE_LOCAL_INCLUDES = NO
INLINE_INFO = YES
SORT_MEMBER_DOCS = YES
SORT_BRIEF_DOCS = NO
SORT_MEMBERS_CTORS_1ST = NO
SORT_GROUP_NAMES = NO
SORT_BY_SCOPE_NAME = NO
STRICT_PROTO_MATCHING = NO
GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES
GENERATE_BUGLIST = YES
GENERATE_DEPRECATEDLIST= YES
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
SHOW_USED_FILES = YES
SHOW_FILES = YES
SHOW_NAMESPACES = YES
FILE_VERSION_FILTER =
LAYOUT_FILE =
CITE_BIB_FILES =
QUIET = NO
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_IF_DOC_ERROR = YES
WARN_NO_PARAMDOC = NO
WARN_AS_ERROR = NO
WARN_FORMAT = "$file:$line: $text"
WARN_LOGFILE =
INPUT = "../SignalIntegrity/"
INPUT_ENCODING = UTF-8
FILE_PATTERNS =
RECURSIVE = YES
EXCLUDE =
EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS =
EXCLUDE_SYMBOLS =
EXAMPLE_PATH =
EXAMPLE_PATTERNS =
EXAMPLE_RECURSIVE = NO
IMAGE_PATH =
INPUT_FILTER = ~/Work/PySI/Doc/doxypy.py
FILTER_PATTERNS =
FILTER_SOURCE_FILES = NO
FILTER_SOURCE_PATTERNS =
USE_MDFILE_AS_MAINPAGE =
SOURCE_BROWSER = YES
INLINE_SOURCES = NO
STRIP_CODE_COMMENTS = YES
REFERENCED_BY_RELATION = NO
REFERENCES_RELATION = NO
REFERENCES_LINK_SOURCE = YES
SOURCE_TOOLTIPS = YES
USE_HTAGS = NO
VERBATIM_HEADERS = YES
CLANG_ASSISTED_PARSING = NO
CLANG_OPTIONS =
ALPHABETICAL_INDEX = YES
COLS_IN_ALPHA_INDEX = 5
IGNORE_PREFIX =
GENERATE_HTML = YES
HTML_OUTPUT = xhtml
HTML_FILE_EXTENSION = .xhtml
HTML_HEADER =
HTML_FOOTER =
HTML_STYLESHEET =
HTML_EXTRA_STYLESHEET =
HTML_EXTRA_FILES =
HTML_COLORSTYLE_HUE = 220
HTML_COLORSTYLE_SAT = 100
HTML_COLORSTYLE_GAMMA = 80
HTML_TIMESTAMP = NO
HTML_DYNAMIC_SECTIONS = NO
HTML_INDEX_NUM_ENTRIES = 100
GENERATE_DOCSET = NO
DOCSET_FEEDNAME = "Doxygen generated docs"
DOCSET_BUNDLE_ID = org.doxygen.Project
DOCSET_PUBLISHER_ID = org.doxygen.Publisher
DOCSET_PUBLISHER_NAME = Publisher
GENERATE_HTMLHELP = NO
CHM_FILE =
HHC_LOCATION =
GENERATE_CHI = NO
CHM_INDEX_ENCODING =
BINARY_TOC = NO
TOC_EXPAND = NO
GENERATE_QHP = NO
QCH_FILE =
QHP_NAMESPACE = org.doxygen.Project
QHP_VIRTUAL_FOLDER = doc
QHP_CUST_FILTER_NAME =
QHP_CUST_FILTER_ATTRS =
QHP_SECT_FILTER_ATTRS =
QHG_LOCATION =
GENERATE_ECLIPSEHELP = NO
ECLIPSE_DOC_ID = org.doxygen.Project
DISABLE_INDEX = NO
GENERATE_TREEVIEW = NO
ENUM_VALUES_PER_LINE = 4
TREEVIEW_WIDTH = 250
EXT_LINKS_IN_WINDOW = NO
FORMULA_FONTSIZE = 10
FORMULA_TRANSPARENT = YES
USE_MATHJAX = NO
MATHJAX_FORMAT = HTML-CSS
MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
MATHJAX_EXTENSIONS =
MATHJAX_CODEFILE =
SEARCHENGINE = YES
SERVER_BASED_SEARCH = NO
EXTERNAL_SEARCH = NO
SEARCHENGINE_URL =
SEARCHDATA_FILE = searchdata.xml
EXTERNAL_SEARCH_ID =
EXTRA_SEARCH_MAPPINGS =
GENERATE_LATEX = YES
LATEX_OUTPUT = latex
LATEX_CMD_NAME = latex
MAKEINDEX_CMD_NAME = makeindex
COMPACT_LATEX = NO
PAPER_TYPE = letter
EXTRA_PACKAGES =
LATEX_HEADER =
LATEX_FOOTER =
LATEX_EXTRA_STYLESHEET =
LATEX_EXTRA_FILES =
PDF_HYPERLINKS = YES
USE_PDFLATEX = YES
LATEX_BATCHMODE = NO
LATEX_HIDE_INDICES = NO
LATEX_SOURCE_CODE = NO
LATEX_BIB_STYLE = plain
LATEX_TIMESTAMP = NO
GENERATE_RTF = NO
RTF_OUTPUT = rtf
COMPACT_RTF = NO
RTF_HYPERLINKS = NO
RTF_STYLESHEET_FILE =
RTF_EXTENSIONS_FILE =
RTF_SOURCE_CODE = NO
GENERATE_MAN = NO
MAN_OUTPUT = man
MAN_EXTENSION = .3
MAN_SUBDIR =
MAN_LINKS = NO
GENERATE_XML = NO
XML_OUTPUT = xml
XML_PROGRAMLISTING = YES
GENERATE_DOCBOOK = NO
DOCBOOK_OUTPUT = docbook
DOCBOOK_PROGRAMLISTING = NO
GENERATE_AUTOGEN_DEF = NO
GENERATE_PERLMOD = NO
PERLMOD_LATEX = NO
PERLMOD_PRETTY = YES
PERLMOD_MAKEVAR_PREFIX =
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = NO
EXPAND_ONLY_PREDEF = NO
SEARCH_INCLUDES = YES
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
PREDEFINED =
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
TAGFILES =
GENERATE_TAGFILE =
ALLEXTERNALS = NO
EXTERNAL_GROUPS = YES
EXTERNAL_PAGES = YES
PERL_PATH = /usr/bin/perl
CLASS_DIAGRAMS = YES
MSCGEN_PATH =
DIA_PATH =
HIDE_UNDOC_RELATIONS = NO
HAVE_DOT = YES
DOT_NUM_THREADS = 0
DOT_FONTNAME = Helvetica
DOT_FONTSIZE = 10
DOT_FONTPATH =
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
GROUP_GRAPHS = YES
UML_LOOK = YES
UML_LIMIT_NUM_FIELDS = 10
TEMPLATE_RELATIONS = YES
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES
CALL_GRAPH = NO
CALLER_GRAPH = NO
GRAPHICAL_HIERARCHY = YES
DIRECTORY_GRAPH = YES
DOT_IMAGE_FORMAT = svg
INTERACTIVE_SVG = NO
DOT_PATH =
DOTFILE_DIRS =
MSCFILE_DIRS =
DIAFILE_DIRS =
PLANTUML_JAR_PATH =
PLANTUML_INCLUDE_PATH =
DOT_GRAPH_MAX_NODES = 50
MAX_DOT_GRAPH_DEPTH = 0
DOT_TRANSPARENT = NO
DOT_MULTI_TARGETS = NO
GENERATE_LEGEND = YES
DOT_CLEANUP = YES
I am trying to implement custom c_library() rule in Bazel which takes a bunch of .c files as input and produces .a static library. In my implementation, .c files generate .o objects and then archives into .a library. But it seems that .o files are not getting generated.
Here is the custom c_library() rule (rules.bzl file):
def _change_ext_to_x( file_list, x = 'o' ):
# inputs a file list (i.e. string list)
# and changes their extensions to '.{x}'
return [ "".join( onefile.split('.')[:-1] ) + '.' + x \
for onefile in file_list ]
def _str_to_File( ctx, file_list ):
# A constructor of File() object
# pass the context
return [ ctx.new_file( onefile ) for onefile in file_list ]
def _c_library_impl( ctx ):
# implementation of 'c_library' rule
# the source files list ( strings )
in_file_list = []
for onefile in ctx.files.srcs:
in_file_list.append( onefile.basename )
out_file_list = _str_to_File( ctx, # the current context
_change_ext_to_x(in_file_list, x = 'o') )
ctx.action(
inputs = ctx.files.srcs,
outputs = out_file_list,
progress_message = "COMPILING FROM <.c> TO <.o>",
use_default_shell_env = True,
command = "gcc -c -O3 %s" % " ".join( in_file_list )
)
ctx.action(
inputs = out_file_list,
outputs = [ ctx.outputs._libfile ],
progress_message = "ARCHIVING <.o>s to <.a>",
use_default_shell_env = True,
arguments = [ctx.outputs._libfile.basename],
command = "ar cr $1 %s" % " ".join( [onefile.basename
for onefile in out_file_list] )
)
pass
c_library = rule(
# define rule for 'c' library
implementation = _c_library_impl,
attrs = {
"srcs" : attr.label_list( allow_files = True,
mandatory = True,
allow_empty = False ),
"out" : attr.output( mandatory = False )
},
outputs = {
"_libfile" : "lib%{name}.a"
}
)
And here is my BUILD file:
load("//:rules.bzl", "c_library")
c_library(
name = "foo",
srcs = glob(include = ["*.c"], exclude = ["main.c"])
# there are two files 'cmd.c' and 'utils.c' in the package
)
When I did bazel build //:foo, I got the following error:
INFO: Found 1 target...
ERROR: /home/spyder/Desktop/project/BUILD:3:1: output 'cmd.o' was not created.
ERROR: /home/spyder/Desktop/project/BUILD:3:1: output 'utils.o' was not created.
ERROR: /home/spyder/Desktop/project/BUILD:3:1: not all outputs were created or valid.
Target //:foo failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 2.249s, Critical Path: 1.94s
How exactly to persist the intermediate files between two successive ctx.actions ?
You should create one action per .c file instead of one action for all of them, that will also increase parallelism, and then specified the output:
def _c_library_impl( ctx ):
# implementation of 'c_library' rule
out_file_list = []
for f in ctx.files.srcs:
o = ctx.new_file(f.basename + ".o")
out_file_list.append(o)
ctx.action(
inputs = [f],
outputs = [o],
progress_message = "COMPILING FROM <.c> TO <.o>",
use_default_shell_env = True,
command = "gcc -c -O3 %s %s" % (f.path, o.path)
)
ctx.action(
inputs = out_file_list,
outputs = [ ctx.outputs._libfile ],
progress_message = "ARCHIVING <.o>s to <.a>",
use_default_shell_env = True,
command = "ar cr %s %s" % (ctx.outputs._libfile.path,
"\n".join([onefile.basename
for onefile in out_file_list] )
)
I am new to pyspark and I am trying to create a simple udf that must take two input columns, check if the second column has a blank space and if so, split the first one into two values and overwritte the original columns. This is what I have done:
def split(x, y):
if x == "EXDRA" and y == "":
return ("EXT", "DCHA")
if x == "EXIZQ" and y == "":
return ("EXT", "IZDA")
udf_split = udf(split, ArrayType())
df = df \
.withColumn("x", udf_split(df['x'], df['y'])[1]) \
.withColumn("y", udf_split(df['x'], df['y'])[0])
But when I run this code I get the following error:
File "<stdin>", line 1, in <module>
TypeError: __init__() takes at least 2 arguments (1 given)
What am I doing wrong?
Thank you,
Álvaro
I'm not sure about what you are trying to do, but this is how I would do it from what I understood :
from pyspark.sql.types import *
from pyspark.sql.functions import udf, col
def split(x, y):
if x == "EXDRA" and y == "":
return ("EXT", "DCHA")
if x == "EXIZQ" and y == "":
return ("EXT", "IZDA")
schema = StructType([StructField("x1", StringType(), False), StructField("y1", StringType(), False)])
udf_split = udf(split, schema)
df = spark.createDataFrame([("EXDRA", ""), ("EXIZQ", ""), ("", "foo")], ("x", "y"))
df.show()
# +-----+---+
# | x| y|
# +-----+---+
# |EXDRA| |
# |EXIZQ| |
# | |foo|
# +-----+---+
df = df \
.withColumn("split", udf_split(df['x'], df['y'])) \
.withColumn("x", col("split.x1")) \
.withColumn("y", col("split.y1"))
df.printSchema()
# root
# |-- x: string (nullable = true)
# |-- y: string (nullable = true)
# |-- split: struct (nullable = true)
# | |-- x1: string (nullable = false)
# | |-- y1: string (nullable = false)
df.show()
# +----+----+----------+
# | x| y| split|
# +----+----+----------+
# | EXT|DCHA|[EXT,DCHA]|
# | EXT|IZDA|[EXT,IZDA]|
# |null|null| null|
# +----+----+----------+
Guess you have to define your udf as:
udf_split = udf(split, ArrayType(StringType()))
i am trying to automate composing email using AndroidViewClient 5.1.1 . please find the code below :
kwargs1 = {'verbose': False, 'ignoresecuredevice': False}
kwargs3 = {'startviewserver': True, 'forceviewserveruse': True, 'autodump': False, 'ignoreuiautomatorkilled': True}
device1, serialno1 = ViewClient.connectToDeviceOrExit(serialno=device_id1, **kwargs1)
vc2 = ViewClient(device1, serialno1, **kwargs3)
vc2.dump()
device1.startActivity(component="com.android.email/com.android.email.activity.EmailActivity")
vc2.dump()
compose = vc2.findViewById('id/compose')
compose.touch()
AVC is unable to identify the compose view . please help
Using devices with Android API >= 19 and AndroidViewClient >= 5.3.1 you will be able to obtain the View ids.
For example, if you use culebra to auto-generate the script
$ culebra -VC --start-activity='com.google.android.email/com.android.email2.ui.MailActivityEmail' -o myscript.py
Then, myscript.py will contain
#! /usr/bin/env python
# -*- coding: utf-8 -*-
'''
Copyright (C) 2013 Diego Torres Milano
Created on 2014-04-16 by Culebra v5.4.4
__ __ __ __
/ \ / \ / \ / \
____________________/ __\/ __\/ __\/ __\_____________________________
___________________/ /__/ /__/ /__/ /________________________________
| / \ / \ / \ / \ \___
|/ \_/ \_/ \_/ \ o \
\_____/--<
#author: Diego Torres Milano
#author: Jennifer E. Swofford (ascii art snake)
'''
import re
import sys
import os
from com.dtmilano.android.viewclient import ViewClient
kwargs1 = {'verbose': True, 'ignoresecuredevice': False}
device, serialno = ViewClient.connectToDeviceOrExit(**kwargs1)
device.startActivity(component='com.google.android.email/com.android.email2.ui.MailActivityEmail')
kwargs2 = {'startviewserver': True, 'forceviewserveruse': False, 'autodump': False, 'ignoreuiautomatorkilled': True}
vc = ViewClient(device, serialno, **kwargs2)
vc.dump(window='-1')
# class=android.widget.FrameLayout
no_id1 = vc.findViewByIdOrRaise("id/no_id/1")
# class=android.view.View
android___id_action_bar_overlay_layout = vc.findViewByIdOrRaise("android:id/action_bar_overlay_layout")
# class=android.widget.FrameLayout
android___id_action_bar_container = vc.findViewByIdOrRaise("android:id/action_bar_container")
# class=android.view.View
android___id_action_bar = vc.findViewByIdOrRaise("android:id/action_bar")
# class=android.widget.LinearLayout
no_id5 = vc.findViewByIdOrRaise("id/no_id/5")
# class=android.widget.FrameLayout
no_id6 = vc.findViewByIdOrRaise("id/no_id/6")
# class=android.widget.ImageView
android___id_up = vc.findViewByIdOrRaise("android:id/up")
# class=android.widget.ImageView
android___id_home = vc.findViewByIdOrRaise("android:id/home")
# class=android.widget.LinearLayout
no_id9 = vc.findViewByIdOrRaise("id/no_id/9")
# class=android.widget.TextView text=u'Inbox'
android___id_action_bar_title = vc.findViewByIdOrRaise("android:id/action_bar_title")
# class=android.widget.TextView text=u'999+ unread'
android___id_action_bar_subtitle = vc.findViewByIdOrRaise("android:id/action_bar_subtitle")
# class=android.widget.LinearLayout
no_id12 = vc.findViewByIdOrRaise("id/no_id/12")
# class=android.widget.TextView
com_android_email___id_compose = vc.findViewByIdOrRaise("com.android.email:id/compose")
# class=android.widget.TextView
com_android_email___id_search = vc.findViewByIdOrRaise("com.android.email:id/search")
# class=android.widget.ImageButton
no_id15 = vc.findViewByIdOrRaise("id/no_id/15")
# class=android.widget.FrameLayout
android___id_content = vc.findViewByIdOrRaise("android:id/content")
# class=android.view.View
no_id17 = vc.findViewByIdOrRaise("id/no_id/17")
# class=android.widget.FrameLayout
no_id18 = vc.findViewByIdOrRaise("id/no_id/18")
# class=android.widget.FrameLayout
com_android_email___id_content_pane = vc.findViewByIdOrRaise("com.android.email:id/content_pane")
# class=android.widget.RelativeLayout
com_android_email___id_between_chrome = vc.findViewByIdOrRaise("com.android.email:id/between_chrome")
# class=android.widget.FrameLayout
com_android_email___id_conversation_list = vc.findViewByIdOrRaise("com.android.email:id/conversation_list")
# class=android.widget.ListView
android___id_list = vc.findViewByIdOrRaise("android:id/list")
# class=android.widget.LinearLayout
no_id23 = vc.findViewByIdOrRaise("id/no_id/23")
# class=android.widget.LinearLayout
no_id24 = vc.findViewByIdOrRaise("id/no_id/24")
# class=android.widget.LinearLayout
com_android_email___id_nested_folder_container = vc.findViewByIdOrRaise("com.android.email:id/nested_folder_container")
# class=android.widget.RelativeLayout
no_id26 = vc.findViewByIdOrRaise("id/no_id/26")
# class=android.widget.ImageView
com_android_email___id_folder_imageView = vc.findViewByIdOrRaise("com.android.email:id/folder_imageView")
# class=android.widget.LinearLayout
com_android_email___id_text_layout = vc.findViewByIdOrRaise("com.android.email:id/text_layout")
# class=android.widget.TextView text=u'0'
com_android_email___id_count_textView = vc.findViewByIdOrRaise("com.android.email:id/count_textView")
# class=android.widget.LinearLayout
com_android_email___id_show_more_folders_row = vc.findViewByIdOrRaise("com.android.email:id/show_more_folders_row")
# class=android.widget.TextView text=u'Show 1 more folders'
com_android_email___id_show_more_folders_textView = vc.findViewByIdOrRaise("com.android.email:id/show_more_folders_textView")
# class=android.widget.TextView text=u'0'
com_android_email___id_show_more_folders_count_textView = vc.findViewByIdOrRaise("com.android.email:id/show_more_folders_count_textView")
# class=android.widget.FrameLayout
no_id34 = vc.findViewByIdOrRaise("id/no_id/34")
# class=android.view.View
no_id35 = vc.findViewByIdOrRaise("id/no_id/35")
# class=android.widget.FrameLayout
no_id36 = vc.findViewByIdOrRaise("id/no_id/36")
# class=android.view.View
no_id37 = vc.findViewByIdOrRaise("id/no_id/37")
# class=android.widget.FrameLayout
no_id38 = vc.findViewByIdOrRaise("id/no_id/38")
# class=android.view.View
no_id39 = vc.findViewByIdOrRaise("id/no_id/39")
# class=android.widget.FrameLayout
no_id40 = vc.findViewByIdOrRaise("id/no_id/40")
# class=android.view.View
no_id41 = vc.findViewByIdOrRaise("id/no_id/41")
# class=android.widget.FrameLayout
no_id42 = vc.findViewByIdOrRaise("id/no_id/42")
# class=android.view.View
no_id43 = vc.findViewByIdOrRaise("id/no_id/43")
# class=android.widget.FrameLayout
no_id44 = vc.findViewByIdOrRaise("id/no_id/44")
# class=android.view.View
no_id45 = vc.findViewByIdOrRaise("id/no_id/45")
Notice this has been obtained by AndroidViewClient 5.4.4 as it fixes some indentation problem in auto-generated scripts.
The Views are identified by the variable name created after their ids
com_android_email___id_compose = vc.findViewByIdOrRaise("com.android.email:id/compose")
Also notice the use of --start-activity to automatically start the Activity at the beginning of the script.