The documentation for the components, as a dict

        :returns dict -- values are the generation samplerate, and a list of 
                         the individual component docs
550693
def componentDoc(self, starttime=True):
        
        samplerate = self.samplerate()
        doc_list = []
        for row, track in enumerate(self._segments):
            start_time = 0
            for col, component in enumerate(track):
                info = component.stateDict()
                info['stim_type'] = component.name
                if starttime:
                    info['start_s'] = start_time
                info['index'] = (row, col)
                start_time += info['duration']
                doc_list.append(info)
                
        return {'samplerate_da':samplerate, 'components' : doc_list}
888600
def sample_all(generators, *args, **kwargs):
	''''''
	return [sample(gen, *args, **kwargs) for gen in  generators]
908503
def info(self):
        
        return {
            'key': self.key,
            'processor': self.processor,
            'extractor': self.extractor,
            'output_path': self.output_path,
            'output_format': self.output_format,
            'template': self.template,
            'type': type(self)
        }
410804
def generate_json_artifacts(app, pagename, templatename, context, doctree):
    
    try:
        # We need to get the output directory where the docs are built
        # _build/json.
        build_json = os.path.abspath(
            os.path.join(app.outdir, '..', 'json')
        )
        outjson = os.path.join(build_json, pagename + '.fjson')
        outdir = os.path.dirname(outjson)
        if not os.path.exists(outdir):
            os.makedirs(outdir)
        with open(outjson, 'w+') as json_file:
            to_context = {
                key: context.get(key, '')
                for key in KEYS
            }
            json.dump(to_context, json_file, indent=4)
    except TypeError:
        log.exception(
            'Fail to encode JSON for page {page}'.format(page=outjson)
        )
    except IOError:
        log.exception(
            'Fail to save JSON output for page {page}'.format(page=outjson)
        )
    except Exception as e:
        log.exception(
            'Failure in JSON search dump for page {page}'.format(page=outjson)
        )
639273
def _GetPluginData(self):
    
    return_dict = {}

    return_dict['Versions'] = [
        ('plaso engine', plaso.__version__),
        ('python', sys.version)]

    hashers_information = hashers_manager.HashersManager.GetHashersInformation()
    parsers_information = parsers_manager.ParsersManager.GetParsersInformation()
    plugins_information = (
        parsers_manager.ParsersManager.GetParserPluginsInformation())
    presets_information = parsers_manager.ParsersManager.GetPresetsInformation()

    return_dict['Hashers'] = hashers_information
    return_dict['Parsers'] = parsers_information
    return_dict['Parser Plugins'] = plugins_information
    return_dict['Parser Presets'] = presets_information

    return return_dict
673992
def serialize(self):
        

        cases = [case.serialize() for key, case in six.iteritems(self.cases)]
        specs = [spec.serialize() for spec in self.describes]

        converted_dict = {
            'id': self.id,
            'name': self.name,
            'class_path': self.real_class_path,
            'doc': self.doc,
            'cases': cases,
            'specs': specs
        }
        return converted_dict
1265988
def doc(self, export='plain'):
        
        title = '<{}.{}>'.format(self._group, self._name)
        table = Tab(export=export, title=title, descr=self.__doc__)
        rows = []
        keys = sorted(self._data.keys())
        for key in keys:
            val = self._data[key]
            suf = ''
            if key in self._mandatory:
                suf = ' *'

            elif key in self._powers + \
                    self._voltages + \
                    self._currents + \
                    self._z + \
                    self._y + \
                    self._dccurrents + \
                    self._dcvoltages + \
                    self._r + \
                    self._g + \
                    self._times:
                suf = ' #'

            c1 = key + suf
            c2 = self._descr.get(key, '')
            c3 = val
            c4 = self._units.get(key, '-')
            rows.append([c1, c2, c3, c4])

        table.add_rows(rows, header=False)
        table.header(['Parameter', 'Description', 'Default', 'Unit'])

        if export == 'plain':
            pass
        elif export == 'latex':
            raise NotImplementedError('LaTex output not implemented')

        return table.draw()
338576
def get_samples_by_grp(self):
        
        return {grp.id: sm.samples for sm in self.source_models
                for grp in sm.src_groups}
454914
def prepare_components(self):
        
        # Register the components based on user option
        # First, tabular report
        generated_components = deepcopy(all_default_report_components)
        # Rohmat: I need to define the definitions here, I can't get
        # the definition using definition helper method.
        component_definitions = {
            impact_report_pdf_component['key']:
                impact_report_pdf_component,
            action_checklist_pdf_component['key']:
                action_checklist_pdf_component,
            analysis_provenance_details_pdf_component['key']:
                analysis_provenance_details_pdf_component,
            infographic_report['key']: infographic_report
        }
        duplicated_report_metadata = None
        for key, checkbox in list(self.all_checkboxes.items()):
            if not checkbox.isChecked():
                component = component_definitions[key]
                if component in generated_components:
                    generated_components.remove(component)
                    continue

                if self.is_multi_exposure:
                    impact_report_metadata = (
                        standard_multi_exposure_impact_report_metadata_pdf)
                else:
                    impact_report_metadata = (
                        standard_impact_report_metadata_pdf)

                if component in impact_report_metadata['components']:
                    if not duplicated_report_metadata:
                        duplicated_report_metadata = deepcopy(
                            impact_report_metadata)
                    duplicated_report_metadata['components'].remove(
                        component)
                    if impact_report_metadata in generated_components:
                        generated_components.remove(
                            impact_report_metadata)
                        generated_components.append(
                            duplicated_report_metadata)

        # Second, custom and map report
        # Get selected template path to use
        selected_template_path = None
        if self.search_directory_radio.isChecked():
            selected_template_path = self.template_combo.itemData(
                self.template_combo.currentIndex())
        elif self.search_on_disk_radio.isChecked():
            selected_template_path = self.template_path.text()
            if not exists(selected_template_path):
                # noinspection PyCallByClass,PyTypeChecker
                QtWidgets.QMessageBox.warning(
                    self,
                    tr('InaSAFE'),
                    tr(
                        'Please select a valid template before printing. '
                        'The template you choose does not exist.'))

        if map_report in generated_components:
            # if self.no_map_radio.isChecked():
            #     generated_components.remove(map_report)
            if self.default_template_radio.isChecked():
                # make sure map report is there
                generated_components.append(
                    generated_components.pop(
                        generated_components.index(map_report)))
            elif self.override_template_radio.isChecked():
                hazard_type = definition(
                    self.impact_function.provenance['hazard_keywords'][
                        'hazard'])
                exposure_type = definition(
                    self.impact_function.provenance['exposure_keywords'][
                        'exposure'])
                generated_components.remove(map_report)
                generated_components.append(
                    update_template_component(
                        component=map_report,
                        hazard=hazard_type,
                        exposure=exposure_type))
            elif selected_template_path:
                generated_components.remove(map_report)
                generated_components.append(
                    override_component_template(
                        map_report, selected_template_path))

        return generated_components
188956
def extract_props(self, settings):
        '''
        
        '''

        props = {}

        for param in self.call_parameters:
            if param in settings:
                props[param] = settings[param]
            else:
                props[param] = None

        return props
365403
def to_dict(self):
        ''''''
        d = {'sequence': self.sequence,
                'targetComponent': self.target_component.to_dict()}
        props = []
        for name in self.properties:
            p = {'name': name}
            if self.properties[name]:
                p['value'] = str(self.properties[name])
            props.append(p)
        if props:
            d[RTS_EXT_NS_YAML + 'properties'] = props
        return d
420888
function Documentation() {
  return {
    composes: [],
    descriptors: {},
    getPropDescriptor(name) {
      return this.descriptors[name] || (this.descriptors[name] = {});
    },
    addComposes(name) {
      this.composes.push(name);
    },
    set(key, value) {
      this[key] = value;
    },
  };
}
270585
public static synchronized void generate() {
        LOGGER.debug("Generating documentation of test documentation included in pythonlib directories.");
        try {
            IS_RUNNING = true;
            List<File> pythonLibDirectories = findPythonLibDirectories(ROOT_SCRIPT_DIRECTORY);

            List<File> pythonScriptFiles = findPythonScripts(pythonLibDirectories);
            for (File script : pythonScriptFiles) {
                if (hasToGenerateDocumentation(script)) {
                    GenerateTestStepsModulesDoc.generate(script.getAbsolutePath());
                }
            }
            ALREADY_RUN = true;
        } catch (Exception ex) {
            ex.printStackTrace();
        } finally {
            IS_RUNNING = false;
        }
    }
1261596
def sampling_params(self):
        
        if self.sampling_transforms is None:
            sampling_params = self.variable_params
        else:
            sampling_params = self.sampling_transforms.sampling_params
        return sampling_params
800105
def get_samples():
    
    samples = {}
    module_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "modules")
    for file in sorted(os.listdir(module_dir)):
        if file.endswith(".py") and file != "__init__.py":
            #  remove .py
            module_name = file[:-3]
            with open(os.path.join(module_dir, file), "r") as f:
                try:
                    module = ast.parse(f.read())
                except SyntaxError:
                    continue
                raw_docstring = ast.get_docstring(module)
                if raw_docstring is None:
                    continue
                parts = re.split("^SAMPLE OUTPUT$", raw_docstring, flags=re.M)
                if len(parts) == 1:
                    continue
                sample_data = parts[1]
                samples.update(parse_sample_data(sample_data, module_name))
    return samples
247869
def generate(self):
        
        s = self._docstring
        s += self._get_source().replace(
            'endpoints = {}',
            'endpoints = ' + self._config_src
        ).replace(
            'logger.setLevel(logging.INFO)',
            'logger.setLevel(logging.%s)' % self.config.logging_level
        )
        return s
73695
def as_dict(self):
        
        #TODO/FIXME: add selected information
        if self.hidden:
            rdict = {}
        else:
            def_selected = self.selected()
            comps = [
                {
                    'name': comp.name,
                    'default': comp.name in self.defaults,
                    'options': comp.get_ordered_options() if isinstance(comp, Optionable) else None
                }
                for comp in self
            ]
            rdict = {
                'name': self.name,
                'required': self.required,
                'multiple': self.multiple,
                'args': self.in_name,
                'returns': self.out_name,
                'components': comps
            }
        return rdict