Providing ways to check if an assembly or block is "detailed"#2256
Providing ways to check if an assembly or block is "detailed"#2256
Conversation
|
Drafting to make sure we've got the history tools we need. Should be good, but let's not waste some CI time |
In GitHub, CI still runs on Draft. The ARMI workflow for Draft vs Open PRs is this:
This is typically done because the PR is still under development, and reviewing an incomplete PR wastes REVIEWER time. Though, for the sake of the PR author, CI will still run so they can see if their tests pass. Just FYI. |
|
This pull request has been automatically marked as stale because it has not had any activity in the last 100 days. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
|
@drewj-tp What's up with this PR? |
What is the change? Why is it being made?
Detailed assemblies are those designated to get special treatment in physics codes. Sometimes, you have a specific
AssemblyorBlockand you want to check if it is eligible for this detailed treatment. Before, you would have to do something like:This PR introduces
HistoryTrackerInterface.isDetailedAssemblyto check if a given assembly is considered detailed or not. Similarly, theHistoryTrackerInterface.isDetailedBlockwill check if a block is in a detailed assembly. Mostly by just checking if the parentisDetailedAssemblyso maybe not a lot of value?Doing this, you can pretty easily write iterators/generators to find all the detailed assemblies in the
Coreright now. I added one example in ba054c6:You could use
itertools.chain.from_iterableto get the detailed blocks with e.g.,:We could move those into the full API if we want.
Closes #2156
At least for the scope I was looking for when I wrote that. I've scoped out internal usage and these methods will be useful and remove the need (well, my need) for an iterator of detailed assemblies.
SCR Information
Change Type: features
One-Sentence Description: Provide
HistoryTrackerInterface.isDetailedAssemblyandisDetailedBlockfor checking if an assembly or block is considered "detailed"One-Sentence Rationale: People would like more tools for finding "detailed assemblies".
One-line Impact on Requirements: N/A
Checklist
docfolder.pyproject.toml.