osc_generator/helper_functions.py
def verify_parameters(param):
    """
    Checks Parameter Declarations attribute table to verify parameter exists

    Args:
        param (string): name of parameter to check against

    Returns:
        feature (dict): parameter definitions
    """
    param_layer = QgsProject.instance().mapLayersByName("Parameter Declarations")[0]
    query = f'"Parameter Name" = \'{param}\''
    feature_request = QgsFeatureRequest().setFilterExpression(query)
    features = param_layer.getFeatures(feature_request)
    feature = {}

    for feat in features:
        feature["Type"] = feat["Type"]
        feature["Value"] = feat["Value"]

    return feature

    Checks Parameter Declarations attribute table to verify parameter exists

    Args:
        param (string): name of parameter to check against

    Returns:
        feature (dict): parameter definitions
    
Checks Parameter Declarations attribute table to verify parameter exists
Checks Parameter Declarations attribute table to verify parameter exists
def verify_parameters(param):
    param_layer = QgsProject.instance().mapLayersByName("Parameter Declarations")[0]
    query = f'"Parameter Name" = \'{param}\''
    feature_request = QgsFeatureRequest().setFilterExpression(query)
    features = param_layer.getFeatures(feature_request)
    feature = {}
    for feat in features:
        feature["Type"] = feat["Type"]
        feature["Value"] = feat["Value"]
    return feature
def verify_parameters ( param ) : param_layer = QgsProject . instance ( ) . mapLayersByName ( "Parameter Declarations" ) [ 0 ] query = f'"Parameter Name" = \'{param}\'' feature_request = QgsFeatureRequest ( ) . setFilterExpression ( query ) features = param_layer . getFeatures ( feature_request ) feature = { } for feat in features : feature [ "Type" ] = feat [ "Type" ] feature [ "Value" ] = feat [ "Value" ] return feature
Checks Parameter Declarations attribute table to verify parameter exists
Checks Parameter Declarations attribute table to verify parameter exists
"""
    Checks Parameter Declarations attribute table to verify parameter exists

    Args:
        param (string): name of parameter to check against

    Returns:
        feature (dict): parameter definitions
    """
feature (dict): parameter definitions
feature ( dict ) : parameter definitions
param
name of parameter to check against
name of parameter to check against