Skip to content

Commit

Permalink
Merge #430 from hakonanes/prepare-0.11-release
Browse files Browse the repository at this point in the history
Bring develop into main for 0.11.0 release
  • Loading branch information
pc494 authored Feb 9, 2023
2 parents 15ea242 + f8a6a85 commit c7af446
Show file tree
Hide file tree
Showing 154 changed files with 4,200 additions and 2,649 deletions.
64 changes: 42 additions & 22 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,64 @@
name: build

on: [push, pull_request]
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
workflow_dispatch:
workflow: '*'

env:
MPLBACKEND: agg

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

- uses: psf/black@stable
- uses: actions/setup-python@v2

- uses: actions/setup-python@v4
with:
python-version: 3.9

- 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]
run: |
pip install black[jupyter]
- name: Check code style of Jupyter notebooks
run: black doc/**/*.ipynb --check
run: |
black --diff --line-length 77 doc/tutorials/*.ipynb
# Make sure all necessary files will be included in a release
manifest:
name: check manifest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: actions/setup-python@v2
- uses: actions/setup-python@v4

- name: Install dependencies
run: pip install manifix
run: |
pip install manifix
- name: Check MANIFEST.in file
run: python setup.py manifix
run: |
python setup.py manifix
build-with-pip:
name: ${{ matrix.os }}-py${{ matrix.python-version }}${{ matrix.LABEL }}
runs-on: ${{ matrix.os }}
timeout-minutes: 15
env:
MPLBACKEND: agg
strategy:
fail-fast: false
matrix:
Expand All @@ -55,26 +71,28 @@ jobs:
DEPENDENCIES: diffpy.structure==3 matplotlib==3.3
LABEL: -oldest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

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

- name: Display Python and pip versions
run: python -V; pip -V

- name: Install depedencies and package
shell: bash
run: pip install -U -e .'[doc, tests]'
run: |
pip install -U -e .'[doc, tests]'
- name: Install oldest supported version
if: ${{ matrix.OLDEST_SUPPORTED_VERSION }}
run: pip install ${{ matrix.DEPENDENCIES }}
run: |
pip install ${{ matrix.DEPENDENCIES }}
- name: Display package versions
run: pip list
- name: Display Python, pip and package versions
run: |
python -V
pip -V
pip list
- name: Run docstring tests
if: ${{ matrix.os == 'ubuntu-latest' }}
Expand All @@ -83,11 +101,13 @@ jobs:
pytest --doctest-modules --ignore-glob=orix/tests orix/*.py
- name: Run tests
run: pytest --cov=orix --pyargs orix
run: |
pytest -n 2 --cov=orix --pyargs orix
- name: Generate line coverage
if: ${{ matrix.os == 'ubuntu-latest' }}
run: coverage report --show-missing
run: |
coverage report --show-missing
- name: Upload coverage to Coveralls
if: ${{ matrix.os == 'ubuntu-latest' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/perhaps_make_tagged_release_draft.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019-2022 The orix developers
# Copyright 2018-2023 The orix developers
#
# This file is part of orix.
#
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ instance/
.scrapy

# Sphinx documentation
doc/_build/
doc/build/
doc/examples/
doc/reference/generated/
doc/source/_autosummary/
Expand Down
14 changes: 6 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
repos:
- repo: https://github.com/psf/black
rev: 22.3.0
rev: 23.1.0
hooks:
- id: black
- id: black-jupyter
files: \.ipynb
args: [--line-length=77]
- repo: https://github.com/pycqa/isort
rev: 5.10.1
rev: 5.12.0
hooks:
- id: isort
name: isort (python)
args:
[
"--profile",
"black",
"--filter-files",
"--force-sort-within-sections",
]
[--profile=black, --filter-files, --force-sort-within-sections]
4 changes: 4 additions & 0 deletions .zenodo.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
"orcid": "0000-0002-2204-2055",
"affiliation": "The Ohio State University"
},
{
"name": "Anders Christian Mathisen",
"affiliation": "Norwegian University of Science and Technology"
},
{
"name": "Simon Høgås"
},
Expand Down
61 changes: 57 additions & 4 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,70 @@
Changelog
=========

All notable changes to the ``orix`` project are documented in this file.
All user facing changes to this project are documented in this file. The format is based
on `Keep a Changelog <https://keepachangelog.com/en/1.0.0/>`__, and this project tries
its best to adhere to `Semantic Versioning <https://semver.org/spec/v2.0.0.html>`__.

The format is based on `Keep a Changelog <https://keepachangelog.com/en/1.0.0/>`_, and
this project adheres to `Semantic Versioning <https://semver.org/spec/v2.0.0.html>`_.
2023-02-09 - version 0.11.0
===========================

Added
-----
- Creation of one or more ``Quaternion`` (or instances of inheriting classes) from one
or more SciPy ``Rotation``.
- Creation of one ``Quaternion`` or ``Rotation`` by aligning sets of vectors in two
reference frames, one ``Orientation`` by aligning sets of sample vectors and crystal
vectors, and one ``Misorientation`` by aligning two sets of crystal vectors in two
different crystals.
- ``row`` and ``col`` properties to ``CrystalMap`` giving the row and column coordinate
of each map point given by ``CrystalMap.shape``.
- ``Rotation`` class methods ``from_neo_euler()``, ``from_axes_angles()``,
``from_euler()``, ``from_matrix()``, ``random()`` and ``identity()`` and methods
``to_euler()`` and ``to_matrix()`` are now available from the ``Quaternion`` class as
well.
- ``StereographicPlot.restrict_to_sector()`` allows two new parameters to control the
amount of padding (in degrees in stereographic projection) and whether to show the
sector edges. Keyword arguments can also be passed on to Matplotlib's ``PathPatch()``.
- Option to pass degrees to the ``Quaternion`` methods ``from_axes_angles()``,
``from_euler()`` and ``to_euler()`` by passing ``degrees=True``.
- Option to get degrees from all ``angle_with()`` and ``angle_with_outer()`` methods
by passing ``degrees=True``.
- Option to pass degrees to the ``(Mis)Orientation`` method ``get_distance_matrix()``
by passing ``degrees=True``.
- Option to pass degrees to the ``Vector3d`` methods ``from_polar()`` and ``to_polar()``
by passing ``degrees=True``.
- Option to get spherical coordinates from
``InverseStereographicProjection.xy2spherical()`` in degrees or pass them as degrees
to ``StereographicProjection`` methods ``spherical2xy()`` and ``spherical2xy_split()``
by passing ``degrees=True``.


Changed
-------
- Bumped minimal version of ``diffpy.structure >= 3.0.2``.
- Only ASTAR .ang files return crystal maps with ``"nm"`` as scan unit.

Removed
-------
- Parameter ``z`` when creating a ``CrystalMap`` and the ``z`` and ``dz`` attributes of
the class were deprecated in 0.10.1 and are now removed.
- Passing ``shape`` or ``step_sizes`` with three values to
``create_coordinate_arrays()`` was depreacted in 0.10. and will now raise an error.
- Parameter ``depth`` (and ``axes``) in ``CrystalMapPlot.plot_map()`` was depreacted in
0.10.1 and will now raise an error if passed.
- The ``z`` and ``dz`` datasets are not present in new orix HDF5 files. They are not
read if present in older files.

Fixed
-----
- Reading of EDAX TSL .ang files with ten columns should now work.

2022-10-25 - version 0.10.2
===========================

Fixed
-----
- ``Miller.symmetrise(unique=True)`` return the correct number of symmetrically
- ``Miller.symmetrise(unique=True)`` returns the correct number of symmetrically
equivalent but unique vectors, by rounding to 10 instead of 12 decimals prior to
finding the unique vectors with NumPy.

Expand Down
Loading

0 comments on commit c7af446

Please sign in to comment.