-
Notifications
You must be signed in to change notification settings - Fork 137
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
merge devel to master to release v0.2.22 #786
Changes from all commits
395328a
b797acb
a6ced9f
373e0d7
dccab68
74bfccc
d1f1b98
cdbbe1b
7853b7b
b908c2b
fba50f1
d0a7868
b9b0778
01a03b3
32f832b
7c9be86
6a05f3b
e5e9414
7aa3bae
5916b4f
5cb41f8
467ffbd
5423efe
a496b6f
7f5f030
25e7e4b
799044b
18ba98d
07c688e
2905792
46251a7
b826633
4e5ab18
961b591
5ebe959
50da1c9
8ef2646
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ name: dpdata | |
channels: | ||
- conda-forge | ||
dependencies: | ||
- mamba | ||
- python <3.13 | ||
- mamba <2 | ||
- pip: | ||
- ..[docs] |
Original file line number | Diff line number | Diff line change | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -47,7 +47,7 @@ def get_coords_from_log(loglines, natoms): | |||||||||||||||||
natoms_log += int(line.split()[-1]) | ||||||||||||||||||
|
||||||||||||||||||
assert natoms_log > 0 and natoms_log == natoms, ( | ||||||||||||||||||
"ERROR: detected atom number in log file is %d" % natoms | ||||||||||||||||||
"ERROR: detected atom number in log file is %d" % natoms # noqa: UP031 | ||||||||||||||||||
) | ||||||||||||||||||
|
||||||||||||||||||
energy = [] | ||||||||||||||||||
|
@@ -76,7 +76,7 @@ def get_coords_from_log(loglines, natoms): | |||||||||||||||||
list(map(lambda x: float(x) * a0, loglines[i + k].split()[1:4])) | ||||||||||||||||||
) | ||||||||||||||||||
else: | ||||||||||||||||||
assert False, "Unrecongnized coordinate type, %s, line:%d" % ( | ||||||||||||||||||
assert False, "Unrecongnized coordinate type, %s, line:%d" % ( # noqa: UP031 | ||||||||||||||||||
loglines[i].split()[0], | ||||||||||||||||||
i, | ||||||||||||||||||
) | ||||||||||||||||||
Comment on lines
+79
to
82
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Replace The use of - assert False, "Unrecongnized coordinate type, %s, line:%d" % ( # noqa: UP031
- loglines[i].split()[0],
- i,
- )
+ raise AssertionError(
+ "Unrecongnized coordinate type, %s, line:%d"
+ % (loglines[i].split()[0], i)
+ ) 📝 Committable suggestion
Suggested change
🧰 Tools🪛 Ruff (0.8.2)79-79: Do not Replace (B011) |
||||||||||||||||||
|
@@ -183,7 +183,7 @@ def get_frame(fname): | |||||||||||||||||
with open_file(geometry_path_in) as fp: | ||||||||||||||||||
geometry_inlines = fp.read().split("\n") | ||||||||||||||||||
celldm, cell = get_cell(geometry_inlines) | ||||||||||||||||||
atom_names, natoms, types, coord_tmp = get_coords( | ||||||||||||||||||
atom_names, natoms, types, coord_tmp, move, magmom = get_coords( | ||||||||||||||||||
celldm, cell, geometry_inlines, inlines | ||||||||||||||||||
) | ||||||||||||||||||
|
||||||||||||||||||
|
@@ -217,6 +217,8 @@ def get_frame(fname): | |||||||||||||||||
if len(magmom) > 0: | ||||||||||||||||||
data["spins"] = magmom | ||||||||||||||||||
if len(magforce) > 0: | ||||||||||||||||||
data["mag_forces"] = magforce | ||||||||||||||||||
data["force_mags"] = magforce | ||||||||||||||||||
if len(move) > 0: | ||||||||||||||||||
data["move"] = move | ||||||||||||||||||
|
||||||||||||||||||
return data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
Consider updating mamba version constraint
The current constraint
mamba <2
is too restrictive as Mamba 2.x is now stable and widely available. Consider usingmamba <3
ormamba >=1.5.0,<3
to ensure access to the latest stable features and fixes.🔗 Analysis chain
LGTM! Version constraints look appropriate.
The version constraints are well-chosen:
Run this script to verify the mamba version compatibility:
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 1102