Skip to content

Commit

Permalink
Exclude PMI1 from doxygen docs
Browse files Browse the repository at this point in the history
Don't document IMP.pmi1 as we should not be
using this module in any new applications,
and most of its classes shadow PMI classes.
  • Loading branch information
benmwebb committed Nov 7, 2024
1 parent f6c15b4 commit f164653
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
3 changes: 2 additions & 1 deletion tools/build/doxygen_add_ref_nav.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ def get_module_readme(module):

def main():
source = sys.argv[1]
modules = [m[0] for m in tools.get_modules(source)]
# Exclude obsolete modules
modules = [m[0] for m in tools.get_modules(source) if m[0] != 'pmi1']
docs = Docs(xml_dir='doxygen/ref/xml',
html_dir='doc/ref',
top_source_dir=source,
Expand Down
4 changes: 2 additions & 2 deletions tools/build/doxygen_templates/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ EXCLUDE_SYMLINKS = NO

# We really want _[a-zA-Z]* here (because we don't want to hide things
# # like __init__) but doxygen patterns aren't that flexible
EXCLUDE_PATTERNS = */internal/* */_*/* */_a* */_b* */_c* */_d* */_e* */_f* */_g* */_h* */_i* */_j* */_k* */_l* */_m* */_n* */_o* */_p* */_q* */_r* */_s* */_t* */_u* */_v* */_w* */_x* */_y* */_z* */_A* */_B* */_C* */_D* */_E* */_F* */_G* */_H* */_I* */_J* */_K* */_L* */_M* */_N* */_O* */_P* */_Q* */_R* */_S* */_T* */_U* */_V* */_W* */_X* */_Y* */_Z* @EXCLUDE_PATTERNS@
EXCLUDE_PATTERNS = */internal/* */pmi1/* */pmi1.h */IMP_pmi1.dox */_*/* */_a* */_b* */_c* */_d* */_e* */_f* */_g* */_h* */_i* */_j* */_k* */_l* */_m* */_n* */_o* */_p* */_q* */_r* */_s* */_t* */_u* */_v* */_w* */_x* */_y* */_z* */_A* */_B* */_C* */_D* */_E* */_F* */_G* */_H* */_I* */_J* */_K* */_L* */_M* */_N* */_O* */_P* */_Q* */_R* */_S* */_T* */_U* */_V* */_W* */_X* */_Y* */_Z* @EXCLUDE_PATTERNS@

# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
# (namespaces, classes, functions, etc.) that should be excluded from the
Expand All @@ -738,7 +738,7 @@ EXCLUDE_PATTERNS = */internal/* */_*/* */_a* */_b* */_c* */_d* */_e* */_f*

# We really want _[a-zA-Z]* here (because we don't want to hide things
# like __init__) but doxygen patterns aren't that flexible
EXCLUDE_SYMBOLS = _a* _b* _c* _d* _e* _f* _g* _h* _i* _j* _k* _l* _m* _n* _o* _p* _q* _r* _s* _t* _u* _v* _w* _x* _y* _z* _A* _B* _C* _D* _E* _F* _G* _H* _I* _J* _K* _L* _M* _N* _O* _P* _Q* _R* _S* _T* _U* _V* _W* _X* _Y* _Z*
EXCLUDE_SYMBOLS = _a* _b* _c* _d* _e* _f* _g* _h* _i* _j* _k* _l* _m* _n* _o* _p* _q* _r* _s* _t* _u* _v* _w* _x* _y* _z* _A* _B* _C* _D* _E* _F* _G* _H* _I* _J* _K* _L* _M* _N* _O* _P* _Q* _R* _S* _T* _U* _V* _W* _X* _Y* _Z* IMP::pmi1

# The EXAMPLE_PATH tag can be used to specify one or more files or
# directories that contain example code fragments that are included (see
Expand Down
8 changes: 7 additions & 1 deletion tools/build/setup_doxygen_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def get_output_file_contents(self, output):
"doxygen/manual-tags.xml=../manual")
doxygen = doxygen.replace("@XML_OUTPUT@", "doxygen/ref/xml/")
doxygen = doxygen.replace("@EXCLUDE@",
"lib/IMP/kernel lib/IMP/base")
"lib/IMP/pmi1")
doxygen = doxygen.replace("@NAME@", "IMP")
doxygen = doxygen.replace("@IMP_SOURCE_PATH@", source) \
.replace("@VERSION@", version)
Expand All @@ -97,6 +97,9 @@ def get_output_file_contents(self, output):
inputsh = ["doxygen/generated", source + "/doc/ref",
"include", "doc/examples", "lib/IMP"]
for m, p in tools.get_modules(source):
# Don't document obsolete modules
if m == 'pmi1':
continue
doc = os.path.join(p, "doc")
if os.path.exists(doc):
inputsh.append(doc + "/")
Expand All @@ -123,6 +126,9 @@ def generate_overview_pages(source):
IMP modules provide a number of command line tools.
These are listed below under their parent module:""")
for bs, g in tools.get_modules(source):
# Don't document obsolete modules
if bs == 'pmi1':
continue
if tools.get_module_info(bs, '')['ok']:
with open(os.path.join("build_info", "IMP_%s.pck" % bs),
'rb') as fh:
Expand Down

0 comments on commit f164653

Please sign in to comment.