Skip to content

Add CountByGroupSpec, CountByPIDSpec; use enums for AggregateByXSpec #814

@hmgaudecker

Description

@hmgaudecker

In #780, we introduce

@dataclass
class AggregateByGroupSpec:
    """
    A container for aggregate by group specifications.
    """

    aggr: str
    source_col: str | None = None

In order to get better typing, we should remove the None option for the source col. Way to go is a separate class for counting, which is the only case how it can become None.

Same for the PID version.

The type annotation for the aggr function currently is a string and should be an enum-style type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions