-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Have fillDescriptions generate a template for VPSet in cfi files #47374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Have fillDescriptions generate a template for VPSet in cfi files #47374
Conversation
Avoid implicit `if` failure which could happen if a source were to define a different criteria (such as __len__).
If a VPSet had a single entry and defined a `template` then a `dumpPython` would not create a syntactically correct output.
If the PSetTemplate assigned to template is empty, do not print it when doing dumpPython.
The ParameterSetDescription passed to the declaration of a VPSet in fillDescriptions will be used to generate the value passed as `template` to the VPSet.
please test |
cms-bot internal usage |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-47374/43732
|
A new Pull Request was created by @Dr15Jones for master. It involves the following packages:
@Dr15Jones, @makortel, @smuzaffar can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
+1 Size: This PR adds an extra 116KB to repository Comparison SummarySummary:
|
+core |
This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @sextonkennedy, @rappoccio, @antoniovilela, @mandrenguyen (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
It appears this PR created issues for ConfDB, see discussion at #47630 (comment) |
For the future record, in the end this PR did not create problems. More details in #47653. |
PR description:
The ParameterSetDescription passed to the function which adds a VPSet to the configuration is used to generate the
template
argument for thecms.VPSet
written to the cfi files. This allows python to validate PSets passed to the VPSet.This also fixes a bug where declaring
cms.VPSet(cms.PSet(), template = ...)
and then callingdumpPython()
on the VPSet would generate syntactically invalid python.PR validation:
Code compiles and framework unit tests pass.
resolves cms-sw/framework-team#1226