Skip to content

Conversation

@mmbliss
Copy link

@mmbliss mmbliss commented Aug 27, 2024

Summary

Pull updates from materialsproject master to make this branch compatible with python 3.9. Only take commits up until version 2022.1.20 (January 20, 2022).

TODO (if any)

Need to test this branch to ensure it functions and can be installed on python 3.9 (and possible 3.8 and 3.10)

Checklist

Before a pull request can be merged, the following items must be checked:

  • Code is in the standard Python style. The easiest way to handle this
    is to run the following in the correct sequence on your local machine. Start with running
    black on your new code. This will automatically reformat
    your code to PEP8 conventions and removes most issues. Then run
    pycodestyle, followed by
    flake8.
  • Docstrings have been added in the Google docstring format.
    Run pydocstyle on your code.
  • Type annotations are highly encouraged. Run mypy to type check your code.
  • Tests have been added for any new functionality or bug fixes.
  • All linting and tests pass.

Note that the CI system will run all the above checks. But it will be much more efficient if you already fix most
errors prior to submitting the PR. It is highly recommended that you use the pre-commit hook provided in the pymatgen
repository. Simply cp pre-commit .git/hooks and a check will be run prior to allowing commits.

@mmbliss mmbliss self-assigned this Aug 27, 2024
shyuep and others added 29 commits April 21, 2025 21:36
* Testing merge_sites with a structure with one site

* Skip merging when the structure contains only a single site

* Clean up

* pre-commit auto-fixes

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
to obtain various properties from UMLIP conveniently.
kavanase and others added 30 commits October 17, 2025 09:51
* linear_slice loosen type requirement

* use dynamic type for copy of volumerticData
* use `from typing import XXX` over `import typing`

* add types for io.common

* use asarray when it could already be array
* move cif parsing from __init__ of CifParser to from_str

* deprecate support of StringIO in __init__ of CifParser

* revert support of TextIOWrapper

* Revert "revert support of TextIOWrapper"

This reverts commit 1911a75.
Co-authored-by: Shyue Ping Ong <[email protected]>
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.13.3 → v0.14.3](astral-sh/ruff-pre-commit@v0.13.3...v0.14.3)
- [github.com/MarcoGorelli/cython-lint: v0.17.0 → v0.18.1](MarcoGorelli/cython-lint@v0.17.0...v0.18.1)
- [github.com/RobertCraigie/pyright-python: v1.1.406 → v1.1.407](RobertCraigie/pyright-python@v1.1.406...v1.1.407)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
…en.io.wannier90.Unk (#4535)

* fix mypy for wavecar class

* accept PathLike objects in Unk reader
)

* NUPDOWN should be float?

https://www.vasp.at/wiki/NUPDOWN

NUPDOWN = [positive real]
Default: NUPDOWN = not set

Description: Sets the difference between the number of electrons in the
up and down spin components.

Allows calculations for a specific spin multiplet, i.e. the difference
of the number of electrons in the up and down spin component will be
kept fixed to the specified value. There is a word of caution required:
If NUPDOWN is set in the INCAR file the initial moment for the charge
density should be the same. Otherwise convergence can slow down. When
starting from atomic charge densities (ICHARG=2), VASP will try to do
this automatically by setting MAGMOM to NUPDOWN/NIONS. The user can of
course overwrite this default by specifying a different MAGMOM (which
should still result in the correct total moment). If one initializes the
charge density from the one-electron wavefunctions, the initial moment
is always correct, because VASP "pushes" the required number of
electrons from the down to the up component. Initializing the charge
density from the CHGCAR file (ICHARG=1), however, the initial moment is
usually incorrect!

If no value is set (or NUPDOWN=-1) a full relaxation will be performed.
This is also the default.

* reuse incar_parameters.json in `proc_val` to determine INCAR tag type

* make proc_val more permissive: not run when type differs from recording
… with backslash, fix handling of `!` as comment marker (#4518)

* fix dict-index-missing-items

* remove unnecessary ignore tag

* rename similar_params to same

* enhance incar parsing of backslash/multi-line str, fix ! comment handling

test

enhance incar parsing of backslash and multi-line str, fix ! comment
handle

fix most issues: multi-line str still doesn't work

almost there, one statement in comment should not be parsed

guess it's fine to strip multi-line string

I guess ;! is not a valid use case, ; is meant to connect to statements

oops, looks like comment would be parsed

fix test

first working version
* remove pdm dev-dependency section in pyproject (likely not needed?)

fb6ba71

* clean up tool.coverage exclude section

remove self explanatory comment

* skip netcdf4 test in Linux CI >=1.6.5, clean up tests

xfail for netcdf4 in ubuntu CI

* test and build Python 3.14 wheels

fail back to 3.13 for lint as pyright is not installable

revert win to 3.11 for now (cannot recreate locally)

resolve to highest in Ubuntu

fix different err msg in 3.14

➜  temp uv run -p 3.13 test_index.py
Traceback (most recent call last):
  File "/Users/yang/developer/temp/test_index.py", line 1, in <module>
    print(["a"].index(1))
          ~~~~~~~~~~~^^^
ValueError: 1 is not in list

➜  temp uv run -p 3.14 test_index.py
Traceback (most recent call last):
  File "/Users/yang/developer/temp/test_index.py", line 1, in <module>
    print(["a"].index(1))
          ~~~~~~~~~~~^^^
ValueError: list.index(x): x not in list

skip netcdf4 in 3.13

skip more py 3.14 incompatible deps

matcalc seems installable on python 3.13 and 3.14

skip more packages that doesn't support 3.14 now

remove pin for pure python analysis-alloy

remove comment

drop openai pin

unblock h5py

unpin netcdf4

---------

Co-authored-by: Matt Horton <[email protected]>
* Removed extra copy of entry data from phase diagram serialization.

* Serialized qhull_entries as list of indices instead of list of entries.

* pre-commit auto-fixes

* Added phase diagram serialization backwards compatibilty.

* Removed accidental side effects of PhaseDiagram.from_dict().

---------

Co-authored-by: Felix Adams <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Shyue Ping Ong <[email protected]>
Co-authored-by: Matt Horton <[email protected]>
)

* fix types for entry processing in phase diagram and compatibility

- Updated type hints in `PatchedPhaseDiagram` to use `Entry` instead of `PDEntry`.
- Introduced `TypeVarAnyEntry` for correct Entry subclass inference on Compatibility.process_entries return types

* add missing import

* update internal method signatures to match public API
)

* opt

* pre-commit auto-fixes

---------

Signed-off-by: Ahmad Lutfi <[email protected]>
Co-authored-by: lutfia95 <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* type hinting in io/ase

* type hinting in io/ase
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.14.3 → v0.14.7](astral-sh/ruff-pre-commit@v0.14.3...v0.14.7)
- [github.com/pre-commit/mirrors-mypy: v1.18.2 → v1.19.0](pre-commit/mirrors-mypy@v1.18.2...v1.19.0)
- [github.com/igorshubovych/markdownlint-cli: v0.45.0 → v0.46.0](igorshubovych/markdownlint-cli@v0.45.0...v0.46.0)
- [github.com/kynan/nbstripout: 0.8.1 → 0.8.2](kynan/nbstripout@0.8.1...0.8.2)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.