Skip to content

1302 fix get element names#1349

Merged
MariusWirtz merged 4 commits intomasterfrom
1302-fix-get-element-names
Feb 10, 2026
Merged

1302 fix get element names#1349
MariusWirtz merged 4 commits intomasterfrom
1302-fix-get-element-names

Conversation

@MariusWirtz
Copy link
Collaborator

Solves #1302

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes backward compatibility for SubsetService.get_element_names (per #1302) by re-accepting the legacy subset_name calling pattern while keeping the newer subset parameter.

Changes:

  • Make subset optional (None by default) in get_element_names.
  • Support legacy subset_name passed via **kwargs, with a guard to prevent passing both subset and subset_name.
  • Add tests covering supported argument combinations and the mutual-exclusion error.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
Tests/SubsetService_test.py Adds regression tests for legacy subset_name support and argument validation.
TM1py/Services/SubsetService.py Restores backward-compatible subset_name handling and updates get_element_names signature/logic.
Comments suppressed due to low confidence (1)

TM1py/Services/SubsetService.py:217

  • The docstring still describes only the subset parameter, but subset_name is now supported via kwargs for backward compatibility. Consider documenting that callers may pass subset_name and that it is mutually exclusive with subset.
        **kwargs,
    ) -> List[str]:
        """
        Retrieve element names from a static or dynamic subset.

        :param dimension_name: Name of the dimension.
        :param hierarchy_name: Name of the hierarchy.
        :param subset: Subset name (str) or Subset object.
        :param private: Whether the subset is private.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@MariusWirtz MariusWirtz merged commit fa75cfc into master Feb 10, 2026
1 check passed
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.

2 participants

Comments