def main(args): if len(args) != 2: print( "Must be given one argument: the path to the libSBML src/sbml dir") sys.exit(1) doxygen_classes = find_classes(args[1], cplusplus=False, swig_too=True, enums_too=False) cplusplus_classes = find_classes(args[1], cplusplus=True, swig_too=True, enums_too=False) diff_doxygen = set(doxygen_classes) - set(cplusplus_classes) diff_cplusplus = set(cplusplus_classes) - set(doxygen_classes) if len(diff_doxygen) <= 0 and len(diff_cplusplus) <= 0: return print("") print("*" * 79) print("Warning: differences found in actual vs. documented classes.") if len(diff_cplusplus) > 0: print("The following public classes lack doxygen declarations:") print("Missing: " + "\nMissing: ".join(sorted(diff_cplusplus))) if len(diff_doxygen) > 0: print("The following have doxygen declarations but are not public:") print("Extra: " + "\nExtra: ".join(sorted(diff_doxygen))) print("*" * 79) print("")
def main(args): if len(args) != 2: print ("Must be given one argument: the path to the libSBML src/sbml dir") sys.exit(1) doxygen_classes = find_classes(args[1], cplusplus=False, swig_too=True, enums_too=False) cplusplus_classes = find_classes(args[1], cplusplus=True, swig_too=True, enums_too=False) diff_doxygen = set(doxygen_classes) - set(cplusplus_classes) diff_cplusplus = set(cplusplus_classes) - set(doxygen_classes) if len(diff_doxygen) <= 0 and len(diff_cplusplus) <= 0: return print("") print("*"*79) print("Warning: differences found in actual vs. documented classes.") if len(diff_cplusplus) > 0: print("The following public classes lack doxygen declarations:") print("Missing: " + "\nMissing: ".join(sorted(diff_cplusplus))) if len(diff_doxygen) > 0: print("The following have doxygen declarations but are not public:") print("Extra: " + "\nExtra: ".join(sorted(diff_doxygen))) print("*"*79) print("")
def main(args): if len(args) != 2: print "Must be given one argument: the path to the package source dir" sys.exit(1) src_dir = args[1] # First, write out an informative file header. print header_template # Next, write out the .pkg-color-x CSS classes: for entry in color_table: print pkg_style_template.format(entry[0], entry[1], entry[2], entry[3]) # Next, read the source dir to find out the L3 packages available, and # extract the names of the libSBML object classes in each package. known_pkgs = [entry[0] for entry in color_table] top_root, top_level_dirs, top_level_files = os.walk(src_dir).next() found_pkgs = [pkg for pkg in known_pkgs if pkg in top_level_dirs] # Now generate CSS styling that uses attribute selectors specialized to # our Javadoc output. These styles are ignored by our Doxygen output # (because the CSS code doesn't match anything there), so technically we # could split this into a separate file for Javadoc-only styling, but # it's easier to write all our package CSS code into one file. for pkg in found_pkgs: print pkg_separator_template.format(pkg) color = next(entry for entry in color_table if entry[0] == pkg) classes = find_classes(os.path.join(src_dir, pkg)) last = classes[-1] # There is a spectacularly obscure bug in Safari that necessitates # first writing CSS rules that use the same attribute selectors we # use later, but without using pseudo elements. Here, we output a # benign bit of CSS that doesn't change anything. See # http://stackoverflow.com/a/8988418/743730 for c in classes: comma = (',' if c != last else '') print '.FrameItemFont a[href$="{}.html"]{}'.format(c, comma) print safari_bugfix_template # With that out of the way, we can write the real CSS. for c in classes: comma = (',' if c != last else '') print '.FrameItemFont a[href$="{}.html"]:before{}'.format(c, comma) print before_template.format(pkg, color[1], color[2], color[3]) for c in classes: comma = (',' if c != last else '') print '.FrameItemFont a[href$="{}.html"]:after{}'.format(c, comma) print after_template.format(pkg, color[1], color[2], color[3]) # A final bit of styling for Doxygen output. print '/* Styles for page headings and "Level 3 Extensions" section. */\n' for entry in color_table: print '.title .ingroups a[href="group__{}.html"]:after,'.format(entry[0]) print '#navrow2 ul.tablist li a[href="group__{}.html"]:after,'.format(entry[0]) print '.contents ul li a[href="group__{}.html"]:after'.format(entry[0]) print after_template.format(entry[0], entry[1], entry[2], entry[3])
def main(args): if len(args) != 2: print "Must be given one argument: the path to the libSBML src/sbml dir" sys.exit(1) classes = [re.sub('_t', '', c) for c in find_classes(args[1], True)] for c in sorted(set(classes)): print c
def main(args): if len(args) != 2: print ("Must be given one argument: the path to the libSBML src/sbml dir") sys.exit(1) classes = [re.sub('_t', '', c) for c in find_classes(args[1], True)] try: for c in sorted(set(classes)): print (c) except (NameError,): classes.sort() for c in classes: print (c)
def main(args): if len(args) != 2: print( "Must be given one argument: the path to the libSBML src/sbml dir") sys.exit(1) classes = [re.sub('_t', '', c) for c in find_classes(args[1], True)] try: for c in sorted(set(classes)): print(c) except (NameError, ): classes.sort() for c in classes: print(c)
def main(args): if len(args) != 2: print ("Must be given one argument: the path to the libSBML src/sbml dir") sys.exit(1) classes = [] try: classes = find_classes(args[1], swig_too=True) for c in sorted(set(classes)): print (c) except (NameError,): if classes: classes.sort() for c in classes: print (c)
def main(args): if len(args) != 2: print("Must be given one argument: the path to the package source dir") sys.exit(1) src_dir = args[1] # First, write out an informative file header. print(header_template) # Next, write out the .pkg-color-x CSS classes: for entry in color_table: print(pkg_style_template.format(entry[0], entry[1], entry[2], entry[3])) # Next, write rules for general references to the summary pages for packages. print('/* Styles for references to the package summary pages. */\n') for entry in color_table: print('p a.el[href="group__{}.html"]'.format(entry[0])) print(group_page_ref_template) # Next, read the source dir to find out the L3 packages available, and # extract the names of the libSBML object classes in each package. known_pkgs = [entry[0] for entry in color_table] top_root, top_level_dirs, top_level_files = os.walk(src_dir).next() found_pkgs = [pkg for pkg in known_pkgs if pkg in top_level_dirs] # Now generate CSS styling that uses attribute selectors specialized to # our Javadoc output. These styles are ignored by our Doxygen output # (because the CSS code doesn't match anything there), so technically we # could split this into a separate file for Javadoc-only styling, but # it's easier to write all our package CSS code into one file. for pkg in found_pkgs: print(pkg_separator_template.format(pkg)) color = next(entry for entry in color_table if entry[0] == pkg) classes = find_classes(os.path.join(src_dir, pkg), enums_too=False) last = classes[-1] # There is a spectacularly obscure bug in Safari that necessitates # first writing CSS rules that use the same attribute selectors we # use later, but without using pseudo elements. Here, we output a # benign bit of CSS that doesn't change anything. See # http://stackoverflow.com/a/8988418/743730 for c in classes: comma = (',' if c != last else '') # This next format works for Javadoc version 1.6: print('.FrameItemFont a[href$="{}.html"]{}'.format(c, comma)) # This next format works for Javadoc versions after version 1.6: print('.indexContainer a[href$="{}.html"]{}'.format(c, comma)) print(safari_bugfix_template) # With that out of the way, we can write the real CSS. for c in classes: comma = (',' if c != last else '') # This next format works for Javadoc version 1.6: print('.FrameItemFont a[href$="{}.html"]:before{}'.format( c, comma)) # This next format works for Javadoc versions after version 1.6: print('.indexContainer a[href$="{}.html"]:before{}'.format( c, comma)) print(before_template.format(pkg, color[1], color[2], color[3])) for c in classes: comma = (',' if c != last else '') # This next format works for Javadoc version 1.6: print('.FrameItemFont a[href$="{}.html"]:after{}'.format(c, comma)) # This next format works for Javadoc versions after version 1.6: print('.indexContainer a[href$="{}.html"]:after{}'.format( c, comma)) print(after_template.format(pkg, color[1], color[2], color[3])) # A final bit of styling for Doxygen output. print('/* Styles for page headings and "Level 3 Extensions" section. */\n') for entry in color_table: print('.title .ingroups a[href="group__{}.html"]:after,'.format( entry[0])) print('#navrow2 ul.tablist li a[href="group__{}.html"]:after,'.format( entry[0])) print('.contents ul li a[href="group__{}.html"]:after'.format( entry[0])) print(after_template.format(entry[0], entry[1], entry[2], entry[3]))