pyrosetta_documentarian package

Submodules

Module contents

class pyrosetta_documentarian.Documentarian(target: pyrosetta.rosetta.protocols.moves.Mover)[source]

Bases: pyrosetta_documentarian.attributes.AttributeDocumentarian, pyrosetta_documentarian.xml.XMLDocumentarian, pyrosetta_documentarian.comment.CommentDocumentarian

A class to help reverse engineer what a Pyrosetta class does.

__init__(target: pyrosetta.rosetta.protocols.moves.Mover)

Reads the C++ header file and does a crude extraction of comments.

_get_root_of_xml(soup: bs4.BeautifulSoup)
_make_table(case: Dict[str, Any], ref: Dict[str, Any]) pandas.core.frame.DataFrame
_mover_directory = {}

all the filenmaes that have a given mover.

_parse_line(line: str) None
_parse_method_line(line)
_xmlfilenames = []

all the xml files in the test folder

_xmlprotocols = {}

all the protocols of the the filesnames (fails!)

property access
property arguments
property base: Tuple[object]

The tuple of classes inherited (__mro__)

Return type

Tuple[object]

property citation: str
property comments
compare(reference: Optional[pyrosetta.rosetta.protocols.moves.Mover] = None) pandas.core.frame.DataFrame

Tests the methods (see test() and compares them to a generic instance or to reference if provided.

compare_uninherited(reference: Optional[pyrosetta.rosetta.protocols.moves.Mover] = None) pandas.core.frame.DataFrame

Tests the uninherited methods (see test() and compares them to a generic instance or to reference if provided.

describe(iterable: Optional[Sequence[str]] = None) None

Describe attributes by calling help. If iterable is provided, it will print only those.

classmethod fill()

Fill the class attribute _mover_directory with the json info. This may not be up to date. For an up to date version, see ``.get_relevant_scripts() ``

classmethod generic()
get_filternames_from_xmlfilename(xmlfilename: str) List[str]
get_header_filename(target: Optional[pyrosetta.rosetta.protocols.moves.Mover] = None) str

C++ code is normally split into header files (.hh) or implementation files (.cpp/.cc). Namely, a class is declared in the former and the code is filled in the latter.

get_implemenatation_filename(target: Optional[pyrosetta.rosetta.protocols.moves.Mover] = None) str

C++ code is normally split into header files (.hh) or implementation files (.cpp/.cc). Namely, a class is declared in the former and the code is filled in the latter.

get_mover_from_script(xmlfilename: str, target: Optional[Union[pyrosetta.rosetta.protocols.moves.Mover, str]] = None) pyrosetta.rosetta.protocols.moves.Mover

Get the mover from the script xmlfilename of the same type as target (mover or mover name) If omitted xml_documentarian.target is used.

Parameters
  • xmlfilename

  • target

Returns

get_movernames_from_xmlfilename(xmlfilename: str) List[str]
get_movers_in_protocol(protocol: pyrosetta.rosetta.protocols.rosetta_scripts.ParsedProtocol)
get_relevant_scripts() List[str]

Get the paths of the XML test scripts that use the given mover.

Returns

get_src_filename(target: Optional[pyrosetta.rosetta.protocols.moves.Mover] = None, header=True) str
load_xmlfilename(xmlfilename: str)
property mover_directory

This is a dictionary associates a mover name with a list of files that use it. This can be used with

parse_comments() None

Fills the attributes .comments (dict), .arguments and access.

rosetta_folder = 'rosetta'
src_folder = 'main/source/src'
test(iterable: Optional[Sequence[str]] = None, silent: bool = True) Dict[str, Any]

Calls without arguments the methods. If iterable is provided, it will call only those. Returns a dictionary of the results.

test_folder = 'main/tests/integration/tests'
test_uninherited(silent: bool = True) dict

Calls without arguments the methods that where not inherited.

property uninherited: Set[str]

The set of attributes that are absent in the parent class. Has no idea if other were overwritten though!

Return type

Set[str]

property xmlfilenames
property xmlprotocols