Skip to content

Commit

Permalink
follow-up to #2651
Browse files Browse the repository at this point in the history
target additional files in .gitattributes
test_files/cohp/bandOverlaps.lobster.1
test_files/cohp/bandOverlaps.lobster.2
test_files/cohp/bandOverlaps.lobster.new.1
test_files/cohp/bandOverlaps.lobster.new.2
test_files/cohp/lobsterin.1
test_files/cohp/lobsterin.2
test_files/cohp/lobsterin.3
dev_scripts/NIST?Atomic?Ionization?Energies?Output.html linguist-vendored
  • Loading branch information
janosh committed Sep 15, 2022
1 parent 8670716 commit ea3dbca
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
5 changes: 3 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# declare HTML, rST and test files as vendored/docs to exclude them when calculating repo languages on GitHub
**/test_files/* linguist-vendored
**/test_files/**/* linguist-vendored
cmd_line/* linguist-vendored
docs/**/* linguist-documentation
docs/**/* linguist-generated
docs_rst/**/* linguist-documentation
dev_scripts/**/* linguist-vendored
3 changes: 1 addition & 2 deletions pymatgen/analysis/path_finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import logging
import math
import warnings
from abc import ABCMeta

import numpy as np
import numpy.linalg as la
Expand Down Expand Up @@ -311,7 +310,7 @@ def __d2f(disc_coords, v):
)


class StaticPotential(metaclass=ABCMeta):
class StaticPotential:
"""
Defines a general static potential for diffusion calculations. Implements
grid-rescaling and smearing for the potential grid. Also provides a
Expand Down
8 changes: 4 additions & 4 deletions pymatgen/cli/pmg_analyze.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,20 +99,20 @@ def get_energies(rootdir, reanalyze, verbose, quick, sort, fmt):
return 0


def get_magnetizations(mydir, ion_list):
def get_magnetizations(dir: str, ion_list: list[int]):
"""
Get magnetization info from OUTCARs.
Args:
mydir (str): Directory name
ion_list (List): List of ions to obtain magnetization information for.
ion_list (list[int]): List of ions to obtain magnetization information for.
Returns:
int: 0 if successful.
"""
data = []
max_row = 0
for (parent, subdirs, files) in os.walk(mydir):
for (parent, _subdirs, files) in os.walk(dir):
for f in files:
if re.match(r"OUTCAR*", f):
try:
Expand Down
6 changes: 3 additions & 3 deletions pymatgen/electronic_structure/boltztrap2.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,9 +534,9 @@ def get_band_structure(self, kpaths=None, kpoints_lbls_dict=None, density=20):
if isinstance(kpaths, list) and isinstance(kpoints_lbls_dict, dict):
kpoints = []
for kpath in kpaths:
for i, k in enumerate(kpath[:-1]):
sta = kpoints_lbls_dict[kpath[i]]
end = kpoints_lbls_dict[kpath[i + 1]]
for idx, k_pt in enumerate(kpath[:-1]):
sta = kpoints_lbls_dict[k_pt]
end = kpoints_lbls_dict[kpath[idx + 1]]
kpoints.append(np.linspace(sta, end, density))
kpoints = np.concatenate(kpoints)
else:
Expand Down
2 changes: 1 addition & 1 deletion pymatgen/entries/mixing_scheme.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def __init__(
):
"""
Instantiate the mixing scheme. The init method creates a generator class that
contains relevant settings (e.g., StrutureMatcher instance, Compatibility settings
contains relevant settings (e.g., StructureMatcher instance, Compatibility settings
for each functional) for processing groups of entries.
Args:
Expand Down
4 changes: 2 additions & 2 deletions pymatgen/symmetry/bandstructure.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def __init__(
self._path_lengths = []

for bs in [lm_bs, sc_bs, hin_bs]:
for key, value in enumerate(bs.kpath["kpoints"]):
for value in bs.kpath["kpoints"]:
cat_points[index] = bs.kpath["kpoints"][value]
label_index[index] = value
index += 1
Expand Down Expand Up @@ -259,7 +259,7 @@ def _get_klabels(self, lm_bs, sc_bs, hin_bs, rpg):
for o_num in range(0, n_op):
a_tr_coord = []

for (label_a, coord_a) in a_path["kpoints"].items():
for coord_a in a_path["kpoints"].values():
a_tr_coord.append(np.dot(rpg[o_num], coord_a))

for coord_a in a_tr_coord:
Expand Down
2 changes: 1 addition & 1 deletion pymatgen/symmetry/tests/test_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def test_order(self):
order = {"mmm": 8, "432": 24, "-6m2": 12}
for k, v in order.items():
pg = PointGroup(k)
self.assertEqual(order[k], len(pg.symmetry_ops))
self.assertEqual(v, len(pg.symmetry_ops))

def test_get_orbit(self):
pg = PointGroup("mmm")
Expand Down

0 comments on commit ea3dbca

Please sign in to comment.