Skip to content

Commit

Permalink
Merge pull request #678 from hakonanes/prepare-for-0.10.0-release
Browse files Browse the repository at this point in the history
Prepare for 0.10.0 release
  • Loading branch information
hakonanes authored Jun 2, 2024
2 parents 9b76c65 + 78eca0d commit 0321d87
Show file tree
Hide file tree
Showing 191 changed files with 1,209 additions and 1,159 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/perhaps_make_tagged_release_draft.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019-2023 The kikuchipy developers
# Copyright 2019-2024 The kikuchipy developers
#
# This file is part of kikuchipy.
#
Expand All @@ -19,7 +19,6 @@

from outdated import check_outdated


with open("../../kikuchipy/release.py") as fid:
for line in fid:
if line.startswith("version"):
Expand Down
34 changes: 24 additions & 10 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,24 @@ on:
branches:
- '*'
workflow_dispatch:
workflow: '*'

jobs:
code:
name: code style
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: psf/black@stable

- uses: actions/setup-python@v5
with:
python-version: '3.11'

- uses: isort/isort-action@master
with:
configuration: --profile black --filter-files --force-sort-within-sections --check-only --diff

- name: Install Black with Jupyter extension
run: |
pip install black[jupyter]
Expand All @@ -32,9 +39,9 @@ jobs:
name: check manifest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'

Expand All @@ -60,17 +67,17 @@ jobs:
python-version: ['3.10', '3.11']
include:
- os: ubuntu-latest
python-version: 3.7
DEPENDENCIES: dask==2021.8.1 diffsims==0.5.1 hyperspy==1.7.3 matplotlib==3.5 numba==0.55 numpy==1.21.6 orix==0.11.1 pooch==1.3.0 pyebsdindex==0.2 scikit-image==0.16.2
python-version: 3.8
DEPENDENCIES: dask==2021.8.1 diffsims==0.5.2 hyperspy==1.7.3 matplotlib==3.5 numba==0.57 numpy==1.23.0 orix==0.12.1 pooch==1.3.0 pyebsdindex==0.2.0 scikit-image==0.21.0
LABEL: -oldest
- os: ubuntu-latest
python-version: 3.11
LABEL: -minimum_requirement
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -85,13 +92,20 @@ jobs:
run: |
pip install ${{ matrix.DEPENDENCIES }}
- name: Install optional dependencies
if: ${{ contains(matrix.LABEL, 'minimum_requirement') == false }}
- name: Install optional dependencies on Linux and Windows
if: ${{ contains(matrix.LABEL, 'minimum_requirement') == false && matrix.os != 'macos-latest' }}
shell: bash
run: |
pip install -e .'[all]'
pip install pyopencl
- name: Install optional dependencies on macOS (without nlopt)
if: ${{ contains(matrix.LABEL, 'minimum_requirement') == false && matrix.os == 'macos-latest' }}
shell: bash
run: |
pip install -e .
pip install 'pyebsdindex[gpu]' pyvista
- name: Display Python, pip and package versions
run: |
python -V
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ instance/
doc/build/
doc/reference/generated/
doc/examples/
sg_execution_times.rst

# PyBuilder
target/
Expand Down
19 changes: 16 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
repos:
- repo: https://github.com/psf/black
rev: 23.1.0
hooks:
# https://black.readthedocs.io/en/stable/index.html
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.4.2
hooks:
- id: black
language_version: python3.11
- id: black-jupyter
files: \.ipynb
args: [--line-length=77]
# https://pycqa.github.io/isort/
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
name: isort (python)
args:
[--profile=black, --filter-files, --force-sort-within-sections]
34 changes: 32 additions & 2 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,36 @@ its best to adhere to `Semantic Versioning <https://semver.org/spec/v2.0.0.html>
List entries are sorted in descending chronological order. Contributors to each release
were listed in alphabetical order by first name until version 0.7.0.

0.10.0 (2024-06-02)
===================

Changed
-------
- Minimum Python version is now 3.8.
(`#674 <https://github.com/pyxem/kikuchipy/pull/674>`_)
- Minimum NumPy version is now 1.23.0.
(`#674 <https://github.com/pyxem/kikuchipy/pull/674>`_)
- Minimum Numba version is now 0.57.0.
(`#674 <https://github.com/pyxem/kikuchipy/pull/674>`_)
- Minimum scikit-image version is now 0.22.0.
(`#674 <https://github.com/pyxem/kikuchipy/pull/674>`_)
- Upon creation of an ``EBSDDetector``, the following attributes are forced to be
floats: sample tilt, tilt, azimuthal angle, binning, pixel size, and the projection
centers (PCs). (`#677 <https://github.com/pyxem/kikuchipy/pull/677>`_)
- Simpler string representation of an ``EBSDDetector``, also showing the sample tilt.
(`#677 <https://github.com/pyxem/kikuchipy/pull/677>`_)
- Exclude PyEBSDIndex versions 0.3.0 and 0.3.1 since these versions cannot perform Hough
indexing with Dask arrays. This was previously unintentionally supported due to a
side-effect. It should now be supported going forward.
(`#678 <https://github.com/pyxem/kikuchipy/pull/678>`_)

Fixed
-----
- The order of the new shape of the detector of a downsampled EBSD signal, returned from
``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 Expand Up @@ -513,8 +543,8 @@ Deprecated
removed in version 0.7. Use the ``kikuchipy.simulations.KikuchiPatternSimulator``
class instead. (`#537 <https://github.com/pyxem/kikuchipy/pull/537>`_)
- The ``kikuchipy.crystallography.matrices`` module is deprecated and will be removed in
version 0.7, access the matrices via :class:`diffpy.structure.lattice.Lattice`
attributes instead. (`#537 <https://github.com/pyxem/kikuchipy/pull/537>`_)
version 0.7, access the matrices via ``diffpy.structure.lattice.Lattice`` attributes
instead. (`#537 <https://github.com/pyxem/kikuchipy/pull/537>`_)
- The following functions for processing of pattern chunks in the
``kikuchipy.pattern.chunk`` module are deprecated and will be removed in version 0.7:
``get_image_quality()``, ``remove_dynamic_background()`` and
Expand Down
47 changes: 24 additions & 23 deletions RELEASE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,37 +14,37 @@ Preparation
- Locally, create a minor release branch from the ``develop`` branch when making a minor
release, or create a patch release branch from the ``main`` branch when making a patch
release. Ideally, a patch release is published immediately after a bug fix is merged
in ``main``. Therefore, it might be best to do the release updates directly on the bug
fix branch, so that no separate patch release branch has to be made.
on ``main``. Therefore, it might be best to do the release updates directly on the bug
fix branch. This way, we do not have to create a separate patch release branch.

- Run tutorial notebooks and examples in the documentation locally and confirm that they
produce the expected results.
From time to time, check the documentation links (``make linkcheck``) and fix any
broken ones.
- Run tutorial notebooks and examples in the documentation locally.
Confirm that they produce the expected results.
From time to time, check the documentation links (``make linkcheck``).
Fix broken links.

- Review the contributor list ``__credits__`` in ``kikuchipy/release.py`` to ensure all
contributors are included and sorted correctly.
- Ensure all contributors are included and sorted correctly by reviewing the contributor
list ``__credits__`` in ``kikuchipy/release.py``.
Do the same for the Zenodo contributors file ``.zenodo.json``.
Review ``.all-contributorsrc`` and regenerate the table if necessary.

- Increment the version number in ``kikuchipy/release.py``.
Review and clean up ``CHANGELOG.rst`` as per Keep a Changelog.

- Make a PR of the release branch to ``main``.
Discuss the changelog with others, and make any changes *directly* to the release
Discuss the changelog with others and make any changes *directly* to the release
branch.
Merge the branch into ``main``.
Merge the branch onto ``main``.

Tag and release
---------------
- If the ``__version__`` in ``kikuchipy/release.py`` on ``main`` has changed in a new
commit, a tagged, annotated release *draft* is automatically created.
If ``__version__`` is now "0.42.0", the release name is "kikuchipy 0.42.0", and the
If ``__version__`` is now "0.42.0", the release name is "kikuchipy 0.42.0" and the
tag name is "v0.42.0".
The tag target will be the ``main`` branch.
The release body contains a static description and a link to the changelog.
This release draft can be published as is, or changes to the release body can be made
before publishing.
This release draft can be published as is.
Or, changes to the release body can be made before publishing.

- Monitor the publish workflow to ensure the release is successfully published to PyPI.

Expand All @@ -56,21 +56,22 @@ Post-release action
- Ensure that `Zenodo <https://doi.org/10.5281/zenodo.3597646>`__ displays the new
release.

- Ensure that Binder can run the user guide notebooks by clicking the Binder badges in
the top banner of one of the tutorials via `Read The Docs
- Ensure that Binder can run the tutorial notebooks by clicking the Binder badge in the
top banner of one of the tutorials in the `online documentation
<https://kikuchipy.org/en/stable>`__.

- Bring changes on ``main`` into ``develop`` by branching from ``main``, merge
``develop`` into the new branch and fix potential conflicts.
After these conflicts are fixed, update or revert ``__version__`` and make any updates
- Bring changes on ``main`` onto ``develop`` by branching from ``main``, merging
``develop`` onto the new branch, and fixing potential conflicts.
After any conflicts are fixed, update or revert ``__version__`` and make any updates
to this guide if necessary.
Make a PR to ``develop`` and merge.

- Tidy up GitHub issues and close the corresponding milestone.

- A PR to the conda-forge feedstock will be created by the conda-forge bot.
Follow the relevant instructions from the conda-forge documentation on updating
packages, as well as the instructions in the PR.
Merge after checks pass.
Monitor the Azure pipeline CI to ensure the release is successfully published to
- A PR to the conda-forge feedstock will automatically be created by the conda-forge
bot.
Follow the instructions in the PR and any relevant instructions in the conda-forge
documentation on updating packages.
Merge the PR after checks pass.
Monitor the Azure pipeline CI to ensure that the release is successfully published to
conda-forge.
2 changes: 1 addition & 1 deletion benchmarks/indexing/test_dictionary_indexing.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019-2023 The kikuchipy developers
# Copyright 2019-2024 The kikuchipy developers
#
# This file is part of kikuchipy.
#
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/indexing/test_refinement.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019-2023 The kikuchipy developers
# Copyright 2019-2024 The kikuchipy developers
#
# This file is part of kikuchipy.
#
Expand Down
5 changes: 2 additions & 3 deletions doc/_static/image/reference_frames/doc_reference_frames.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019-2023 The kikuchipy developers
# Copyright 2019-2024 The kikuchipy developers
#
# This file is part of kikuchipy.
#
Expand All @@ -19,9 +19,8 @@

import matplotlib.pyplot as plt

from kikuchipy.detectors import EBSDDetector
from kikuchipy import load

from kikuchipy.detectors import EBSDDetector

data = "/home/hakon/kode/kikuchipy/kikuchipy/data/kikuchipy_h5ebsd/patterns.h5"
outdir = "/home/hakon/kode/kikuchipy/doc/_static/image"
Expand Down
5 changes: 2 additions & 3 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,15 @@
from datetime import datetime
import inspect
import os
from os.path import relpath, dirname
from os.path import dirname, relpath
import re
import sys

import pyvista as pv
from numpydoc.docscrape_sphinx import SphinxDocString
import pyvista as pv

import kikuchipy as kp


# If extensions (or modules to document with autodoc) are in another
# directory, add these directories to sys.path here. If the directory
# is relative to the documentation root, use os.path.abspath to make it
Expand Down
262 changes: 136 additions & 126 deletions doc/tutorials/esteem2022_diffraction_workshop.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion doc/tutorials/feature_maps.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@
" colorbar=True,\n",
" colorbar_label=\"Average dot product\",\n",
" remove_padding=True,\n",
" return_figure=True\n",
" return_figure=True,\n",
")\n",
"fig.axes[0].scatter(x, y, c=\"r\");"
]
Expand Down
10 changes: 5 additions & 5 deletions doc/tutorials/hough_indexing.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@
" [[1, 1, 1], [2, 0, 0], [2, 2, 0], [3, 1, 1]],\n",
" nBands=10,\n",
" tSigma=2,\n",
" rSigma=2\n",
" rSigma=2,\n",
")\n",
"\n",
"print(indexer.vendor)\n",
Expand Down Expand Up @@ -475,7 +475,7 @@
" [[1, 1, 1], [2, 0, 0], [2, 2, 0], [3, 1, 1]],\n",
" nBands=10,\n",
" tSigma=2,\n",
" rSigma=2\n",
" rSigma=2,\n",
")\n",
"indexer.PC"
]
Expand Down Expand Up @@ -527,14 +527,14 @@
"metadata": {},
"outputs": [],
"source": [
"#io.save(\"xmap_ni.h5\", xmap)\n",
"#io.save(\n",
"# io.save(\"xmap_ni.h5\", xmap)\n",
"# io.save(\n",
"# \"xmap_ni.ang\",\n",
"# xmap,\n",
"# image_quality_prop=\"pq\",\n",
"# confidence_index_prop=\"cm\",\n",
"# extra_prop=\"nmatch\",\n",
"#)"
"# )"
]
},
{
Expand Down
Loading

0 comments on commit 0321d87

Please sign in to comment.