Recent releases of `orix` break `pyxem` and `kikuchipy`
Most likely orix >=0.14.0
https://github.com/hyperspy/hyperspy-extensions-list/actions/runs/20154109104/job/57852785628
============================= test session starts ==============================
platform linux -- Python 3.12.12, pytest-8.4.2, pluggy-1.6.0
Matplotlib: 3.10.8
Freetype: 2.6.1
rootdir: /home/runner/work/_temp
plugins: rerunfailures-16.1, mpl-0.18.0, xdist-3.8.0, instafail-0.5.0
collected 823 items / 1 error / 5 deselected / 818 selected
==================================== ERRORS ====================================
_______ ERROR collecting tests/test_signals/test_ebsd_master_pattern.py ________
ImportError while importing test module '/home/runner/miniconda3/envs/test/lib/python3.12/site-packages/kikuchipy/tests/test_signals/test_ebsd_master_pattern.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
../../miniconda3/envs/test/lib/python3.12/importlib/__init__.py:90: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../../miniconda3/envs/test/lib/python3.12/site-packages/kikuchipy/tests/test_signals/test_ebsd_master_pattern.py:779: in <module>
class TestFitPatternDetectorOrientation:
../../miniconda3/envs/test/lib/python3.12/site-packages/kikuchipy/tests/test_signals/test_ebsd_master_pattern.py:798: in TestFitPatternDetectorOrientation
simulator = kp.simulations.KikuchiPatternSimulator(ref)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../../miniconda3/envs/test/lib/python3.12/site-packages/lazy_loader/__init__.py:82: in __getattr__
submod = importlib.import_module(submod_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../../miniconda3/envs/test/lib/python3.12/importlib/__init__.py:90: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../../miniconda3/envs/test/lib/python3.12/site-packages/kikuchipy/simulations/kikuchi_pattern_simulator.py:72: in <module>
from orix.plot._util import Arrow3D
E ImportError: cannot import name 'Arrow3D' from 'orix.plot._util' (/home/runner/miniconda3/envs/test/lib/python3.12/site-packages/orix/plot/_util/__init__.py)
=========================== short test summary info ============================
ERROR tests/test_signals/test_ebsd_master_pattern.py
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
======================= 5 deselected, 1 error in 24.27s ========================
Arrow3Dgot moved to it's own file during a module shuffle.
I can fix it Sunday night if no one gets to it before me.
In https://github.com/hyperspy/hyperspy-extensions-list/actions/runs/20154109104/job/57852785557, there is also this error:
============================= test session starts ==============================
platform darwin -- Python 3.12.12, pytest-8.4.2, pluggy-1.6.0
Matplotlib: 3.10.8
Freetype: 2.14.1
rootdir: /Users/runner/work/_temp
plugins: mpl-0.18.0, instafail-0.5.0, reportlog-1.0.0, xdist-3.8.0, rerunfailures-16.1
collected 0 items / 1 error
==================================== ERRORS ====================================
________________________ ERROR collecting test session _________________________
../../miniconda3/envs/test/lib/python3.12/importlib/__init__.py:90: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<frozen importlib._bootstrap>:1387: in _gcd_import
???
<frozen importlib._bootstrap>:1360: in _find_and_load
???
<frozen importlib._bootstrap>:1310: in _find_and_load_unlocked
???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
???
<frozen importlib._bootstrap>:1387: in _gcd_import
???
<frozen importlib._bootstrap>:1360: in _find_and_load
???
<frozen importlib._bootstrap>:1331: in _find_and_load_unlocked
???
<frozen importlib._bootstrap>:935: in _load_unlocked
???
<frozen importlib._bootstrap_external>:999: in exec_module
???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
???
../../miniconda3/envs/test/lib/python3.12/site-packages/pyxem/__init__.py:29: in <module>
from pyxem import signals
../../miniconda3/envs/test/lib/python3.12/site-packages/pyxem/signals/__init__.py:42: in <module>
from .indexation_results import VectorMatchingResults, OrientationMap
../../miniconda3/envs/test/lib/python3.12/site-packages/pyxem/signals/indexation_results.py:34: in <module>
from orix.plot.inverse_pole_figure_plot import _get_ipf_axes_labels
../../miniconda3/envs/test/lib/python3.12/site-packages/orix/plot/__init__.py:26: in <module>
from orix.plot._util import format_labels
E ImportError: cannot import name 'format_labels' from 'orix.plot._util' (/Users/runner/miniconda3/envs/test/lib/python3.12/site-packages/orix/plot/_util/__init__.py)
=========================== short test summary info ============================
ERROR - ImportError: cannot import name 'format_labels' from 'orix.plot._util' (/Users/runner/miniconda3/envs/test/lib/python3.12/site-packages/orix/plot/_util/__init__.py)
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
=============================== 1 error in 7.60s ===============================
but the fact that it only occurs on MacOS indicates that it may be related to the issue fixed in https://github.com/conda-forge/orix-feedstock/pull/43, where one package overwrite the other.
@ericpre , I think you are right, there are two unrelated but parallel issues. At minimum, i can definitely confirm the phrase orix.plot._util import format_labels only exists in orix 0.13.3, NOT 0.14, so there is definitely some version issue here.
I'm not experienced enough with the conda feedstocks to feel comfortable reviewing the relevant PR, but i think the order of operations are:
-
review and push the feedstock PR (@hakonanes or @CSSFrancis ?) to get conda to 0.14.1
-
review and push the kikuchipy PR to solve the Arrow3D reference
So sorry for this regression, we'll fix it tomorrow Wednesday.
We've made three changes to orix on conda-forge:
- A second build of orix (noarch) v0.14.0 was made
- Both recipes are now noarch recipes
- Both orix and orix-base are now at v0.14.1
@ericpre, do these changes fix some of your issues?
@argerlt and I are releasing a patch for kikuchipy v0.11.3 in https://github.com/pyxem/kikuchipy/pull/765, making it also compatible with orix >= 0.14.0.
It seems like the issue in pyxem remains, though?
From checking the build in https://github.com/hyperspy/hyperspy-extensions-list/actions/runs/20357659774, I think that it does - there are many failures related to download failure from zenodo and it is difficult to be sure.
There is still some failure using conda-forge packages because https://github.com/conda-forge/kikuchipy-feedstock/pull/46 is not merged yet.
there are many failures related to download failure from zenodo and it is difficult to be sure
Yes, and I see it's not only kikuchipy experiencing issues with Zenodo/Pooch. I'm tracking that particular issue for kikuchipy here: https://github.com/pyxem/kikuchipy/issues/767.
I'm struggling to bring the patch release of kikuchipy out on conda-forge due to an unexpected pip check dependency compatibility issue: https://github.com/conda-forge/kikuchipy-feedstock/pull/46#issuecomment-3677909147. I could skip the pip check. But, I don't want to, as I'm unsure which consequences it may have. Will report back here when the patch is out on conda-forge.
The kikuchipy v0.11.3 patch is out on conda-forge now.
@ericpre, I was looking at the failing hyperspy tests, and noticed this:
I think hyperspy is grabbing a now-defunct PR of kikuchipy to run tests against, hence the failing tests, as this version of kikuchipy would not work with the updated orix due to Arrow3D moving
The development version of kikuchipy is installed as follow:
pip install "kikuchipy @ git+https://github.com/pyxem/kikuchipy.git"
from https://github.com/hyperspy/.github/blob/7d526757db72efbcca55dd3e67a26f2dd9c67613/.github/workflows/integration_tests.yml#L283
Could it be that the default branch from the kikuchipy repository doesn't have the fix (yet)?
@ericpre , Looks like you are correct.
The line Run #https://github.com/pyxem/kikuchipy/issues/707 still makes no sense to me, but I tried verbatim downloading the link you gave, and it does NOT have the file src/kikuchipy/draw/_arrow_3d.py
It looks like @hakonanes is already on this, and merging kikuchipy issue 768 will fix the problem, but the tests aren't passing, likely because of a Zenodo and/or Pooch issue which is being tracked here