Skip to content

Move types to subpackages#607

Open
jl-wynen wants to merge 3 commits into
mainfrom
move-types-to-subpackages
Open

Move types to subpackages#607
jl-wynen wants to merge 3 commits into
mainfrom
move-types-to-subpackages

Conversation

@jl-wynen
Copy link
Copy Markdown
Member

First step of #70

@jl-wynen jl-wynen requested a review from nvaytet May 28, 2026 08:50
@github-actions github-actions Bot added essdiffraction Issues for essdiffraction. essreduce Issues for essreduce. essreflectometry Issues for essreflectometry. esssans Issues for esssans. essspectroscopy Issues for essspectroscopy. labels May 28, 2026
@github-actions
Copy link
Copy Markdown

Hi! Your PR was missing some labels 🔖 so I added them: essdiffraction essreduce essreflectometry esssans essspectroscopy

Copy link
Copy Markdown
Member

@nvaytet nvaytet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good but I am worried the changes are going to clash a lot with #603 😬
Which one should we merge first?

@jl-wynen
Copy link
Copy Markdown
Member Author

jl-wynen commented Jun 1, 2026

Depends on how close that PR is to merging? Resolving conflicts should be simple

@nvaytet
Copy link
Copy Markdown
Member

nvaytet commented Jun 1, 2026

My guess is that it will still take a while to figure everything out correctly in that PR.
So that answers my question...

"""Incident monitor"""
TransmissionMonitor = NewType('TransmissionMonitor', int)
"""Transmission monitor"""
FrameMonitor0 = NewType('FrameMonitor0', int)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would there be any use in providing a default set of monitors? (Monitor1-4?)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so. We shouldn't use them in workflows because they carry no meaning. So I think they would only be good for testing, and then we can easily define them in the tests.

like ``SampleRun`` or ``BackgroundRun``.
"""

SampleRun = NewType('SampleRun', int)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the SampleRun special?
Shouldn't we remove all in the future, and sub-packages can decide if they want to name it SampleRun or something else?

Is there any code internally to essreduce that makes use of SampleRun or is it only in the tests/docs?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is special in how I and maybe we think about workflows. But that is not a good argument on its own.

There are some uses in live and polarization. Removing the ones in live might be tricky. But maybe that code should be in esslivedata anyway? And for polarization, there is this: #615

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would have thought that everything in essreduce could just be RunType, unless I am forgetting something?

But maybe that code should be in esslivedata anyway?

Yes, I would vote to move it there.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

essdiffraction Issues for essdiffraction. essreduce Issues for essreduce. essreflectometry Issues for essreflectometry. esssans Issues for esssans. essspectroscopy Issues for essspectroscopy.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants