Skip to content

Tuple to dataclass#1

Closed
XLIU-hub wants to merge 105 commits intomasterfrom
tuple_to_dataclass
Closed

Tuple to dataclass#1
XLIU-hub wants to merge 105 commits intomasterfrom
tuple_to_dataclass

Conversation

@XLIU-hub
Copy link
Copy Markdown
Contributor

Pull Request Details

This pull request replaces tuple-based return values with dictionaries across the crossmapper. This change introduces dictionaries with explicit keys, improving:

  • Readability of the codebase
  • API clarity for users, especially in documentation

For example, instead of:
position, offset, in_cds, in_transcript = func(...)
The API now returns:
pos_m = func(...)
pos_m['position']
pos_m['offset']
pos_m['region']
pos_m['position_in_codon']

Documentation has been updated to reflect these new return types.

Breaking Changes

Functions that previously returned positions in tuples now return dictionaries. This affects downstream code that:

  • Relies on tuple unpacking
  • Access values by index
  • Use position values without considering its region

Tests

  • All tests have been updated to reflect dictionary-based return values
  • All existing and new tests pass

Xiaoyun Liu added 30 commits February 19, 2026 16:16
@XLIU-hub XLIU-hub marked this pull request as draft March 25, 2026 13:51
@XLIU-hub XLIU-hub closed this Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant