Skip to content

Commit

Permalink
Merge pull request #652 from hakonanes/support-pyebsdindex-0-2
Browse files Browse the repository at this point in the history
Make kikuchipy compatible with PyEBSDIndex 0.2
  • Loading branch information
hakonanes committed Nov 3, 2023
2 parents b7d626c + a794fe8 commit 7e0425a
Show file tree
Hide file tree
Showing 45 changed files with 2,446 additions and 1,998 deletions.
9 changes: 9 additions & 0 deletions .all-contributorsrc
Expand Up @@ -106,6 +106,15 @@
"contributions": [
"doc"
]
},
{
"login": "CSSFrancis",
"name": "Carter Francis",
"avatar_url": "https://avatars.githubusercontent.com/u/41125831?v=4",
"profile": "https://github.com/CSSFrancis",
"contributions": [
"doc"
]
}
]
}
4 changes: 2 additions & 2 deletions .github/pull_request_template.md
Expand Up @@ -3,9 +3,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://kikuchipy.org/en/latest/contributing.html#code-style)
- [ ] Clean code style by [running black via pre-commit](https://kikuchipy.org/en/latest/dev/code_style.html)

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

env:
MPLBACKEND: agg

jobs:
code:
name: code style
Expand Down Expand Up @@ -53,6 +50,9 @@ jobs:
name: ${{ matrix.os }}-py${{ matrix.python-version }}${{ matrix.LABEL }}
runs-on: ${{ matrix.os }}
timeout-minutes: 15
env:
MPLBACKEND: agg
PYTEST_ARGS: --pyargs kikuchipy --reruns 2 -n 2 --cov=kikuchipy
strategy:
fail-fast: false
matrix:
Expand All @@ -61,7 +61,7 @@ jobs:
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 scikit-image==0.16.2
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
LABEL: -oldest
- os: ubuntu-latest
python-version: 3.11
Expand Down Expand Up @@ -120,12 +120,12 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install xvfb
xvfb-run pytest -n 2 --cov=kikuchipy --pyargs kikuchipy
xvfb-run pytest ${{ env.PYTEST_ARGS }}
- name: Run tests on Windows and macOS
- name: Run tests on Windows or macOS
if: ${{ matrix.os != 'ubuntu-latest' }}
run: |
pytest -n 2 --cov=kikuchipy --pyargs kikuchipy
pytest ${{ env.PYTEST_ARGS }}
- name: Generate line coverage
run: |
Expand Down
5 changes: 5 additions & 0 deletions .zenodo.json
Expand Up @@ -32,6 +32,11 @@
"orcid": "0000-0003-0311-8584",
"affiliation": "Norwegian University of Science and Technology"
},
{
"name": "Carter Francis",
"orcid": "0000-0003-2564-1851",
"affiliation": "University of Wisconsin Madison"
},
{
"name": "Magnus Nord",
"orcid": "0000-0001-7981-5293",
Expand Down
29 changes: 23 additions & 6 deletions CHANGELOG.rst
Expand Up @@ -19,7 +19,19 @@ Unreleased
Added
-----
- Explicit support for Python 3.11.
(`#645 <https://github.com/pyxem/kikuchipy/pull/645>`_)
(`#646 <https://github.com/pyxem/kikuchipy/pull/646>`_)
- Allow Hough indexing of all Laue groups with PyEBSDIndex v0.2 (not just *m-3m*, i.e.
FCC and BCC). (`#652 <https://github.com/pyxem/kikuchipy/pull/652>`_)
- Control of reflector lists in Hough indexing. One reflector list per phase in the
phase list can be passed to ``EBSDDetector.get_indexer()`` when obtaining the
``EBSDIndexer`` for use in ``EBSD.hough_indexing()``.
(`#652 <https://github.com/pyxem/kikuchipy/pull/652>`_)
- Allow passing keyword arguments to ``EBSD.hough_indexing_optimize_pc()`` to control
particle swarm optimization (PSO). These are passed on to the new PSO algorithm in
PyEBSDIndex v0.2. (`#652 <https://github.com/pyxem/kikuchipy/pull/652>`_)
- Allow getting one projection center (PC) per pattern when optimizing PCs using the new
particle swarm optimization in PyEBSDIndex v0.2 (passing ``batch=True``).
(`#652 <https://github.com/pyxem/kikuchipy/pull/652>`_)

Changed
-------
Expand All @@ -28,8 +40,13 @@ Changed
internally to set the default color to white anymore, but uses ``fc`` (facecolor)
instead. This change was necessary to improve handling of other keyword arguments.
(`#643 <https://github.com/pyxem/kikuchipy/pull/643>`_)
- Increase minimal versions of diffsims, NumPy, and Matplotlib to 0.5.1, 1.21.6, and
3.5 respectively. (`#645 <https://github.com/pyxem/kikuchipy/pull/645>`_)
- Increase minimal versions of diffsims, NumPy, Matplotlib, and PyEBSDIndex to 0.5.1,
1.21.6, 3.5, and 0.2, respectively.
(`#646 <https://github.com/pyxem/kikuchipy/pull/646>`_,
`#652 <https://github.com/pyxem/kikuchipy/pull/652>`_)
- Remove dependency on panel for documentation, and with that interactive 3D
visualization of master patterns in the documentation (the hope is to reintroduce it
with trame at some point). (`#652 <https://github.com/pyxem/kikuchipy/pull/652>`_)

Deprecated
----------
Expand All @@ -43,9 +60,9 @@ Removed

Fixed
-----

Security
--------
- Conversion from EDAX TSL projection center (PC) convention for (PCy, PCz) for
rectangular detectors is corrected.
(`#652 <https://github.com/pyxem/kikuchipy/pull/652>`_)

0.8.7 (2023-07-24)
==================
Expand Down
193 changes: 100 additions & 93 deletions CODE_OF_CONDUCT.rst
Expand Up @@ -5,134 +5,141 @@ kikuchipy Code of Conduct
Introduction
============

This code of conduct applies to all spaces managed by the kikuchipy project,
including all public and private mailing lists, issue trackers, wikis, blogs,
Twitter, and any other communication channel used by our community. The
kikuchipy project does not organise in-person events, however events related to
our community should have a code of conduct similar in spirit to this one.

This code of conduct should be honoured by everyone who participates in the
kikuchipy community formally or informally, or claims any affiliation with the
project, in any project-related activities and especially when representing the
project, in any role.

This code is not exhaustive or complete. It serves to distill our common
understanding of a collaborative, shared environment and goals. Please try to
follow this code in spirit as much as in letter, to create a friendly and
This code of conduct applies to all spaces managed by the kikuchipy project, including
all public and private mailing lists, issue trackers, wikis, blogs, and any other
communication channel used by our community.
The kikuchipy project does not organise in-person events, however events related to our
community should have a code of conduct similar in spirit to this one.

This code of conduct should be honoured by everyone who participates in the kikuchipy
community formally or informally, or claims any affiliation with the project, in any
project-related activities and especially when representing the project, in any role.

This code is not exhaustive or complete. It serves to distill our common understanding
of a collaborative, shared environment and goals.
Please try to follow this code in spirit as much as in letter, to create a friendly and
productive environment that enriches the surrounding community.

Specific guidelines
===================

We strive to:

1. Be open. We invite anyone to participate in our community. We prefer to use
public methods of communication for project-related messages, unless
discussing something sensitive. This applies to messages for help or
project-related support, too; not only is a public-support request much more
likely to result in an answer to a question, it also ensures that any
inadvertent mistakes in answering are more easily detected and corrected.

2. Be empathetic, welcoming, friendly, and patient. We work together to resolve
conflict, and assume good intentions. We may all experience some frustration
from time to time, but we do not allow frustration to turn into a personal
attack. A community where people feel uncomfortable or threatened is not a
productive one.

3. Be collaborative. Our work will be used by other people, and in turn we will
depend on the work of others. When we make something for the benefit of the
project, we are willing to explain to others how it works, so that they can
build on the work to make it even better. Any decision we make will affect
users and colleagues, and we take those consequences seriously when making
decisions.

4. Be inquisitive. Nobody knows everything! Asking questions early avoids many
problems later, so we encourage questions, although we may direct them to the
appropriate forum. We will try hard to be responsive and helpful.

5. Be careful in the words that we choose. We are careful and respectful in our
communication and we take responsibility for our own speech. Be kind
others. Do not insult or put down other participants. We will not accept
harassment or other exclusionary behaviour, such as:
1. Be open.
We invite anyone to participate in our community.
We prefer to use public methods of communication for project-related messages, unless
discussing something sensitive.
This applies to messages for help or project-related support, too; not only is a
public-support request much more likely to result in an answer to a question, it also
ensures that any inadvertent mistakes in answering are more easily detected and
corrected.

2. Be empathetic, welcoming, friendly, and patient.
We work together to resolve conflict, and assume good intentions.
We may all experience some frustration from time to time, but we do not allow
frustration to turn into a personal attack.
A community where people feel uncomfortable or threatened is not a productive one.

3. Be collaborative.
Our work will be used by other people, and in turn we will depend on the work of
others.
When we make something for the benefit of the project, we are willing to explain to
others how it works, so that they can build on the work to make it even better.
Any decision we make will affect users and colleagues, and we take those consequences
seriously when making decisions.

4. Be inquisitive.
Nobody knows everything!
Asking questions early avoids many problems later, so we encourage questions,
although we may direct them to the appropriate forum.
We will try hard to be responsive and helpful.

5. Be careful in the words that we choose.
We are careful and respectful in our communication and we take responsibility for our
own speech.
Be kind others.
Do not insult or put down other participants.
We will not accept harassment or other exclusionary behaviour, such as:

- Violent threats or language directed against another person.
- Sexist, racist, ableist, or otherwise discriminatory jokes and language.
- Posting sexually explicit or violent material.
- Posting (or threatening to post) other people's personally identifying
information ("doxing").
- Sharing private content, such as emails sent privately or non-publicly, or
unlogged forums such as IRC channel history, without the sender's consent.
- Posting (or threatening to post) other people's personally identifying information
("doxing").
- Sharing private content, such as emails sent privately or non-publicly, or unlogged
forums such as IRC channel history, without the sender's consent.
- Personal insults, especially those using racist, sexist, or ableist terms.
- Intentional or repeated misgendering of participants who have explicitly
requested to be addressed by specific pronouns.
- Intentional or repeated misgendering of participants who have explicitly requested
to be addressed by specific pronouns.
- Unwelcome sexual attention.
- Excessive profanity. Please avoid swearwords; people differ greatly in
their sensitivity to swearing.
- Repeated harassment of others. In general, if someone asks you to stop,
then stop.
- Excessive profanity.
Please avoid swearwords; people differ greatly in their sensitivity to swearing.
- Repeated harassment of others.
In general, if someone asks you to stop, then stop.
- Advocating for, or encouraging, any of the above behaviour.

Diversity statement
===================

The kikuchipy project welcomes and encourages participation by everyone. We are
committed to being a community that everyone enjoys being part of. Although we
may not always be able to accommodate each individual's preferences, we try our
best to treat everyone kindly.
The kikuchipy project welcomes and encourages participation by everyone.
We are committed to being a community that everyone enjoys being part of.
Although we may not always be able to accommodate each individual's preferences, we try
our best to treat everyone kindly.

No matter how you identify yourself or how others perceive you: we welcome you.
Though no list can hope to be comprehensive, we explicitly honour diversity in:
age, culture, ethnicity, genotype, gender identity or expression, language,
national origin, neurotype, phenotype, political beliefs, profession, race,
religion, sexual orientation, socioeconomic status, subculture and technical
ability, to the extent that these do not conflict with this code of conduct.
Though no list can hope to be comprehensive, we explicitly honour diversity in: age,
culture, ethnicity, genotype, gender identity or expression, language, national origin,
neurotype, phenotype, political beliefs, profession, race, religion, sexual orientation,
socioeconomic status, subculture and technical ability, to the extent that these do not
conflict with this code of conduct.

Though we welcome people fluent in all languages, kikuchipy development is
conducted in English.
Though we welcome people fluent in all languages, kikuchipy development is conducted in
English.

Standards for behaviour in the kikuchipy community are detailed in the Code of
Conduct above. Participants in our community should uphold these standards in
all their interactions and help others to do so as well (see next section).
Standards for behaviour in the kikuchipy community are detailed in the Code of Conduct
above.
Participants in our community should uphold these standards in all their interactions
and help others to do so as well (see next section).

Reporting guidelines
====================

We know that it is painfully common for internet communication to start at or
devolve into obvious and flagrant abuse. We also recognize that sometimes people
may have had a bad day, or be unaware of some of the guidelines in this Code of
Conduct. Please keep this in mind when deciding how to respond to a breach of
this Code.
We know that it is painfully common for internet communication to start at or devolve
into obvious and flagrant abuse.
We also recognize that sometimes people may have had a bad day, or be unaware of some of
the guidelines in this Code of Conduct.
Please keep this in mind when deciding how to respond to a breach of this Code.

For clearly intentional breaches, report those to the Code of Conduct Committee
(see below). For possibly unintentional breaches, you may reply to the person
and point out this Code of Conduct (either in public or in private, whatever is
most appropriate). If you would prefer not to do that, please feel free to
report to the code of conduct committee directly, or ask the committee for
advice, in confidence.
For clearly intentional breaches, report those to the Code of Conduct Committee (see
below).
For possibly unintentional breaches, you may reply to the person and point out this Code
of Conduct (either in public or in private, whatever is most appropriate).
If you would prefer not to do that, please feel free to report to the code of conduct
committee directly, or ask the committee for advice, in confidence.

You can report issues to the kikuchipy Code of Conduct Committee, at
kikuchipy-conduct@googlegroups.com. Currently, the committee consists of:
kikuchipy-conduct@googlegroups.com.
Currently, the committee consists of:

* `Håkon Wiik Ånes <https://github.com/hakonanes>`_ (chair)
* `Tina Bergh <https://github.com/tinabe>`_

Incident reporting resolution & Code of Conduct enforcement
===========================================================

*This section summarizes the most important points, more details can be found
in* :doc:`report_handling_manual`.
*This section summarizes the most important points, more details can be found in*
:doc:`report_handling_manual`.

We will investigate and respond to all complaints. The kikuchipy Code of Conduct
Committee will protect the identity of the reporter, and treat the content of
complaints as confidential (unless the reporter agrees otherwise).
We will investigate and respond to all complaints.
The kikuchipy Code of Conduct Committee will protect the identity of the reporter, and
treat the content of complaints as confidential (unless the reporter agrees otherwise).

In case of severe and obvious breaches, e.g. personal threat or violent,
sexist or racist language, we will immediately disconnect the originator from
kikuchipy communication channels; please see the manual for details.
In case of severe and obvious breaches, e.g. personal threat or violent, sexist or
racist language, we will immediately disconnect the originator from kikuchipy
communication channels; please see the manual for details.

In cases not involving clear severe and obvious breaches of this code of
conduct, the process for acting on any received code of conduct violation report
will be:
In cases not involving clear severe and obvious breaches of this code of conduct, the
process for acting on any received code of conduct violation report will be:

1. acknowledge report is received

Expand All @@ -144,14 +151,14 @@ will be:
4. enforcement via transparent decision (see :ref:`resolutions`) by the Code of
Conduct Committee

The committee will respond to any report as soon as possible, and at most within
72 hours.
The committee will respond to any report as soon as possible, and at most within 72
hours.

Endnotes
========

We are thankful to the groups behind the following documents, from which we drew
content and inspiration:
We are thankful to the groups behind the following documents, from which we drew content
and inspiration:

* `napari Code of Conduct <https://napari.org/community/code_of_conduct.html>`_
* `NumPy Code of Conduct <https://numpy.org/code-of-conduct>`_

0 comments on commit 7e0425a

Please sign in to comment.