Skip to content

Refactor setmap into an object #135

Open
Open
@Pennycook

Description

@Pennycook

Feature/behavior summary

The concept of a "setmap" is littered throughout the code. The type of each setmap is defaultdict[frozenset[str, int], int], and it's not really obvious how to interpret the information it stores. The functionality used to determine which platforms are in a setmap, count the number of SLOC, etc, is spread out across utility functions.

Request attributes

  • Would this be a refactor of existing code?
  • Does this proposal require new package dependencies?
  • Would this change break backwards compatibility?

Related issues

No response

Solution description

We should design an implement an object that encapsulates the setmap and exposes the utility functions as members.

Additional notes

Given a setmap, it is currently possible to query the number of lines associated with a given platform set, but it is not possible to query which lines belong to which set. We should consider whether it makes sense to replace the setmap with something like a Coverage object that stores more information, but this should wait until after #41 is merged.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestrefactorImprovements to code structure

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions