Skip to content

Commit

Permalink
Squashed 'modules/rmf/dependency/RMF/' changes from e812ce3e2a..8e289…
Browse files Browse the repository at this point in the history
…687e5

8e289687e5 Don't report an exception at end-of-file
1c6c503662 Make sure files get closed
60aaa406d2 Fix path to Python binary
6e351ae3f1 Allow for any version of doxygen
f89d80d1a3 Fix unmatched group
f3816b37c0 Remove some obsolete tags
05a9dc96b4 Fix flake8 issues
0c59e5eca2 Fix typos
d73f857f60 Add script to check spelling
8cd2a6191f Don't catch polymorphic type by value

git-subtree-dir: modules/rmf/dependency/RMF
git-subtree-split: 8e289687e5fea593d9f87972ee78230871833262
  • Loading branch information
benmwebb committed Nov 10, 2024
1 parent f164653 commit 4390929
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 110 deletions.
7 changes: 5 additions & 2 deletions modules/rmf/dependency/RMF/bin/rmf3_dump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,11 @@ int main(int argc, char** argv) {
std::cout << std::endl;
}
}
catch (std::exception e) {
std::cerr << "Caught exception " << e.what() << std::endl;
catch (const std::exception &e) {
// avro uses a plain exception to signal EOF
if (std::string(e.what()) != "EOF reached") {
std::cerr << "Caught exception " << e.what() << std::endl;
}
}
return 0;
}
Expand Down
13 changes: 3 additions & 10 deletions modules/rmf/dependency/RMF/cmake_modules/FindCurrentDoxygen.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,11 @@ message(STATUS "Python xml.etree not found, docs disabled.")
set(IMP_DOXYGEN_EXECUTABLE "${DOXYGEN_EXECUTABLE}" CACHE INTERNAL "")
else()
find_package(Doxygen QUIET)
set(needed_doxygen_version "1.8.6")
if(DOXYGEN_FOUND)
imp_get_process_output("Doxygen version" doxygen_version ${CMAKE_BINARY_DIR} COMMAND ${DOXYGEN_EXECUTABLE} --version)
if("${doxygen_version}" STREQUAL "${needed_doxygen_version}")
message(STATUS "Doxygen is ${DOXYGEN_EXECUTABLE}, version ${doxygen_version}")
set(IMP_DOXYGEN_FOUND True CACHE INTERNAL "")
set(IMP_DOXYGEN_EXECUTABLE ${DOXYGEN_EXECUTABLE} CACHE INTERNAL "")
else()
message(STATUS "Wrong doxygen version at ${DOXYGEN_EXECUTABLE}. Found ${doxygen_version}, but needed ${needed_doxygen_version}")
set(IMP_DOXYGEN_FOUND False CACHE INTERNAL "")
set(IMP_DOXYGEN_EXECUTABLE "not-found" CACHE INTERNAL "")
endif()
message(STATUS "Doxygen is ${DOXYGEN_EXECUTABLE}, version ${doxygen_version}")
set(IMP_DOXYGEN_FOUND True CACHE INTERNAL "")
set(IMP_DOXYGEN_EXECUTABLE ${DOXYGEN_EXECUTABLE} CACHE INTERNAL "")
else()
message(STATUS "Doxygen not found")
endif(DOXYGEN_FOUND)
Expand Down
75 changes: 0 additions & 75 deletions modules/rmf/dependency/RMF/doc/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -226,12 +226,6 @@ ALIASES = "command{1}=\code \1 \endcode" \
"rmfattributetable_end=</table>" \
"rmfattribute{4}=<tr><td><tt>\1</tt></td><td>\2</td><td>\3</td><td>\4</td></tr>"

# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding "class=itcl::class"
# will allow you to use the command class in the itcl::class meaning.

TCL_SUBST =

# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
# only. Doxygen will then generate output that is more tailored for C. For
# instance, some of the names that are used will be different. The list of all
Expand Down Expand Up @@ -1004,13 +998,6 @@ VERBATIM_HEADERS = YES

ALPHABETICAL_INDEX = YES

# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
# which the alphabetical index list will be split.
# Minimum value: 1, maximum value: 20, default value: 5.
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.

COLS_IN_ALPHA_INDEX = 5

# In case all classes in a project start with a common prefix, all classes will
# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
# can be used to specify a prefix (or a list of prefixes) that should be ignored
Expand Down Expand Up @@ -1413,17 +1400,6 @@ EXT_LINKS_IN_WINDOW = NO

FORMULA_FONTSIZE = 10

# Use the FORMULA_TRANPARENT tag to determine whether or not the images
# generated for formulas are transparent PNGs. Transparent PNGs are not
# supported properly for IE 6.0, but are supported on all modern browsers.
#
# Note that when changing this option you need to delete any form_*.png files in
# the HTML output directory before the changes have effect.
# The default value is: YES.
# This tag requires that the tag GENERATE_HTML is set to YES.

FORMULA_TRANSPARENT = YES

# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
# http://www.mathjax.org) which uses client side Javascript for the rendering
# instead of using prerendered bitmaps. Use this if you do not have LaTeX
Expand Down Expand Up @@ -1602,15 +1578,6 @@ MAKEINDEX_CMD_NAME = makeindex

COMPACT_LATEX = NO

# The PAPER_TYPE tag can be used to set the paper type that is used by the
# printer.
# Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x
# 14 inches) and executive (7.25 x 10.5 inches).
# The default value is: a4.
# This tag requires that the tag GENERATE_LATEX is set to YES.

PAPER_TYPE = a4wide

# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
# that should be included in the LaTeX output. To get the times font for
# instance you can specify
Expand Down Expand Up @@ -1686,16 +1653,6 @@ LATEX_BATCHMODE = YES

LATEX_HIDE_INDICES = NO

# If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source
# code with syntax highlighting in the LaTeX output.
#
# Note that which sources are shown also depends on other settings such as
# SOURCE_BROWSER.
# The default value is: NO.
# This tag requires that the tag GENERATE_LATEX is set to YES.

LATEX_SOURCE_CODE = NO

# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
# bibliography, e.g. plainnat, or ieeetr. See
# http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
Expand Down Expand Up @@ -2016,12 +1973,6 @@ EXTERNAL_GROUPS = NO

EXTERNAL_PAGES = YES

# The PERL_PATH should be the absolute path and name of the perl script
# interpreter (i.e. the result of 'which perl').
# The default file (with absolute path) is: /usr/bin/perl.

PERL_PATH = /usr/bin/perl

#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
Expand All @@ -2035,15 +1986,6 @@ PERL_PATH = /usr/bin/perl

CLASS_DIAGRAMS = YES

# You can define message sequence charts within doxygen comments using the \msc
# command. Doxygen will then run the mscgen tool (see:
# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
# documentation. The MSCGEN_PATH tag allows you to specify the directory where
# the mscgen tool resides. If left empty the tool is assumed to be found in the
# default search path.

MSCGEN_PATH =

# You can include diagrams made with dia in doxygen documentation. Doxygen will
# then run dia to produce the diagram and insert it in the documentation. The
# DIA_PATH tag allows you to specify the directory where the dia binary resides.
Expand Down Expand Up @@ -2076,23 +2018,6 @@ HAVE_DOT = YES

DOT_NUM_THREADS = 0

# When you want a differently looking font n the dot files that doxygen
# generates you can specify the font name using DOT_FONTNAME. You need to make
# sure dot is able to find the font, which can be done by putting it in a
# standard location or by setting the DOTFONTPATH environment variable or by
# setting DOT_FONTPATH to the directory containing the font.
# The default value is: Helvetica.
# This tag requires that the tag HAVE_DOT is set to YES.

DOT_FONTNAME =

# The DOT_FONTSIZE tag can be used to set the size (in points) of the font of
# dot graphs.
# Minimum value: 4, maximum value: 24, default value: 10.
# This tag requires that the tag HAVE_DOT is set to YES.

DOT_FONTSIZE = 10

# By default doxygen will tell dot to use the default font as specified with
# DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set
# the path where dot can find it using this tag.
Expand Down
2 changes: 1 addition & 1 deletion modules/rmf/dependency/RMF/doc/Viewing.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ There are currently several molecular viewers that support RMFs:
# Chimera # {#chimera}

The [Chimera](https://www.cgl.ucsf.edu/chimera/) research group has
provided support for loading and interacing with RMF files. Chimera
provided support for loading and interacting with RMF files. Chimera
supports
- interactive display of restraints and restraint scores
- geometry
Expand Down
39 changes: 21 additions & 18 deletions modules/rmf/dependency/RMF/doc/dot
Original file line number Diff line number Diff line change
@@ -1,36 +1,39 @@
#!/usr/bin/env python
#!/usr/bin/env python3

"""Tidy up .dot files to remove links to internal headers and full path names"""
"""Tidy up .dot files to remove links to internal headers and
full path names"""

import sys
import os
import re

labelre = re.compile('\s*Node(\d+)\s+\[label="[^"]*internal[^"]*"')
stripre = re.compile('(\s*Node\d+\s+\[label=")[^"]*include/(.*)$')
linkre = re.compile('\s*Node(\d+)\s+\->Node(\d+)\s+')
labelre = re.compile(r'\s*Node(\d+)\s+\[label="[^"]*internal[^"]*"')
stripre = re.compile(r'(\s*Node\d+\s+\[label=")[^"]*include/(.*)$')
linkre = re.compile(r'\s*Node(\d+)\s+\->Node(\d+)\s+')

# Get a dict of all nodes that correspond to internal headers
nodes_to_remove = {}
file_contents = open(sys.argv[1]).readlines()
with open(sys.argv[1]) as fh:
file_contents = fh.readlines()
for line in file_contents:
m = labelre.match(line)
if m:
nodes_to_remove[m.group(1)] = None

# Rewrite the .dot file
fh = open(sys.argv[1], 'w')
for line in file_contents:
# Remove any nodes corresponding to internal headers, and links between them
m = labelre.match(line)
if m and m.group(1) in nodes_to_remove:
continue
m = linkre.match(line)
if m and (m.group(1) in nodes_to_remove or m.group(2) in nodes_to_remove):
continue
# Strip out full paths (sometimes doxygen lets these slip through)
fh.write(stripre.sub(r'\1\2', line))
fh.close()
with open(sys.argv[1], 'w') as fh:
for line in file_contents:
# Remove any nodes corresponding to internal headers,
# and links between them
m = labelre.match(line)
if m and m.group(1) in nodes_to_remove:
continue
m = linkre.match(line)
if m and (m.group(1) in nodes_to_remove
or m.group(2) in nodes_to_remove):
continue
# Strip out full paths (sometimes doxygen lets these slip through)
fh.write(stripre.sub(r'\1\2', line))

# Now pass control to the real 'dot' binary
sys.argv[0] = 'dot'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ RMF_ENABLE_WARNINGS
namespace RMF {
namespace HDF5 {

/** Wrap an gettings the attributes from an HDF5 Object. Each data set or
/** Wrap getting the attributes from an HDF5 Object. Each data set or
group can have associated data. These data should be relatively small
(a few k at most). See MutableAttributes for the methods to change
the attribute data.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,13 @@ RMF_ENABLE_WARNINGS

//! Implement a hash function for the class
#define RMF_HASHABLE(name, hashret)
/** @} */
#else

#define RMF_HASHABLE(name, hashret) \
std::size_t __hash__() const { hashret; }

#endif

/** @} */

#ifdef SWIG
#define RMF_SHOWABLE(Name, streamed) \
std::string __str__() const { \
Expand Down
2 changes: 2 additions & 0 deletions modules/rmf/dependency/RMF/tools/codespell.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
codespell . --skip="*.pdb,*.rmf,*.rmf3,*.buf,molfile_plugin.h,./src/avrocpp/*" -L assertIn

0 comments on commit 4390929

Please sign in to comment.