Repository navigation
Users/elebel/context managers - #2259
Open
elebel-emerson wants to merge 3 commits into
Open
elebel-emerson wants to merge 3 commits into
elebel-emerson wants to merge 3 commits into
Conversation
context_manager_name may now be a dict or a list of dicts, each with an optional method_name (default: initiate). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2259 +/- ##
==========================================
+ Coverage 88.12% 88.13% +0.01%
==========================================
Files 88 88
Lines 22830 22854 +24
==========================================
+ Hits 20118 20142 +24
Misses 2712 2712
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
Author
|
/azp run |
|
Commenter does not have sufficient privileges for PR 2259 in repo ni/nimi-python |
elebel-emerson
marked this pull request as ready for review
November 5, 2026 21:31
elebel-emerson
requested review from
marcoskirsch,
ni-jfitzger and
vnktshr21
as code owners
November 5, 2026 21:31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This contribution adheres to CONTRIBUTING.md.
I've updated CHANGELOG.md if applicable.Not a client-facing change: generated code for all shipping drivers is unchanged.
I've added tests applicable for this pull request
What does this Pull Request accomplish?
Allows a driver to define more than one session context manager (initiate/abort pair) in its metadata.
config['context_manager_name']may now be either a single dict (existing format, unchanged for all current drivers) or a list of dicts.method_namekey for the public method that returns the context manager. It defaults toinitiate, so existing behavior is preserved.helper.filter_context_managers(config), which normalizes the config to a list and drops empty entries (e.g. nitclk's{}).session.py.mako:session_context_managertocontext_managers, since the old name suggested the context manager returned bySession.__init__().initiate()blocks (_SessionBasevs.Session, chosen by the initiate function'srender_in_session_base) with loops.helper.initiate_function_def_for_doc()now takes a single context manager entry instead of the whole config, and uses itsmethod_name.class.rst.makoand nitclk'sclass.rst.makoadd one doc entry per context manager.acquisition(Initiate/Abort, methodinitiate(), rendered onSession).generation(InitiateGeneration/AbortGeneration, methodinitiate_generation(), rendered on_SessionBase). These two functions are not included in the proto.List issues fixed by this Pull Request below, if any.
None.
What testing has been done?
niFakehas been updated and passing changes