Skip to content

Commit

Permalink
Merge pull request #698 from hakonanes/update-develop-post-v0.11.0
Browse files Browse the repository at this point in the history
Update develop post v0.11.0
  • Loading branch information
hakonanes authored Nov 9, 2024
2 parents 82c3d99 + b5b484e commit 4e2621a
Show file tree
Hide file tree
Showing 41 changed files with 479 additions and 577 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ jobs:
continue-on-error: true
with:
repository-url: https://test.pypi.org/legacy/
attestations: false

- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
attestations: false
36 changes: 29 additions & 7 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,44 @@ Unreleased

Added
-----
- Dependency on RosettaSciIO for read/write of some file formats.
(`#? <https://github.com/pyxem/kikuchipy/pull/?>`_)

Changed
-------
- Minimum Python version is now 3.10.
(`#689 <https://github.com/pyxem/kikuchipy/pull/689>`_)

Removed
-------

Deprecated
----------

Fixed
-----

Deprecated
----------
0.11.0 (2024-11-10)
===================

Added
-----
- HyperSpy 2.0 compatibility. (`#695 <https://github.com/pyxem/kikuchipy/pull/695>`_)
- Dependency on RosettaSciIO for read/write of HyperSpy's HDF5 and zarr files.
(`#694 <https://github.com/pyxem/kikuchipy/pull/694>`_)

Changed
-------
- Minimum Python version is now 3.10.
(`#689 <https://github.com/pyxem/kikuchipy/pull/689>`_)
- Minimum HyperSpy version is now 2.2.
(`#695 <https://github.com/pyxem/kikuchipy/pull/695>`_)
- Markers returned from geometrical simulations and the virtual backscatter electron
imager use the new HyperSpy 2.0 markers.
(`#695 <https://github.com/pyxem/kikuchipy/pull/695>`_)
- Progressbar when calculating kinematical master pattern shows progress per pole.

Removed
-------
- Contrasting background bounding box for zone axes labels returned as HyperSpy
markers. They are not supported by HyperSpy 2.0.
(`#695 <https://github.com/pyxem/kikuchipy/pull/695>`_)

0.10.0 (2024-06-02)
===================
Expand Down Expand Up @@ -64,7 +86,7 @@ Fixed
``downsample()``, was previously previously incorrect, (n columns, n rows). This is
now correct, (n rows, n columns).
(`#674 <https://github.com/pyxem/kikuchipy/pull/674>`_)

0.9.0 (2023-11-03)
==================

Expand Down
10 changes: 5 additions & 5 deletions doc/tutorials/kinematical_ebsd_simulations.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
"In this tutorial, we will perform kinematical Kikuchi pattern simulations of nickel, a variant of the $\\sigma$-phase (Fe, Cr) in steels, and silicon carbide 6H.\n",
"\n",
"We can generate kinematical master patterns using [KikuchiPatternSimulator.calculate_master_pattern()](../reference/generated/kikuchipy.simulations.KikuchiPatternSimulator.calculate_master_pattern.rst).\n",
"The simulator must be created from a [ReciprocalLatticeVector](https://diffsims.readthedocs.io/en/stable/reference.html#diffsims.crystallography.ReciprocalLatticeVector) instance that satisfy the following conditions:\n",
"The simulator must be created from a [ReciprocalLatticeVector](https://diffsims.readthedocs.io/en/stable/reference/generated/diffsims.crystallography.ReciprocalLatticeVector.html) instance that satisfy the following conditions:\n",
"\n",
"1. All atom positions are filled in the unit cell, i.e. the `structure` used to create the `phase` used in `ReciprocalLatticeVector`. This can be achieved by creating a `Phase` instance with all asymmetric atom positions listed, creating a reflector list, and then calling [ReciprocalLatticeVector.sanitise_phase()](https://diffsims.readthedocs.io/en/stable/reference.html#diffsims.crystallography.ReciprocalLatticeVector.sanitise_phase). The phase can be created manually or imported from a valid CIF file with [Phase.from_cif()](https://orix.readthedocs.io/en/stable/reference/generated/orix.crystal_map.Phase.from_cif.html).\n",
"1. All atom positions are filled in the unit cell, i.e. the `structure` used to create the `phase` used in `ReciprocalLatticeVector`. This can be achieved by creating a `Phase` instance with all asymmetric atom positions listed, creating a reflector list, and then calling [ReciprocalLatticeVector.sanitise_phase()](https://diffsims.readthedocs.io/en/stable/reference/generated/diffsims.crystallography.ReciprocalLatticeVector.sanitise_phase.html). The phase can be created manually or imported from a valid CIF file with [Phase.from_cif()](https://orix.readthedocs.io/en/stable/reference/generated/orix.crystal_map.Phase.from_cif.html).\n",
"2. The atoms in the `structure` have their elements described by the symbol (Ni), not by the atomic number (28).\n",
"3. The lattice parameters $(a, b, c)$ are given in Ångström.\n",
"4. Kinematical structure factors $F_{\\mathrm{hkl}}$ have been calculated with [ReciprocalLatticeVector.calculate_structure_factor()](https://diffsims.readthedocs.io/en/stable/reference.html#diffsims.crystallography.ReciprocalLatticeVector.calculate_structure_factor).\n",
"5. Bragg angles $\\theta_{\\mathrm{B}}$ have been calculated with [ReciprocalLatticeVector.calculate_theta()](https://diffsims.readthedocs.io/en/stable/reference.html#diffsims.crystallography.ReciprocalLatticeVector.calculate_theta).\n",
"4. Kinematical structure factors $F_{\\mathrm{hkl}}$ have been calculated with [ReciprocalLatticeVector.calculate_structure_factor()](https://diffsims.readthedocs.io/en/stable/reference/generated/diffsims.crystallography.ReciprocalLatticeVector.calculate_structure_factor.html).\n",
"5. Bragg angles $\\theta_{\\mathrm{B}}$ have been calculated with [ReciprocalLatticeVector.calculate_theta()](https://diffsims.readthedocs.io/en/stable/reference/generated/diffsims.crystallography.ReciprocalLatticeVector.calculate_theta.html).\n",
"\n",
"Let's import the necessary libraries"
]
Expand Down Expand Up @@ -824,7 +824,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.6"
"version": "3.12.7"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
Expand Down
11 changes: 2 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ dependencies = [
"dask[array] >= 2021.8.1",
"diffpy.structure >= 3",
"diffsims >= 0.5.2",
# TODO: Replace with HyperSpy 2.2 once it's out
"hyperspy @ git+https://github.com/hyperspy/hyperspy.git@RELEASE_next_patch",
"hyperspy >= 2.2",
"h5py >= 2.10",
"imageio",
"lazy_loader",
Expand Down Expand Up @@ -122,13 +121,7 @@ path = "src/kikuchipy/__init__.py"
src = ""

[tool.hatch.build.targets.wheel]
include = [
"src/kikuchipy",
]

# TODO: Remove once HyperSpy is not installed from a direct reference (GitHub)
[tool.hatch.metadata]
allow-direct-references = true
include = ["src/kikuchipy"]

[tool.coverage.report]
precision = 2
Expand Down
2 changes: 1 addition & 1 deletion src/kikuchipy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"Carter Francis",
"Magnus Nord",
]
__version__ = "0.11.dev0"
__version__ = "0.12.dev0"

__getattr__, __dir__, __all__ = lazy_loader.attach_stub(__name__, __file__)

Expand Down
170 changes: 0 additions & 170 deletions src/kikuchipy/_rotation/__init__.py

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,11 @@
#
# You should have received a copy of the GNU General Public License
# along with kikuchipy. If not, see <http://www.gnu.org/licenses/>.

"""Internal tools."""

import lazy_loader

__getattr__, __dir__, __all__ = lazy_loader.attach_stub(__name__, __file__)

del lazy_loader
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# You should have received a copy of the GNU General Public License
# along with kikuchipy. If not, see <http://www.gnu.org/licenses/>.

from ._deprecated import deprecated, deprecated_argument
from .deprecated import deprecated, deprecated_argument

__all__ = [
"deprecated",
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,22 @@
# You should have received a copy of the GNU General Public License
# along with kikuchipy. If not, see <http://www.gnu.org/licenses/>.

"""Helper functions and classes for managing kikuchipy.
from typing import Any

This module and documentation is only relevant for kikuchipy developers,
not for users.

.. warning:
This module and its submodules are for internal use only. Do not
use them in your own code. We may change the API at any time with no
warning.
"""
class UnknownHemisphereError(ValueError):
def __init__(self, given: Any = None, *args: object) -> None:
msg = "Unknown hemisphere"
if given is not None:
msg += f" {given!r}"
msg += ", options are 'upper', 'lower', or 'both'"
super().__init__(msg, *args)

import lazy_loader

__getattr__, __dir__, __all__ = lazy_loader.attach_stub(__name__, __file__)

del lazy_loader
class UnknownProjectionError(ValueError):
def __init__(self, given: Any = None, *args: object) -> None:
msg = "Unknown projection"
if given is not None:
msg += f" {given!r}"
msg += ", options are 'stereographic' and 'lambert'"
super().__init__(msg, *args)
Loading

0 comments on commit 4e2621a

Please sign in to comment.