Skip to content

Make clean_frag_id robust to frag ID segment-length variations #9

@zsarnoczay

Description

@zsarnoczay

Problem

  • clean_frag_id currently rebuilds IDs by removing characters at hard-coded positions, e.g., converting B.10.10.100a to B1010.100a via fixed slicing. If Pelicun or future IDs vary in the number of digits per segment, this will break.

Proposed solution

  • Parse IDs by splitting on '.' and recombining without the first two dots: ''.join(parts) after parts = frag_id.split('.') with any needed normalization. Centralize all period-removal logic to call this function.

Permalink to context in #8 : https://github.com/OpenPBEE/Functional-Recovery-Python/pull/8/changes#diff-09ddbe9b47cd801ac2851f14da73cf459f44c2cd8c6d3f2a557541ff2a6bc4b2R506

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions