Nektar++
|
Classes | |
class | CellMLValidator |
class | LxmlRelaxngValidator |
class | RvpRelaxngValidator |
class | ValidatorError |
Functions | |
def | quit |
def del(self): """ Tell our RVP process to quit. More... | |
def | validate |
def | get_validation_errors |
def | _error_found |
def | _start_tag_open |
def | _attribute |
def | _start_tag_close |
def | _end_tag |
def | _textonly |
def | _mixed |
def | _start |
def | _send |
def | _recv |
def | _resp |
def | _flush_text |
def | _start_element |
def | _end_element |
def | _characters |
def | check_repo |
Convenience functions #. More... | |
def | compare_output_files |
def | get_options |
For running as an executable #. More... | |
def | run |
Variables | |
tuple | pycml_path = os.path.dirname(os.path.realpath(__file__)) |
string | __version__ = "$Revision: 25790 $" |
string | profile_name = '/tmp/pycml-profile-%f-%d' |
_text | |
_error_messages | |
_prevcol | |
_pat | |
_parser | |
_errors | |
_ismixed | |
|
private |
Definition at line 339 of file validator.py.
|
private |
Definition at line 432 of file validator.py.
References CellMLToNektar.validator.check_repo().
|
private |
Definition at line 428 of file validator.py.
|
private |
Definition at line 345 of file validator.py.
|
private |
Definition at line 330 of file validator.py.
|
private |
Apparently Expat doesn't concatenate text nodes, so we do it manually; the CharDataHandler collects the text, and this method passes it to the validator.
Definition at line 408 of file validator.py.
|
private |
In mixed content, whitespace is discarded, and any non-whitespace is counted as equal.
Definition at line 351 of file validator.py.
|
private |
Receive a zero-terminated response from RVP; drop zero byte.
Definition at line 371 of file validator.py.
|
private |
Get a reply from RVP. If an error occurs, log the message. Return the current pattern value.
Definition at line 382 of file validator.py.
|
private |
Terminate string with zero, encode in UTF-8 and send to RVP.
Definition at line 366 of file validator.py.
|
private |
Definition at line 361 of file validator.py.
|
private |
Definition at line 420 of file validator.py.
|
private |
Definition at line 342 of file validator.py.
|
private |
Definition at line 336 of file validator.py.
|
private |
Definition at line 348 of file validator.py.
def CellMLToNektar.validator.check_repo | ( | repo_dir = '../../models/all_from_repository' , |
|
model_suffix = 'xml' , |
|||
invalid_if_warnings = False , |
|||
compare = True |
|||
) |
Convenience functions #.
Validate every model in the CellML repository, and return a list of invalid models. If compare is False, writes errors & warnings to log files in the same folder as the models, otherwise compares the output to log files already present, and notes differences. Displays total run time.
Definition at line 447 of file validator.py.
References CellMLToNektar.validator.compare_output_files().
Referenced by CellMLToNektar.validator._characters().
def CellMLToNektar.validator.compare_output_files | ( | new_stream, | |
old_filename | |||
) |
def CellMLToNektar.validator.get_options | ( | args | ) |
For running as an executable #.
get_options(args): Process our command-line options. args is a list of options & positional arguments.
Definition at line 554 of file validator.py.
Referenced by CellMLToNektar.validator.run().
def CellMLToNektar.validator.get_validation_errors | ( | self | ) |
Return the list of all errors found while validating the current file.
Definition at line 323 of file validator.py.
def CellMLToNektar.validator.quit | ( | self | ) |
def del(self): """ Tell our RVP process to quit.
This doesn't work well, since del isn't necessarily called at program exit. Hence, there is a manual quit() method. """ self.quit()
Call this method when the validator is finished with. It terminates the associated RVP process cleanly. Failure to do so will probably result in an error when your program exits.
Definition at line 288 of file validator.py.
def CellMLToNektar.validator.run | ( | ) |
Definition at line 610 of file validator.py.
References CellMLToNektar.utilities.close_output_stream(), CellMLToNektar.validator.get_options(), and CellMLToNektar.utilities.open_output_stream().
def CellMLToNektar.validator.validate | ( | self, | |
stream | |||
) |
Validate an XML document, returning a boolean. stream should be a file-like object containing the document to be validated. Returns True iff the document was valid.
Definition at line 296 of file validator.py.
string CellMLToNektar.validator.__version__ = "$Revision: 25790 $" |
Definition at line 56 of file validator.py.
CellMLToNektar.validator._error_messages |
Definition at line 305 of file validator.py.
CellMLToNektar.validator._errors |
Definition at line 318 of file validator.py.
CellMLToNektar.validator._ismixed |
Definition at line 421 of file validator.py.
CellMLToNektar.validator._parser |
Definition at line 313 of file validator.py.
CellMLToNektar.validator._pat |
Definition at line 307 of file validator.py.
CellMLToNektar.validator._prevcol |
Definition at line 306 of file validator.py.
CellMLToNektar.validator._text |
Definition at line 304 of file validator.py.
string CellMLToNektar.validator.profile_name = '/tmp/pycml-profile-%f-%d' |
Definition at line 669 of file validator.py.
tuple CellMLToNektar.validator.pycml_path = os.path.dirname(os.path.realpath(__file__)) |
Definition at line 49 of file validator.py.