Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
janosh authored Aug 5, 2024
2 parents 3fdc20f + 4ffec03 commit 53c6df9
Show file tree
Hide file tree
Showing 407 changed files with 3,548 additions and 2,823 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/issue-metrics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ permissions:

jobs:
build:
# prevent this action from running on forks
if: github.repository == 'materialsproject/pymatgen'
name: issue metrics
runs-on: ubuntu-latest
permissions:
Expand Down
22 changes: 11 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ exclude: ^(docs|tests/files|tasks.py)

ci:
autoupdate_schedule: monthly
skip: [ mypy, pyright ]
skip: [mypy, pyright]
autofix_commit_msg: pre-commit auto-fixes
autoupdate_commit_msg: pre-commit autoupdate

repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.4
rev: v0.5.6
hooks:
- id: ruff
args: [ --fix, --unsafe-fixes ]
args: [--fix, --unsafe-fixes]
- id: ruff-format

- repo: https://github.com/pre-commit/pre-commit-hooks
Expand All @@ -22,24 +22,24 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.0
rev: v1.11.1
hooks:
- id: mypy

- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
stages: [ commit, commit-msg ]
exclude_types: [ html ]
additional_dependencies: [ tomli ] # needed to read pyproject.toml below py3.11
stages: [commit, commit-msg]
exclude_types: [html]
additional_dependencies: [tomli] # needed to read pyproject.toml below py3.11
exclude: src/pymatgen/analysis/aflow_prototypes.json

- repo: https://github.com/MarcoGorelli/cython-lint
rev: v0.16.2
hooks:
- id: cython-lint
args: [ --no-pycodestyle ]
args: [--no-pycodestyle]
- id: double-quote-cython-strings

- repo: https://github.com/adamchainz/blacken-docs
Expand All @@ -56,15 +56,15 @@ repos:
# MD033: no inline HTML
# MD041: first line in a file should be a top-level heading
# MD025: single title
args: [ --disable, MD013, MD024, MD025, MD033, MD041, "--" ]
args: [--disable, MD013, MD024, MD025, MD033, MD041, "--"]

- repo: https://github.com/kynan/nbstripout
rev: 0.7.1
hooks:
- id: nbstripout
args: [ --drop-empty-cells, --keep-output ]
args: [--drop-empty-cells, --keep-output]

- repo: https://github.com/RobertCraigie/pyright-python
rev: v1.1.373
rev: v1.1.374
hooks:
- id: pyright
1 change: 1 addition & 0 deletions dev_scripts/chemenv/explicit_permutations.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import os

import numpy as np

from pymatgen.analysis.chemenv.coordination_environments.coordination_geometries import (
AllCoordinationGeometries,
ExplicitPermutationsAlgorithm,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import json

import numpy as np

from pymatgen.analysis.chemenv.coordination_environments.coordination_geometries import AllCoordinationGeometries
from pymatgen.analysis.chemenv.coordination_environments.coordination_geometry_finder import (
AbstractGeometry,
Expand Down
1 change: 1 addition & 0 deletions dev_scripts/chemenv/get_plane_permutations_optimized.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

import numpy as np
import tabulate

from pymatgen.analysis.chemenv.coordination_environments.coordination_geometries import AllCoordinationGeometries
from pymatgen.analysis.chemenv.coordination_environments.coordination_geometry_finder import (
AbstractGeometry,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import matplotlib.pyplot as plt
import numpy as np

from pymatgen.analysis.chemenv.coordination_environments.chemenv_strategies import (
AngleNbSetWeight,
CNBiasNbSetWeight,
Expand Down Expand Up @@ -50,7 +51,9 @@ def __init__(self, initial_environment_symbol, expected_final_environment_symbol
self.abstract_geometry = AbstractGeometry.from_cg(self.coordination_geometry)

@classmethod
def simple_expansion(cls, initial_environment_symbol, expected_final_environment_symbol, neighbors_indices):
def simple_expansion(
cls, initial_environment_symbol, expected_final_environment_symbol, neighbors_indices
) -> CoordinationEnvironmentMorphing:
"""Simple expansion of a coordination environment.
Args:
Expand Down
1 change: 1 addition & 0 deletions dev_scripts/chemenv/test_algos.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from random import shuffle

import numpy as np

from pymatgen.analysis.chemenv.coordination_environments.coordination_geometries import AllCoordinationGeometries
from pymatgen.analysis.chemenv.coordination_environments.coordination_geometry_finder import (
AbstractGeometry,
Expand Down
1 change: 1 addition & 0 deletions dev_scripts/chemenv/view_environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from __future__ import annotations

import numpy as np

from pymatgen.analysis.chemenv.coordination_environments.coordination_geometries import (
SEPARATION_PLANE,
AllCoordinationGeometries,
Expand Down
1 change: 1 addition & 0 deletions dev_scripts/potcar_scrambler.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import numpy as np
from monty.os.path import zpath
from monty.serialization import zopen

from pymatgen.core import SETTINGS
from pymatgen.io.vasp import Potcar, PotcarSingle
from pymatgen.io.vasp.sets import _load_yaml_config
Expand Down
3 changes: 2 additions & 1 deletion dev_scripts/update_pt_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@
import requests
from monty.dev import requires
from monty.serialization import dumpfn, loadfn
from pymatgen.core import Element, get_el_sp
from ruamel import yaml

from pymatgen.core import Element, get_el_sp

try:
from bs4 import BeautifulSoup
except ImportError:
Expand Down
5 changes: 3 additions & 2 deletions dev_scripts/update_spacegroup_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import sys

from monty.serialization import dumpfn, loadfn

from pymatgen.symmetry.groups import PointGroup

__author__ = "Katharina Ueltzen @kaueltzen"
Expand All @@ -29,7 +30,7 @@ def convert_symmops_to_sg_encoding(symbol: str) -> str:
Args:
symbol (str): "hermann_mauguin" or "universal_h_m" key of symmops.json
Returns:
symbol in the format of SYMM_DATA["space_group_encoding"] keys
str: symbol in the format of SYMM_DATA["space_group_encoding"] keys
"""
symbol_representation = symbol.split(":")
representation = ":" + "".join(symbol_representation[1].split(" ")) if len(symbol_representation) > 1 else ""
Expand All @@ -50,7 +51,7 @@ def remove_identity_from_full_hermann_mauguin(symbol: str) -> str:
Args:
symbol (str): "hermann_mauguin" key of symmops.json
Returns:
short "hermann_mauguin" key
str: short "hermann_mauguin" key
"""
if symbol in ("P 1", "C 1", "P 1 "):
return symbol
Expand Down
Loading

0 comments on commit 53c6df9

Please sign in to comment.