Skip to content

Commit

Permalink
Significant update v0.2 (#47)
Browse files Browse the repository at this point in the history
Introduces non-cubic phases, improved support for input file types, and provides initial output file types. Many other bug fixes and improvement. See change log.
---------

Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
Co-authored-by: Håkon Wiik Ånes <hwaanes@gmail.com>
  • Loading branch information
drowenhorst-nrl and hakonanes authored Aug 8, 2023
1 parent 8042afc commit af8c205
Show file tree
Hide file tree
Showing 43 changed files with 4,999 additions and 1,591 deletions.
32 changes: 20 additions & 12 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
# This workflows runs when a tagged release is created or it is triggered manually.
#
# For more information see:
# - Python docs: https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
# - Python docs: https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows
# - GitHub action: https://github.com/marketplace/actions/pypi-publish
# - GitHub docs: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
#
# The source distribution (sdist) is built with the `build` package
# (https://pypa-build.readthedocs.io/en/stable/index.html).
#
# The sdist is uploaded to:
# - TestPyPI whenever the workflow is run
# - PyPI when the current commit is tagged
#
# Trusted publishing to PyPI within GitHub without using an API token: https://blog.pypi.org/posts/2023-04-20-introducing-trusted-publishers

name: Upload to PyPI
name: Upload package to PyPI

on:
release:
Expand All @@ -20,28 +25,31 @@ 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
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: |
python -m build
- name: Publish package to TestPyPI
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
uses: pypa/gh-action-pypi-publish@release/v1
continue-on-error: true
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/

- name: Publish package to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
uses: pypa/gh-action-pypi-publish@release/v1
9 changes: 4 additions & 5 deletions .github/workflows/build.yml → .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build
name: Tests


on:
Expand All @@ -24,7 +24,7 @@ jobs:

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

- name: Install dependencies
run: |
Expand All @@ -42,11 +42,10 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-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: matplotlib==3.3 numba==0.52 numpy==1.19 ray[default]==1.13
LABEL: -oldest
steps:
Expand All @@ -63,7 +62,7 @@ jobs:
pip install -U -e .'[tests]'
- name: Install oldest supported version
if: ${{ matrix.OLDEST_SUPPORTED_VERSION }}
if: contains(matrix.LABEL, 'oldest')
run: |
pip install ${{ matrix.DEPENDENCIES }}
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ dist/
*.code-workspace

# Line coverage
.coverage
.coverage*

# Sphinx
doc/build
Expand Down
6 changes: 3 additions & 3 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ..readthedocs.yaml
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

Expand All @@ -11,9 +11,9 @@ sphinx:

# Set the version of Python and other tools you might need
build:
os: ubuntu-20.04
os: ubuntu-22.04
tools:
python: "3.9"
python: "3.11"

# Build doc in all formats (HTML, PDF and ePub)
formats:
Expand Down
35 changes: 26 additions & 9 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,45 @@ Changelog
All notable changes to PyEBSDIndex will be documented in this file. The format is based
on `Keep a Changelog <https://keepachangelog.com/en/1.1.0>`_.

Unreleased
==========
0.2.0 (2023-08-08)
==================

Added
-----
- Initial support for uncompressed EBSP files from Oxford systems.
- Significant improvement in the particle swarm optimization for pattern center
optimization.
- Initial support for non-cubic phases. Hexagonal verified with EDAX convention.
Others are untested.
- Significant improvements in phase differentiation.
- NLPAR support for Oxford HDF5 and EBSP.
- Initial support for Oxford .h5oina files
- Added IPF coloring/legends for hexagonal phases
- Data output files in .ang and EDAX .oh5 files
- Explicit support for Python 3.11.

Changed
-------

Deprecated
----------
- CRITICAL! All ``ebsd_pattern.EBSDPatternFiles.read_data()`` calls will now return TWO
arguments. The patterns (same as previous), and an nd.array of the x,y location within
the scan of the patterns. The origin is the center of the scan, and reported in
microns.
- ``ebsd_index.index_pats_distributed()`` now will auto optimize the number of patterns
processed at a time depending on GPU capability, and is set as the default.
- Updated tutorials for new features.

Removed
-------
- Removed requirement for installation of pyswarms.
- Removed any references to np.floats and replaced with float() or np.float32/64.

Fixed
-----
- Hough transform figure when ``verbose=2`` is passed to various indexing methods is now
- Radon transform figure when ``verbose=2`` is passed to various indexing methods is now
plotted in its own figure.

Security
--------
- Several bug fixes with NLPAR file reading/writing.
- Complete rewrite of the scheduling for ``ebsd_index.index_pats_distributed()``
function to be compatible with NVIDIA cards.

0.1.1 (2022-10-25)
==================
Expand Down
Binary file modified IPFCubic.pdf
Binary file not shown.
Binary file modified IPFCubic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added IPFHex.pdf
Binary file not shown.
Binary file added IPFHex.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ include CHANGELOG.rst
include CONTRIBUTING.rst
include IPFCubic.pdf
include IPFCubic.png
include IPFHex.pdf
include IPFHex.png
include License
include MANIFEST.in
include README.md
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# PyEBSDIndex

Python based tool for Hough/Radon based EBSD orientation indexing.
Python based tool for Radon based EBSD orientation indexing.

[![Build status](https://github.com/USNavalResearchLaboratory/PyEBSDIndex/actions/workflows/build.yml/badge.svg)](https://github.com/USNavalResearchLaboratory/PyEBSDIndex/actions/workflows/build.yml)
[![Documentation status](https://readthedocs.org/projects/pyebsdindex/badge/?version=latest)](https://pyebsdindex.readthedocs.io/en/latest/)
Expand Down
2 changes: 1 addition & 1 deletion doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
PyEBSDIndex |release| documentation
===================================

Python based tool for Hough/Radon based EBSD orientation indexing.
Python based tool for Radon based EBSD orientation indexing.

The pattern processing is based on a GPU pipeline, and is based on the work of S. I.
Wright and B. L. Adams. Metallurgical Transactions A-Physical Metallurgy and Materials
Expand Down
1 change: 1 addition & 0 deletions doc/reference/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ Functionality is inteded to be imported like this:
ebsd_index
nlpar
pcopt
tripletvote
Loading

0 comments on commit af8c205

Please sign in to comment.