-
Notifications
You must be signed in to change notification settings - Fork 1
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
Remove non-generic nexus components #112
Conversation
src/ess/reduce/nexus/types.py
Outdated
def to_snx_selection(self, *, for_events: bool) -> snx.typing.ScippIndex: | ||
if self.value == slice(None, None): | ||
return () | ||
if isinstance(self.value, slice): | ||
if for_events: | ||
return {'event_time_zero': self.value} | ||
return {'time': self.value} | ||
return self.value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicate of _nexus_loader._to_snx_selection
. Why did you change the loader to take a raw selection instead of a PulseSelection
object?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because PulseSelection
is now generic, so that didn't work.
Thought I removed this (I was moving it back and forth), good catch.
# include the end | ||
bounds = sc.arange( | ||
'chunk', info.start_time, info.end_time + chunk_length, chunk_length | ||
def GenericNeXusWorkflow() -> sciline.Pipeline: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def GenericNeXusWorkflow() -> sciline.Pipeline: | |
def LoadNeXusWorkflow() -> sciline.Pipeline: |
Since you removed 'generic' everywhere else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Generic" here means "cross-technique".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You didn't use that word for the other workflows in this file. And they are also cross-technique
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see the point in changing naming in this context. If you think it is really important we can sit down and have a session on overall naming conventions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it is very important. I just think that 'GenericNeXusWorkflow' sounds like it does something conceptually different than 'LoadMonitorWorkflow'. Where actually, it just loads data and is as generic as 'LoadMonitorWorkflow'.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Naming is up to you
These were added initially when it was not clear that we would go with a fully generic workflow, and left in since I thought they might be useful for debugging or general exploratory work. However, it now proves that they simply add friction in further code changes, so there is no benefit.
Fixes #103 by removing it.
I have checked on ESSsans that downstream packages will simply have to update a few imports, i.e., updating this will be trivial.
There are no code changes here, apart form removing forwarding and updating type-hints.