Skip to content

[ESSREDUCE] Move esspolarization to essreduce#434

Closed
jokasimr wants to merge 4 commits intomainfrom
move-polarization
Closed

[ESSREDUCE] Move esspolarization to essreduce#434
jokasimr wants to merge 4 commits intomainfrom
move-polarization

Conversation

@jokasimr
Copy link
Copy Markdown
Contributor

As suggested in #276

@jokasimr jokasimr requested a review from nvaytet April 17, 2026 09:21
@@ -0,0 +1,90 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2025 Scipp contributors (https://github.com/scipp)
# ruff: noqa: E402, F401, I
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.

Suggested change
# ruff: noqa: E402, F401, I

Not sure this is needed?

Comment on lines +5 to +12
import importlib.metadata

try:
__version__ = importlib.metadata.version("esspolarization")
except importlib.metadata.PackageNotFoundError:
__version__ = "0.0.0"

del importlib
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 guess this should go away? It should just use the version of essreduce.


del importlib


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.

Maybe we can add a docstring here for the polarization submodule that describes a little the contents?

@@ -31,6 +31,7 @@
logging
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 think you are missing the docs contents of esspolarization? e.g. https://scipp.github.io/esspolarization/user-guide/sans-polarization-analysis-methodology.html

That said, I don't know how much of it we want to keep, but I would say at least to start we would want to keep all of it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes that's true, I forgot to move that 👍

"TotalPolarizationCorrectedData",
"TransmissionFunction",
"Up",
]
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 think you should also add polarization in the top level init ?

@jokasimr
Copy link
Copy Markdown
Contributor Author

jokasimr commented Apr 17, 2026

Although... Doing it this way we loose the history of the essreduceesspolarization package. That's not good. Maybe it's better to merge #276 instead and then do the move after?

@YooSunYoung
Copy link
Copy Markdown
Member

Although... Doing it this way we loose the history of the essreduce package. That's not good. Maybe it's better to merge #276 instead and then do the move after?

You mean the history of the esspolarization?
I vote for merging it first and then move...
then it's more clear who contributed to the code and that we moved the package into the essreduce.

In that case, in #276, we don't need to update pixi.toml or readme since we know that it'll be merged into essreduce.

@nvaytet
Copy link
Copy Markdown
Member

nvaytet commented Apr 17, 2026

Maybe it's better to merge #276 instead and then do the move after?

Yes! do that 🙂

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants