Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve type annotations for io.lobster.{lobsterenv/outputs} #3887

Merged
merged 66 commits into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from 57 commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
a680e82
temp save of cleaning lobsterenv
DanielYang59 Jun 19, 2024
1eaf906
fix type errors in lobsterenv
DanielYang59 Jun 19, 2024
6668e51
Merge branch 'master' into type-lobsterenv-outputs
DanielYang59 Jun 19, 2024
3f09a68
Merge branch 'type-lobsterenv-outputs' of https://github.com/DanielYa…
DanielYang59 Jun 19, 2024
e684a29
temp save of lobster.outputs
DanielYang59 Jun 19, 2024
6fd22ff
Merge branch 'master' into type-lobsterenv-outputs
DanielYang59 Jun 19, 2024
489a6e5
revert chemenv additional_condition rename
DanielYang59 Jun 19, 2024
f6f032d
first go of lobster.outputs
DanielYang59 Jun 19, 2024
e5280b0
fix typo in get_doc
DanielYang59 Jun 19, 2024
acc9a1f
separate lobster inputs and outputs tests
DanielYang59 Jun 19, 2024
d08f0c2
fix unit test
DanielYang59 Jun 19, 2024
18499c4
more var name and comment cleanups
DanielYang59 Jun 19, 2024
5e24acb
fix my errors (some unit tests fail)
DanielYang59 Jun 20, 2024
00b0a7d
fix some unit test
DanielYang59 Jun 20, 2024
240ddb0
fix unit test
DanielYang59 Jun 20, 2024
565c3fa
Need Confirm: change `np.float64` to float for spilling
DanielYang59 Jun 20, 2024
4143ef6
clarify data form in docstring
DanielYang59 Jun 20, 2024
1831078
use deprecated decorator
DanielYang59 Jun 21, 2024
ff0b08a
Merge branch 'master' into type-lobsterenv-outputs
DanielYang59 Jun 21, 2024
07b5bce
Merge branch 'master' into type-lobsterenv-outputs
DanielYang59 Jun 22, 2024
0012518
Merge branch 'master' into type-lobsterenv-outputs
DanielYang59 Jun 26, 2024
290a8ab
Merge branch 'master' into type-lobsterenv-outputs
DanielYang59 Jun 26, 2024
552620e
Merge branch 'master' into type-lobsterenv-outputs
DanielYang59 Jul 2, 2024
0499def
pre-commit auto-fixes
pre-commit-ci[bot] Jul 2, 2024
75d23f1
Merge branch 'master' into type-lobsterenv-outputs
DanielYang59 Jul 3, 2024
99b3bc9
Merge branch 'master' into type-lobsterenv-outputs
DanielYang59 Jul 12, 2024
b4e4005
Merge branch 'master' into type-lobsterenv-outputs
DanielYang59 Jul 15, 2024
4456e45
Merge branch 'master' into type-lobsterenv-outputs
DanielYang59 Jul 17, 2024
447b0ae
Merge branch 'master' into type-lobsterenv-outputs
DanielYang59 Jul 18, 2024
5e4c8c9
Merge branch 'master' into type-lobsterenv-outputs
DanielYang59 Jul 24, 2024
52b2fc0
Merge branch 'master' into type-lobsterenv-outputs
DanielYang59 Jul 28, 2024
4b11fd1
Merge branch 'master' into type-lobsterenv-outputs
DanielYang59 Jul 31, 2024
a24765b
Merge branch 'master' into type-lobsterenv-outputs
DanielYang59 Aug 3, 2024
0cb6329
pre-commit auto-fixes
pre-commit-ci[bot] Aug 3, 2024
eb45f95
Merge branch 'master' into type-lobsterenv-outputs
DanielYang59 Aug 3, 2024
0455262
Merge branch 'master' into type-lobsterenv-outputs
DanielYang59 Aug 4, 2024
8071c7b
remove DEBUG tag and var name tweaks
DanielYang59 Aug 4, 2024
2d3b755
add more specific types
DanielYang59 Aug 4, 2024
c199864
use PeriodicSite over Site
DanielYang59 Aug 4, 2024
134101d
standardize idx var name
DanielYang59 Aug 4, 2024
628f737
limit matplotlib version
DanielYang59 Aug 4, 2024
e8f2bd9
Merge branch 'master' into type-lobsterenv-outputs
DanielYang59 Aug 5, 2024
ec65352
Merge branch 'master' into type-lobsterenv-outputs
DanielYang59 Aug 6, 2024
45cc6af
Merge branch 'master' into type-lobsterenv-outputs
DanielYang59 Aug 6, 2024
63a2d76
Merge branch 'master' into type-lobsterenv-outputs
DanielYang59 Aug 8, 2024
74d8e43
Merge branch 'master' into type-lobsterenv-outputs
DanielYang59 Aug 9, 2024
42bca90
Merge branch 'master' into type-lobsterenv-outputs
DanielYang59 Aug 16, 2024
fbe0d6f
Merge branch 'master' into type-lobsterenv-outputs
DanielYang59 Aug 16, 2024
4f58588
remove matplotlib pin
DanielYang59 Aug 20, 2024
3a26b91
remove left out matplotlib pin
DanielYang59 Aug 20, 2024
629c447
remove ignore override tag
DanielYang59 Aug 20, 2024
b64213b
Merge branch 'master' into type-lobsterenv-outputs
DanielYang59 Aug 20, 2024
9bd107c
Merge branch 'master' into type-lobsterenv-outputs
DanielYang59 Aug 20, 2024
7cb7030
Merge branch 'master' into type-lobsterenv-outputs
DanielYang59 Aug 22, 2024
063b54e
pre-commit auto-fixes
pre-commit-ci[bot] Aug 22, 2024
f5d3f6e
Merge branch 'master' into type-lobsterenv-outputs
DanielYang59 Aug 22, 2024
ef4693a
Merge branch 'master' into type-lobsterenv-outputs
DanielYang59 Aug 24, 2024
5cf9795
Apply suggestions from code review
JaGeo Aug 29, 2024
0a253b1
Merge branch 'master' into type-lobsterenv-outputs
JaGeo Aug 29, 2024
4ddada7
use specific type for get_nn_info return
DanielYang59 Aug 29, 2024
56f8aa9
add TODO for a very likely TODO comment
DanielYang59 Aug 29, 2024
4b2d199
remove implemented TODO tag
DanielYang59 Aug 29, 2024
a7d10d0
replace Literal with | in docstring
DanielYang59 Aug 29, 2024
879a29e
Merge branch 'master' into type-lobsterenv-outputs
DanielYang59 Aug 30, 2024
04c9817
use atom{idx}_list over atom{idx}s
DanielYang59 Aug 30, 2024
be77188
revert bool description
DanielYang59 Aug 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/pymatgen/io/lobster/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
This package implements modules for input and output to and from LOBSTER. It
imports the key classes form both lobster.inputs and lobster_outputs to allow most
imports the key classes form both lobster.inputs and lobster.outputs to allow most
classes to be simply called as pymatgen.io.lobster.Lobsterin for example, to retain
backwards compatibility.
"""
Expand Down
908 changes: 485 additions & 423 deletions src/pymatgen/io/lobster/lobsterenv.py

Large diffs are not rendered by default.

1,250 changes: 655 additions & 595 deletions src/pymatgen/io/lobster/outputs.py

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions src/pymatgen/io/vasp/inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1481,11 +1481,10 @@ def copy(self) -> Self:

@classmethod
def from_file(cls, filename: PathLike) -> Self:
"""
Reads a Kpoints object from a KPOINTS file.
"""Read a Kpoints object from a KPOINTS file.

Args:
filename (PathLike): filename to read from.
filename (PathLike): File to read.

Returns:
Kpoints object
Expand Down
6 changes: 3 additions & 3 deletions src/pymatgen/io/vasp/outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -3568,14 +3568,14 @@ def parse_file(filename: PathLike) -> tuple[Poscar, dict, dict]:

def write_file(
self,
file_name: str | Path,
file_name: PathLike,
vasp4_compatible: bool = False,
) -> None:
"""Write the VolumetricData object to a VASP compatible file.

Args:
file_name (str): Path to a file
vasp4_compatible (bool): True if the format is VASP4 compatible
file_name (PathLike): The output file.
vasp4_compatible (bool): Whether the format is VASP4 compatible.
DanielYang59 marked this conversation as resolved.
Show resolved Hide resolved
"""

def format_fortran_float(flt: float) -> str:
Expand Down
Loading