Skip to content

Conversation

@uh-oh-monteiro
Copy link

set name of dynamically created PhaseDescriptors. Useful for when you're creating a phase descriptor like so:

def make_custom_test(params: Params) -> htf.PhaseDescriptor:
    @htf.measures(htf.Measurement(f'MEASUREMENT-{params.param}'))
    @htf.plug(plug=somePlug)
    def phase(test: htf.TestApi, plug: somePlug):
        plug.do_something
        test.measurements[f'MEASUREMENT-{params.param}']
    phase.name = f'TESTING-{params.some_param}'
    return phase

PhaseDescriptors don't have a __name__ attribute like normal functions, and the name attribute only had a getter.

@uh-oh-monteiro uh-oh-monteiro changed the base branch from master to halter-mods November 4, 2025 02:47
@coveralls
Copy link

coveralls commented Nov 4, 2025

Pull Request Test Coverage Report for Build 21234836046

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 2 of 3 (66.67%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.002%) to 60.906%

Changes Missing Coverage Covered Lines Changed/Added Lines %
openhtf/core/phase_descriptor.py 2 3 66.67%
Totals Coverage Status
Change from base Build 21234793138: 0.002%
Covered Lines: 4691
Relevant Lines: 7702

💛 - Coveralls

@uh-oh-monteiro uh-oh-monteiro merged commit a599578 into halter-mods Jan 22, 2026
19 of 20 checks passed
@uh-oh-monteiro uh-oh-monteiro deleted the feat/phase-descriptor-setter branch January 22, 2026 03:24
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.

3 participants