preflight
Preflight checks framework.
This framework is designed to automate verification and quality control
checks that need to be completed before model is published. The framework works
very similarly to unitchecks
module.
All preflight checks are subclassed from a base class and are recognized
automatically by the preflight module. Each test case, can perform setUp()
,
startTest()
, tearDown()
, and doCleanups()
.
Classes
PreflightCheck(extension, check_type, script_path)
Bases: object
Preflight Check.
Source code in pyrevitlib/pyrevit/preflight/__init__.py
Attributes
check_case = check_type
instance-attribute
name = getattr(self.check_case, 'name', None) or _get_check_name(script_path)
instance-attribute
script_path = script_path
instance-attribute
extension = extension.name
instance-attribute
author = getattr(self.check_case, 'author', None)
instance-attribute
subtitle = desc_lines[0]
instance-attribute
description = '\n'.join([x.strip() for x in desc_lines[1:]])
instance-attribute
Functions
run_preflight_check(check, doc, output)
Run a preflight check.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
check |
PreflightCheck
|
preflight test case object |
required |
doc |
Document
|
Revit document |
required |
output |
PyRevitOutputWindow
|
output window wrapper |
required |
Source code in pyrevitlib/pyrevit/preflight/__init__.py
get_all_preflight_checks()
Find all the preflight checks in installed extensions.