Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve type annotations for
core.(trajectory/units)
(#3832)
* relocate dunder methods to top for core.trajectory fix `core.operations` add types for site, mypy errors to fix remove no_type_check decorator move dunder methods to the top fix mypy errors remove debug tag improve `spectrum` finish `core.tensors` finish `xcfunc` fix hash of `SymmOp` finish `core.trajectory` Add types for `core.molecular_orbitals/operations/sites/spectrum/tensor/xcfunc` (#3829) * fix `core.molecular_orbitals` * fix `core.operations` * add types for site, mypy errors to fix * remove no_type_check decorator * move dunder methods to the top * fix mypy errors * remove debug tag * improve `spectrum` * finish `core.tensors` * finish `xcfunc` * fix hash of `SymmOp` * add a missing type * Revert "fix hash of `SymmOp`" This reverts commit bf2a953. * fix some types in operations * "TEST": remove one unused var, relocate another * final tweak types * avoid hard-code class name * format tweaks * type tweak * fix unit test * replace all `[0:x]` with `[:x]` Guard `TYPE_CHECKING` only imports (#3827) * flake8 --select=TYP001 * fix type import * format docstring to google style * fix more unguarded typecheck imports * format more docs to Google format * trigger CI (better var names) --------- Co-authored-by: Janosh Riebesell <janosh.riebesell@gmail.com> move structures out of util dir (#3831) Add matgenb in the aux link section. Because apparently it is not "discoverable". Fixes #3811. More updates. Move AIMS notebooks to matgenb. Add README in examples folder that point to proper resources. Improve type annotations and comments for `io.cif` (#3820) * remove duplicate warning * type and docstring tweaks * add some types for io.cif * add comments and types * temp save of some formatting * revert functional change * revert unrelated changes * fix unit test * remove update that does nothing * relocate `sub_space_group` and `space_groups` to their usage * add more types * pre-commit auto-fixes * breaking: make parse_magmom/oxi_stats private * remove merge header * fix unit test * add more types * fix mypy errors * add a few spaces * remove if name ==main * simplify "check to see if" in comments * final tweaks * revise docstring * replace deprecated abc.abstractproperty * add missing doc strings and standardize existing * breaking: fix typo in method name orthongonalize_structure * revert accidental change in test_composition.py --------- Co-authored-by: Janosh Riebesell <janosh.riebesell@gmail.com> * remove accidental change * fix mypy errors * fix mypy error * add some for core.units * rename `ArrayWithFloatWithUnit` to `ArrayWithUnit` in comment * fix mypy errors * tweak docstring for units * nest internal funcs for units * simplify module docstring * revert to accessing private attrib * fix unit test and revert support for `Unit` * use `str` over `Unit` * support unit as both str and Unit * tweak docstring example * improve IndexError messages * test_index_error --------- Co-authored-by: Janosh Riebesell <janosh.riebesell@gmail.com>
- Loading branch information