Update apps for element filtering#577
Conversation
|
whats the curernt plan for this and #578 ? |
If you ignore the changes to DMC_ICE/X23 apps (which were starting points for the full filtering), the main change each app needs is what's in So if you take a look at the NEB app changes + backend changes, and see what you think? I can work through the other app changes reasonably quickly. #578 is where the bulk of the work is left, since we need to save the It's not conceptually that difficult, but often not entirely trivial either. Most of the ones I've changed and pushed work, but a couple e.g. CPOSS209 aren't quite working yet, but the idea should be reasonably clear. |
| """Register callbacks with app.""" | ||
| pass | ||
|
|
||
| def filter_table(self, filter_elements: list[str] | None) -> dict[str, dict]: |
There was a problem hiding this comment.
i think this funciton mutating self.table.data is dangerous for the hosted app with multiple users. i think we should build from deepcopy(self.original_table.data)?
| def set_elements(self) -> None: | ||
| """Get element sets for filtering.""" | ||
| try: | ||
| self.elements = set(self.info["elements"][0]) |
There was a problem hiding this comment.
i think "elements"[0] = "L" here not "Li"?
Pre-review checklist for PR author
PR author must check the checkboxes below when creating the PR.
Summary
Continuation of #559.
This introduces the app changes needed to actually apply the element filter. This needs to be generalised and added to all apps. X23/DMC_ICE are a little out of date currently, and testing won't work until the analysis is updated and re-run.