Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/RELEASE_next_patch' into RELEA…
Browse files Browse the repository at this point in the history
…SE_next_minor

# Conflicts:
#	hyperspy/Release.py
#	hyperspy/io_plugins/hspy.py
#	hyperspy/tests/drawing/test_plot_signal.py
  • Loading branch information
ericpre committed Oct 30, 2021
2 parents 560d1e3 + 6cf2351 commit 707e1f9
Show file tree
Hide file tree
Showing 11 changed files with 48 additions and 20 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/release.yml
Expand Up @@ -54,14 +54,14 @@ jobs:
python --version
which python
- name: install pep517 and twine
- name: install build and twine
run: |
python -m pip install --upgrade pip
python -m pip install pep517 twine
python -m pip install build twine
- name: Build wheels
run: |
python -m pep517.build --binary --out-dir dist/ .
python -m build
- name: Display content dist folder
run: |
Expand Down Expand Up @@ -105,21 +105,20 @@ jobs:
run: |
python -m pip install twine
- name: Build source distribution
run: |
pip install build
python -m build --sdist
- name: Build manylinux Python wheels
uses: RalfG/python-wheels-manylinux-build@v0.3.3
with:
python-versions: 'cp36-cp36m cp37-cp37m cp38-cp38 cp39-cp39'
build-requirements: 'cython'

- name: Build source distribution
run: |
pip install pep517
python -m pep517.build --source --out-dir sdist/ .
- name: Display content dist folder
run: |
ls dist/
ls sdist/
- name: Install and test distribution
env:
Expand All @@ -144,5 +143,5 @@ jobs:
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
twine upload dist/*-manylinux*.whl --verbose
twine upload sdist/*.tar.gz --verbose
twine upload dist/*.tar.gz --verbose
30 changes: 28 additions & 2 deletions CHANGES.rst
Expand Up @@ -8,8 +8,34 @@ https://hyperspy.readthedocs.io/en/latest/user_guide/changes.html

.. towncrier release notes start
Hyperspy 1.6.4 (2021-07-08)
===========================
v1.6.5 (2021-10-28)
===================

Bug Fixes
---------

- Suspend plotting during :py:meth:`~.models.eelsmodel.EELSModel.smart_fit` call (`#2796 <https://github.com/hyperspy/hyperspy/issues/2796>`_)
- make :py:meth:`~.signal.BaseSignal.add_marker` also check if the plot is not active before plotting signal (`#2799 <https://github.com/hyperspy/hyperspy/issues/2799>`_)
- Fix irresponsive ROI added to a signal plot with a right hand side axis (`#2809 <https://github.com/hyperspy/hyperspy/issues/2809>`_)
- Fix :py:func:`~.drawing.utils.plot_histograms` drawstyle following matplotlib API change (`#2810 <https://github.com/hyperspy/hyperspy/issues/2810>`_)
- Fix incorrect :py:meth:`~.signal.BaseSignal.map` output size of lazy signal when input and output axes do not match (`#2837 <https://github.com/hyperspy/hyperspy/issues/2837>`_)
- Add support for latest h5py release (3.5) (`#2843 <https://github.com/hyperspy/hyperspy/issues/2843>`_)


Deprecations
------------

- Rename ``line_style`` to ``linestyle`` in :py:func:`~.drawing.utils.plot_spectra` to match matplotlib argument name (`#2810 <https://github.com/hyperspy/hyperspy/issues/2810>`_)


Enhancements
------------

- :py:meth:`~.roi.BaseInteractiveROI.add_widget` can now take a string or integer instead of tuple of string or integer (`#2809 <https://github.com/hyperspy/hyperspy/issues/2809>`_)


v1.6.4 (2021-07-08)
===================

Bug Fixes
---------
Expand Down
2 changes: 1 addition & 1 deletion hyperspy/_signals/lazy.py
Expand Up @@ -653,7 +653,7 @@ def _map_iterate(self,
axes_changed = True
if len(output_signal_size) != len(old_sig.axes_manager.signal_shape):
drop_axis = old_sig.axes_manager.signal_indices_in_array
new_axis = tuple(range(len(output_signal_size)))
new_axis = tuple(range(len(nav_indexes), len(nav_indexes) + len(output_signal_size)))
else:
drop_axis = [it for (o, i, it) in zip(output_signal_size,
old_sig.axes_manager.signal_shape,
Expand Down
9 changes: 9 additions & 0 deletions hyperspy/tests/signals/test_map_method.py
Expand Up @@ -362,6 +362,15 @@ def test_map_iterate_array(self):
inplace=False)
np.testing.assert_array_equal(s_out.mean(axis=(2, 3)).data, iter_array)

@pytest.mark.parametrize("output_signal_size", [(3,), (3, 4), (3, 4, 5)])
def test_map_output_signal_size(self, output_signal_size):
def f(data):
return np.ones(output_signal_size)

s_out = self.s.map(function=f, inplace=False)
assert s_out.data.shape[2:] == output_signal_size
assert s_out.axes_manager.signal_shape == output_signal_size[::-1]


@pytest.mark.parametrize('ragged', [True, False, None])
def test_singleton(ragged):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -46,7 +46,7 @@


install_req = ['scipy>=1.1',
'matplotlib>=3.1.0',
'matplotlib>=3.1.0,<3.5',
'numpy>=1.17.1',
'traits>=4.5.0',
'natsort',
Expand Down
1 change: 0 additions & 1 deletion upcoming_changes/2796.bugfix.rst

This file was deleted.

1 change: 0 additions & 1 deletion upcoming_changes/2799.bugfix.rst

This file was deleted.

1 change: 0 additions & 1 deletion upcoming_changes/2809.bugfix.rst

This file was deleted.

1 change: 0 additions & 1 deletion upcoming_changes/2809.enhancements.rst

This file was deleted.

1 change: 0 additions & 1 deletion upcoming_changes/2810.bugfix.rst

This file was deleted.

1 change: 0 additions & 1 deletion upcoming_changes/2810.deprecation.rst

This file was deleted.

0 comments on commit 707e1f9

Please sign in to comment.