src/pybel/dsl/edges.py
def activity(
    name: Optional[str] = None,
    namespace: Optional[str] = None,
    identifier: Optional[str] = None,
    location: Optional[LocationDict] = None,
) -> ModifierDict:
    """Make a subject/object modifier dictionary.

    :param name: The name of the activity. If no namespace given, uses BEL default namespace
    :param namespace: The namespace of the activity
    :param identifier: The identifier of the name in the database
    :param location: An entity from :func:`pybel.dsl.entity` representing the location of the node
    """
    rv = _modifier_helper(ACTIVITY, location=location)

    if name and not namespace:
        rv[EFFECT] = activity_mapping[name]
    elif not name and not namespace and not identifier:
        rv[EFFECT] = activity_mapping['act']
    else:
        rv[EFFECT] = Entity(
            namespace=namespace,
            name=name,
            identifier=identifier,
        )
    return rv
Make a subject/object modifier dictionary.

    :param name: The name of the activity. If no namespace given, uses BEL default namespace
    :param namespace: The namespace of the activity
    :param identifier: The identifier of the name in the database
    :param location: An entity from :func:`pybel.dsl.entity` representing the location of the node
    
Make a subject/object modifier dictionary.
Make a subject / object modifier dictionary .
def activity(
    name: Optional[str] = None,
    namespace: Optional[str] = None,
    identifier: Optional[str] = None,
    location: Optional[LocationDict] = None,
) -> ModifierDict:
    rv = _modifier_helper(ACTIVITY, location=location)
    if name and not namespace:
        rv[EFFECT] = activity_mapping[name]
    elif not name and not namespace and not identifier:
        rv[EFFECT] = activity_mapping['act']
    else:
        rv[EFFECT] = Entity(
            namespace=namespace,
            name=name,
            identifier=identifier,
        )
    return rv
def activity ( name : Optional [ str ] = None , namespace : Optional [ str ] = None , identifier : Optional [ str ] = None , location : Optional [ LocationDict ] = None , ) -> ModifierDict : rv = _modifier_helper ( ACTIVITY , location = location ) if name and not namespace : rv [ EFFECT ] = activity_mapping [ name ] elif not name and not namespace and not identifier : rv [ EFFECT ] = activity_mapping [ 'act' ] else : rv [ EFFECT ] = Entity ( namespace = namespace , name = name , identifier = identifier , ) return rv
Make a subject/object modifier dictionary.
Make a subject / object modifier dictionary .
"""Make a subject/object modifier dictionary.

    :param name: The name of the activity. If no namespace given, uses BEL default namespace
    :param namespace: The namespace of the activity
    :param identifier: The identifier of the name in the database
    :param location: An entity from :func:`pybel.dsl.entity` representing the location of the node
    """
name
Optional[str]
The name of the activity. If no namespace given, uses BEL default namespace
The name of the activity . If no namespace given uses BEL default namespace
namespace
Optional[str]
The namespace of the activity
The namespace of the activity
identifier
Optional[str]
The identifier of the name in the database
The identifier of the name in the database
location
Optional[LocationDict]
An entity from :func:`pybel.dsl.entity` representing the location of the node
An entity from : func : ` pybel . dsl . entity ` representing the location of the node