Skip to content

Commit

Permalink
Simplify case handling in lobster.inputs (#3848)
Browse files Browse the repository at this point in the history
* replace hard-coded cls name

* docstring and type minor cleanup

* BREAKING: rename LISTKEYWORDS to LIST_KEYWORDS

* add some TODO tags

* replace hard-coded cls name

* docstring and type minor cleanup

* BREAKING: rename LISTKEYWORDS to LIST_KEYWORDS

* add TODO tags

* fix case in name

* pre-commit auto-fixes

* properly access classvar

* pre-commit auto-fixes

* restore from_file position

* use PathLike over str

* avoid overwrite sha256 import

* use elif to avoid repeated check

* use set for membership check

* simplify dict related magic methods

* simplify write_lobsterin and add test for update operation

* simplify from_file method

* simplify comment remove and duplicate check

* remove indentation level

* handle multi space in split

* fix typo in err msg

* tweak ordering

* tweak naming and comments

* access classvar thru class instead of instance

* tweak docstrings

* simplify `diff`

* add diff params to check

* replace element with value

* add unit test for __contains__

* revert error msg

* add tests for exceptions

* simplify magic method with super call

* avoid bypassing method resolution order

* relocate |= test case

* tweak doc

* fix issues proposed by Christina

* add LOBSTER 5 keywords

* use more specific classvar type

* use `lobsterin keywords`

* update comments as suggested

* update supported ISYM value

* add unit test for case of diff method

* change default ISYM from -1 to 0

* add some missing keywords

* set default isym in write_incar/kpoints directly to  0

* replace std lib tempfile with self.tmp_path pytest fixture

* improve potential_type doc str

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Shyue Ping Ong <shyuep@users.noreply.github.com>
Co-authored-by: Janosh Riebesell <janosh.riebesell@gmail.com>
  • Loading branch information
4 people authored Jun 8, 2024
1 parent 36cde41 commit f545d58
Show file tree
Hide file tree
Showing 3 changed files with 393 additions and 306 deletions.
Loading

0 comments on commit f545d58

Please sign in to comment.