Commit Graph

122 Commits

Author SHA1 Message Date
Martin Diehl 35caed305f consistently define allclose for own type only 2022-02-15 22:08:12 +01:00
Martin Diehl b1922c9fc0 return most specific type 2022-02-13 11:03:53 +01:00
Martin Diehl 2907facfd3 polishing
classes should return 'MyType' for inheritance without hassle
2022-02-13 02:47:08 +01:00
Philip Eisenlohr c6a188a1fe added CrystalFamily, CrystalLattice, CrystalKinematics typehints 2022-02-11 15:41:30 -05:00
Philip Eisenlohr 0a52ae3b6f polishing of help and style; relax to FloatSequence type where appropriate but keep doc at np.ndarray 2022-02-11 14:50:55 -05:00
Daniel Otto de Mentock 8c6225794d adjusted return of Orientation.__ne__ function to return NotImplemented in case of wrong input type 2022-02-08 14:47:23 +01:00
Martin Diehl a6e83c70ec adjustments to follow de-facto standard in other parts of the python
library
2022-02-06 17:12:35 +01:00
Daniel Otto de Mentock c1c2336638 reverted __eq__ and __ne type verification to return NotImplemented constant
changed rotation.average input type to FloatSequence

minor adjustments
2022-02-04 16:57:25 +01:00
Daniel Otto de Mentock 019ae1c536 adjusted typecheck in __eq__ and __ne__ functions 2022-02-04 11:43:35 +01:00
Daniel Otto de Mentock 7a405125da added type:ignore statements to Tuple Supportsindex addition in Orientation.disorientation function 2022-02-04 10:57:24 +01:00
Daniel Otto de Mentock 9dad54304c added generic types to remaining non-overwritten rotation functions (exception __mul__) 2022-02-04 09:57:42 +01:00
Daniel Otto de Mentock d1f9e98e3c moved typecheck of __ne__ functions to __eq__
added initial empty runtimeerror to Schmid function

minor corrections
2022-02-03 16:11:09 +01:00
Daniel Otto de Mentock fc8cd6322c adjusted rng_seed type in rotation
adjusted NotImplemented error return in orientation
2022-02-02 12:16:57 +01:00
Daniel Otto de Mentock 71bc92fed0 changed quote layout to single quote Added NotImplemented returnvalue to __eq__ functions 2022-02-02 11:11:59 +01:00
Daniel Otto de Mentock cb1143a472 changed return type of util.shapeblender and util.shapeshifter from Sequence[SupportsIndex] to Tuple[SupportsIndex, ...]
ignored lines in orientation module that attempt to pass objects of type 
Tuple[SupportsIndex, ...] to np.broadcast_to()
2022-02-01 18:38:49 +01:00
Daniel Otto de Mentock 81ef865525 [skip ci] moved asterisk to seperate line 2022-01-28 10:11:34 +01:00
Daniel Otto de Mentock 0fe51f58a8 [skip ci] changed almost all function definition lines to multiline 2022-01-26 15:09:09 +01:00
Daniel Otto de Mentock 25513d572b minor type adjustment to rotation module removed superfluous Sequence type from orientation module 2022-01-14 14:55:08 +01:00
Daniel Otto de Mentock aabeee9de1 Replaced relevant Sequences with FloatSequence and IntSequence types 2022-01-14 14:37:48 +01:00
Daniel Otto de Mentock 4ba9935ccc Merge branch 'development' of git.damask.mpie.de:damask/DAMASK into typehints_orientation_rotation 2022-01-13 17:23:24 +01:00
Martin Diehl 3acabcdc7f docstring adjustments 2022-01-12 23:57:21 +01:00
Martin Diehl 19f4f2eaec nice example
too simple for full-flegded ipython notebook
2022-01-11 00:36:49 +01:00
Daniel Otto de Mentock cef885cfde added first typehints for rotation and orientation modules 2021-12-14 17:05:00 +01:00
Daniel Otto de Mentock 3b9822ad67 Revert "added first typehints for rotation and orientation modules"
This reverts commit 4235c70aea
2021-12-14 16:04:18 +00:00
Daniel Otto de Mentock 4235c70aea added first typehints for rotation and orientation modules 2021-12-14 17:01:40 +01:00
Philip Eisenlohr fbbe5ec006 fixed typo 2021-12-08 21:04:22 +00:00
Martin Diehl 509835bf0b type hints for tensor
adjustments to Rotation/Orientation needed to enable type checking with
mypy
2021-10-31 22:37:54 +01:00
Philip Eisenlohr ddb25ad0e5 remove duplicate lattice_symmetries dictionary 2021-10-29 20:04:09 -04:00
Philip Eisenlohr 8759d82e87 to_pole now blends; corrected help texts 2021-08-16 13:23:31 -04:00
Philip Eisenlohr 5292f9b414 added crystal repr(); fixed typos; extended help 2021-08-08 17:56:54 -04:00
Martin Diehl b1dab5f398 tests working now 2021-08-08 10:44:38 +02:00
Martin Diehl b5be4c3fa5 compatible with material.yaml 2021-08-04 17:45:25 +02:00
Martin Diehl bb5db3e79c structured according to family 2021-08-04 16:17:29 +02:00
Martin Diehl e95157f039 unified behavior
extra dimensions (here: slip systems) are added to the left, inline with
.equivalent and .related
2021-07-25 20:32:24 +02:00
Martin Diehl d1c3d767cc documenting 2021-07-25 19:59:26 +02:00
Martin Diehl de428efca5 add_pole is working again 2021-07-18 18:58:05 +02:00
Martin Diehl 19ca99e033 matching name 2021-07-18 16:39:52 +02:00
Martin Diehl 2217c3d143 unified help 2021-07-18 15:42:36 +02:00
Martin Diehl 2826e61ea1 no need to split code over two files 2021-07-13 07:09:19 +02:00
Martin Diehl 92ca010b7c Philip's corrections 2021-07-04 23:25:00 +02:00
Martin Diehl 5202da13ea better not have a "Lattice" object with "lattice" parameter 2021-06-07 21:49:04 +02:00
Martin Diehl 41e5f0c06c re-introduced multiple inheritance 2021-06-06 22:25:42 +02:00
Martin Diehl 0722f4f754 disable if not possible 2021-06-03 11:22:28 +02:00
Martin Diehl 3c8d06b6f1 encapsulating all lattice(-family) related data 2021-06-03 11:18:00 +02:00
Martin Diehl 4701eea10f decoupling Orientation and Lattice/LatticeFamily 2021-06-03 10:02:49 +02:00
Martin Diehl 03d3f362e6 equality checks
note: doing this type of comparison means:
- LatticeFamily('cubic') == Lattice('cF')
- Lattice('cF') != LatticeFamily('cubic')

we have the same behavior for comparison between Orientation and
Rotation
2021-06-03 09:38:43 +02:00
Martin Diehl 3b150ddbea simplified/separated 2021-06-03 09:22:54 +02:00
Martin Diehl 87e94b6cf4 sorting
most functions require only lattice family, functions that require full
lattice details are at the end
2021-06-03 08:43:56 +02:00
Martin Diehl 302da1f76a separating functionality 2021-06-02 17:11:37 +02:00
Martin Diehl b55d51491d separating functionality 2021-06-02 08:48:45 +02:00