Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion bindings/pyroot/pythonizations/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,11 @@ set(py_sources
ROOT/_pythonization/_ttree.py
ROOT/_pythonization/_tvector3.py
ROOT/_pythonization/_tvectort.py
ROOT/_pythonization/_uhi.py
ROOT/_pythonization/_uhi/main.py
ROOT/_pythonization/_uhi/tags.py
ROOT/_pythonization/_uhi/indexing.py
ROOT/_pythonization/_uhi/plotting.py
ROOT/_pythonization/_uhi/serialization.py
${PYROOT_EXTRA_PYTHON_SOURCES}
)

Expand Down
2 changes: 1 addition & 1 deletion bindings/pyroot/pythonizations/python/ROOT/_facade.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ def uhi(self):
uhi_module.__file__ = "<module ROOT>"
uhi_module.__package__ = self
try:
from ._pythonization._uhi import _add_module_level_uhi_helpers
from ._pythonization._uhi.main import _add_module_level_uhi_helpers

_add_module_level_uhi_helpers(uhi_module)
except ImportError:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ def _FillWithNumpyArray(self, *args):
for klass in _th1_derived_classes_to_pythonize:
pythonization(klass)(inject_constructor_releasing_ownership)

from ROOT._pythonization._uhi import _add_plotting_features
from ROOT._pythonization._uhi.main import _add_plotting_features

# Add UHI plotting features
pythonization(klass)(_add_plotting_features)
Expand All @@ -249,7 +249,7 @@ def _FillWithNumpyArray(self, *args):
def pythonize_th1(klass):
# Parameters:
# klass: class to be pythonized
from ROOT._pythonization._uhi import _add_indexing_features
from ROOT._pythonization._uhi.main import _add_indexing_features, _add_serialization_features

# Support hist *= scalar
klass.__imul__ = _imul
Expand All @@ -261,7 +261,8 @@ def pythonize_th1(klass):
klass._Original_SetDirectory = klass.SetDirectory
klass.SetDirectory = _SetDirectory_SetOwnership

# Add UHI indexing features
# Add UHI indexing and serialization features
_add_indexing_features(klass)
_add_serialization_features(klass)

inject_clone_releasing_ownership(klass)
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
# For the list of contributors see $ROOTSYS/README/CREDITS. #
################################################################################

from . import pythonization
from ROOT._pythonization._memory_utils import inject_constructor_releasing_ownership

Check failure on line 12 in bindings/pyroot/pythonizations/python/ROOT/_pythonization/_th2.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (I001)

bindings/pyroot/pythonizations/python/ROOT/_pythonization/_th2.py:11:1: I001 Import block is un-sorted or un-formatted


# The constructors need to be pythonized for each derived class separately:
Expand All @@ -30,7 +30,7 @@
for klass in _th2_derived_classes_to_pythonize:
pythonization(klass)(inject_constructor_releasing_ownership)

from ROOT._pythonization._uhi import _add_plotting_features
from ROOT._pythonization._uhi.main import _add_plotting_features

# Add UHI plotting features
pythonization(klass)(_add_plotting_features)
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
# For the list of contributors see $ROOTSYS/README/CREDITS. #
################################################################################

from . import pythonization
from ROOT._pythonization._memory_utils import inject_constructor_releasing_ownership

Check failure on line 12 in bindings/pyroot/pythonizations/python/ROOT/_pythonization/_th3.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (I001)

bindings/pyroot/pythonizations/python/ROOT/_pythonization/_th3.py:11:1: I001 Import block is un-sorted or un-formatted


# The constructors need to be pythonized for each derived class separately:
Expand All @@ -27,7 +27,7 @@
for klass in _th3_derived_classes_to_pythonize:
pythonization(klass)(inject_constructor_releasing_ownership)

from ROOT._pythonization._uhi import _add_plotting_features
from ROOT._pythonization._uhi.main import _add_plotting_features

# Add UHI plotting features
pythonization(klass)(_add_plotting_features)
Loading
Loading