Skip to content

Commit

Permalink
Merge pull request #487 from hakonanes/prepare-for-0.12.0-release
Browse files Browse the repository at this point in the history
Prepare for 0.12.0 release
  • Loading branch information
hakonanes committed Apr 12, 2024
2 parents 6028c89 + 934d90b commit df6b507
Show file tree
Hide file tree
Showing 151 changed files with 5,318 additions and 3,113 deletions.
4 changes: 2 additions & 2 deletions .github/pull_request_template.md
Expand Up @@ -2,9 +2,9 @@


#### Progress of the PR
- [ ] [Docstrings for all functions](https://github.com/numpy/numpy/blob/master/doc/example.py)
- [ ] [Docstrings for all functions](https://numpydoc.readthedocs.io/en/latest/example.html)
- [ ] Unit tests with pytest for all lines
- [ ] Clean code style by [running black via pre-commit](https://orix.readthedocs.io/en/latest/contributing.html#code-style)
- [ ] Clean code style by [running black via pre-commit](https://orix.readthedocs.io/en/latest/dev/code_style.html)

#### Minimal example of the bug fix or new feature
```python
Expand Down
18 changes: 8 additions & 10 deletions .github/workflows/build.yml
Expand Up @@ -10,9 +10,6 @@ on:
workflow_dispatch:
workflow: '*'

env:
MPLBACKEND: agg

jobs:
code:
name: code style
Expand All @@ -24,7 +21,7 @@ jobs:

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

- uses: isort/isort-action@master
with:
Expand Down Expand Up @@ -59,16 +56,17 @@ jobs:
name: ${{ matrix.os }}-py${{ matrix.python-version }}${{ matrix.LABEL }}
runs-on: ${{ matrix.os }}
timeout-minutes: 15
env:
MPLBACKEND: agg
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: [3.9, "3.10"]
python-version: ['3.10', '3.11']
include:
- os: ubuntu-latest
python-version: 3.7
OLDEST_SUPPORTED_VERSION: true
DEPENDENCIES: diffpy.structure==3 matplotlib==3.3
python-version: 3.8
DEPENDENCIES: diffpy.structure==3.0.2 matplotlib==3.5
LABEL: -oldest
steps:
- uses: actions/checkout@v3
Expand All @@ -84,7 +82,7 @@ jobs:
pip install -U -e .'[doc, tests]'
- name: Install oldest supported version
if: ${{ matrix.OLDEST_SUPPORTED_VERSION }}
if: ${{ contains(matrix.LABEL, 'oldest') }}
run: |
pip install ${{ matrix.DEPENDENCIES }}
Expand All @@ -102,7 +100,7 @@ jobs:
- name: Run tests
run: |
pytest -n 2 --cov=orix --pyargs orix
pytest --pyargs orix --reruns 2 -n 2 --cov=orix
- name: Generate line coverage
if: ${{ matrix.os == 'ubuntu-latest' }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/perhaps_make_a_tagged_release_draft.yml
Expand Up @@ -15,12 +15,12 @@ jobs:
make-tagged-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-pandoc@v1
- uses: r-lib/actions/setup-pandoc@v2

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

Expand Down
18 changes: 8 additions & 10 deletions .github/workflows/python-publish.yml
Expand Up @@ -20,8 +20,11 @@ on:
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v2
Expand All @@ -37,15 +40,10 @@ jobs:
run: |
python -m build
- name: Publish package to TestPyPI
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
- name: Publish package distribution to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/

- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Publish package distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
17 changes: 10 additions & 7 deletions .github/workflows/test_documentation_notebooks.yml
Expand Up @@ -18,22 +18,25 @@ jobs:
env:
MPLBACKEND: agg
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Python 3.10
uses: actions/setup-python@v2
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Display versions
run: python -V; pip -V
python-version: '3.11'

- name: Install dependencies and package
shell: bash
run: |
pip install -U -e .'[tests, doc]'
pip install nbval
- name: Display versions
run: |
python -V
pip -V
pip list
- name: Test documentation notebooks
run: |
pytest -v --nbval doc
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -67,6 +67,7 @@ doc/build/
doc/examples/
doc/reference/generated/
doc/source/_autosummary/
doc/sg_execution_times.rst

# PyBuilder
target/
Expand Down
8 changes: 6 additions & 2 deletions .pre-commit-config.yaml
@@ -1,15 +1,19 @@
repos:
- repo: https://github.com/psf/black
rev: 23.1.0
rev: 24.3.0
hooks:
- id: black
- id: black-jupyter
files: \.ipynb
args: [--line-length=77]
- repo: https://github.com/pycqa/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
name: isort (python)
args:
[--profile=black, --filter-files, --force-sort-within-sections]
ci:
# Don't run automatically on PRs, instead add the comment
# "pre-commit.ci autofix" on a pull request to manually trigger auto-fixing
autofix_prs: false
9 changes: 9 additions & 0 deletions .zenodo.json
Expand Up @@ -34,9 +34,18 @@
"name": "Anders Christian Mathisen",
"affiliation": "Norwegian University of Science and Technology"
},
{
"name": "Carter Francis",
"orcid": "0000-0003-2564-1851",
"affiliation": "University of Wisconsin Madison"
},
{
"name": "Simon Høgås"
},
{
"name": "Viljar Johan Femoen",
"affiliation": "Norwegian University of Science and Technology"
},
{
"name": "Alexander Clausen",
"orcid": "0000-0002-9555-7455",
Expand Down
55 changes: 55 additions & 0 deletions CHANGELOG.rst
Expand Up @@ -6,6 +6,61 @@ All user facing changes to this project are documented in this file. The format
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>`__.

2024-04-13 - version 0.12.0
===========================

Added
-----
- ``Vector3d.from_path_ends()`` class method to get vectors between two vectors.
- Convenience function ``plot.format_labels()`` to get nicely formatted vector labels to
use when plotting vectors.
- Two offsets in the stereographic coordinates (X, Y) can be given to
``StereographicPlot.text()`` to offset text coordinates.
- Explicit support for Python 3.11.
- Creating quaternions from neo-eulerian vectors via new class methods
``from_rodrigues()`` and ``from_homochoric()``, replacing the now deprecated
``from_neo_euler()``. ``from_rodrigues()`` accepts an angle parameter to allow passing
Rodrigues-Frank vectors.
- Creating neo-eulerian vectors from quaternions via new methods ``to_axes_angles()``,
``to_rodrigues()`` and ``to_homochoric()``. Rodrigues-Frank vectors can be returned
from ``to_rodrigues()`` by passing ``frank=True``.
- ``inv()`` method for ``Quaternion``, ``Rotation``, ``Orientation``, and
``Misorientation``. For the three first, its behavior is identical to the inversion
operator ``~``. For misorientations, it inverts the direction of the transformation.
Convenient for chaining operations.
- The ``random()`` methods of ``Orientation`` and ``Misorientation`` now accept
``symmetry``. A ``random()`` method is also added to ``Vector3d`` and ``Miller``, the
latter accepting a ``phase``.
- Function ``orix.sampling.get_sample_reduced_fundamental()`` for sampling rotations
that rotate the Z-vector (0, 0, 1) onto the fundamental sector of the Laue group of a
given ``Symmetry``.

Changed
-------
- The ``convention`` parameter in ``from_euler()`` and ``to_euler()`` will be removed in
the next minor release, 0.13, instead of release 1.0 as previously stated.
- Allow passing a tuple of integers to ``reshape()`` methods of 3D objects.
- ``random()`` methods no longer accept a list as a valid shape: pass a tuple instead.
- Increase minimal version of Matplotlib to >= 3.5.

Removed
-------
- Support for Python 3.7.

Deprecated
----------
- Creating quaternions from neo-eulerian vectors via ``from_neo_euler()`` is deprecated
and will be removed in v0.13. Use the existing ``from_axes_angles()`` and the new
``from_rodrigues()`` and ``from_homochoric()`` instead.

Fixed
-----
- Transparency of polar stereographic grid lines can now be controlled by Matplotlib's
``grid.alpha``, just like the azimuth grid lines.
- Previously, ``Phase`` did not adjust atom positions when forcing
``Phase.structure.lattice.base`` to use the crystal axes alignment ``e1 || a``,
``e3 || c*``. This is now fixed.

2023-03-14 - version 0.11.1
===========================

Expand Down
3 changes: 1 addition & 2 deletions MANIFEST.in
Expand Up @@ -2,14 +2,13 @@ include CHANGELOG.rst
include CONTRIBUTING.rst
include environment.yml
include LICENSE
include MANIFEST.in
include README.rst
include RELEASE.rst
include readthedocs.yaml
include setup.cfg
include setup.py
include tutorials/README.rst

recursive-include doc Makefile make.bat *.rst *.py *.ipynb *.bib *.txt *.cfg *.sh
recursive-include doc Makefile make.bat *.rst *.py *.ipynb *.bib *.txt *.cfg *.sh *.yml
recursive-include doc/_static *.png *.jpb *.svg *.css *.sh
recursive-include examples *.txt *.py

0 comments on commit df6b507

Please sign in to comment.