pyxem / orix

Analysing crystal orientations and symmetry in Python
https://orix.readthedocs.io
GNU General Public License v3.0
79 stars 45 forks source link

Splitting Misorientation and Orientation into seperate files #449

Closed argerlt closed 1 year ago

argerlt commented 1 year ago

Description of the change

Extremely basic change. This is a blame-preserving and history-preserving split of the Misorientation and Orientation classes into separate python files. (ie, i used git -mv then re-merged branches)

This does not change the inheritance structure discussed in #345 , it just makes the orix/quaternions folder easier to navigate for new users.

Progress of the PR

Minimal example of the bug fix or new feature

>>> import inspect, os
>>> from orix.quaternion import Orientation, Misorientation

>>> # filepath for Orientation Class
>>> ori = Orientation.random(10)
>>> print(inspect.getfile(ori.__class__).split(os.sep)[-3:])
['orix', 'quaternion', 'orientation.py']

>>> # filepath for Misorientation Class
>>> miso = Misorientation.random(10)
>>> print(inspect.getfile(miso.__class__).split(os.sep)[-3:])
['orix', 'quaternion', 'misorientation.py']

For reviewers