Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
shyuep authored Oct 21, 2024
2 parents f822c11 + 60441ea commit be6d33d
Show file tree
Hide file tree
Showing 75 changed files with 1,903 additions and 713 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,14 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.x'

- name: Install dependencies
run: |
pip install --upgrade ruff 'mypy<1.12' pyright
pip install --upgrade ruff mypy pyright
- name: ruff
run: |
ruff --version
ruff check .
ruff format --check .
Expand Down
14 changes: 7 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,29 @@ ci:

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

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace

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

- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
stages: [commit, commit-msg]
stages: [pre-commit, commit-msg]
exclude_types: [html]
additional_dependencies: [tomli] # needed to read pyproject.toml below py3.11
exclude: src/pymatgen/analysis/aflow_prototypes.json
Expand All @@ -43,12 +43,12 @@ repos:
- id: double-quote-cython-strings

- repo: https://github.com/adamchainz/blacken-docs
rev: 1.18.0
rev: 1.19.0
hooks:
- id: blacken-docs

- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.41.0
rev: v0.42.0
hooks:
- id: markdownlint
# MD013: line too long
Expand All @@ -65,6 +65,6 @@ repos:
args: [--drop-empty-cells, --keep-output]

- repo: https://github.com/RobertCraigie/pyright-python
rev: v1.1.379
rev: v1.1.384
hooks:
- id: pyright
8 changes: 8 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@ For developers interested in expanding `pymatgen` for their own purposes, we rec
Given that `pymatgen` is intended to be a long-term code base, we adopt very strict quality control and coding guidelines for all contributions to `pymatgen`. The following must be satisfied for your contributions to be accepted into `pymatgen`.

1. **Unit tests** are required for all new modules and methods. The only way to minimize code regression is to ensure that all code is well-tested. Untested contributions will not be accepted.
To run the testsuite in you repository follow these steps

```sh
cd path/to/repo
pip install -e . # install the package in your environment as "editable" == dev package
PMG_TEST_FILES_DIR=$(pwd)/tests/files pytest tests # run the test suite providing the path for the datafiles
```

1. **Python PEP 8** [code style](https://python.org/dev/peps/pep-0008). We allow a few exceptions when they are well-justified (e.g., Element's atomic number is given a variable name of capital Z, in line with accepted scientific convention), but generally, PEP 8 must be observed. Code style will be automatically checked for all PRs and must pass before any PR is merged. To aid you, you can install and run the same set of formatters and linters that will run in CI using
```sh
Expand Down
2 changes: 1 addition & 1 deletion docs/Gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Python Materials Genomics is a robust materials analysis code that defines core
and molecules with support for many electronic structure codes. It is currently the core analysis code powering the
Materials Project (https://materialsproject.org)."""
readme = "README.md"
requires-python = ">=3.10"
requires-python = ">=3.10,<3.13"
keywords = [
"ABINIT",
"VASP",
Expand Down Expand Up @@ -57,7 +57,7 @@ dependencies = [
"joblib>=1",
"matplotlib>=3.8",
"monty>=2024.7.29",
"networkx>=2.2",
"networkx>=2.7", # PR #4116
"palettable>=3.3.3",
"pandas>=2",
"plotly>=4.5.0",
Expand Down
112 changes: 56 additions & 56 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,88 +1,88 @@
# This file was autogenerated by uv via the following command:
# uv pip compile pyproject.toml -o requirements.txt
certifi==2024.7.4
# via requests
certifi==2024.8.30
# via requests
charset-normalizer==3.3.2
# via requests
# via requests
contourpy==1.2.1
# via matplotlib
# via matplotlib
cycler==0.12.1
# via matplotlib
# via matplotlib
fonttools==4.53.0
# via matplotlib
# via matplotlib
idna==3.7
# via requests
# via requests
joblib==1.4.2
# via pymatgen (pyproject.toml)
# via pymatgen (pyproject.toml)
kiwisolver==1.4.5
# via matplotlib
# via matplotlib
latexcodec==3.0.0
# via pybtex
matplotlib==3.9.0
# via pymatgen (pyproject.toml)
monty==2024.7.30
# via pymatgen (pyproject.toml)
# via pybtex
matplotlib==3.9.2
# via pymatgen (pyproject.toml)
monty==2024.10.21
# via pymatgen (pyproject.toml)
mpmath==1.3.0
# via sympy
# via sympy
networkx==3.3
# via pymatgen (pyproject.toml)
# via pymatgen (pyproject.toml)
numpy==2.0.0
# via
# pymatgen (pyproject.toml)
# contourpy
# matplotlib
# pandas
# scipy
# spglib
# via
# pymatgen (pyproject.toml)
# contourpy
# matplotlib
# pandas
# scipy
# spglib
packaging==24.1
# via
# matplotlib
# plotly
# via
# matplotlib
# plotly
palettable==3.3.3
# via pymatgen (pyproject.toml)
# via pymatgen (pyproject.toml)
pandas==2.2.2
# via pymatgen (pyproject.toml)
pillow==10.3.0
# via matplotlib
# via pymatgen (pyproject.toml)
pillow==11.0.0
# via matplotlib
plotly==5.22.0
# via pymatgen (pyproject.toml)
# via pymatgen (pyproject.toml)
pybtex==0.24.0
# via pymatgen (pyproject.toml)
# via pymatgen (pyproject.toml)
pyparsing==3.1.2
# via matplotlib
# via matplotlib
python-dateutil==2.9.0.post0
# via
# matplotlib
# pandas
# via
# matplotlib
# pandas
pytz==2024.1
# via pandas
pyyaml==6.0.1
# via pybtex
# via pandas
pyyaml==6.0.2
# via pybtex
requests==2.32.3
# via pymatgen (pyproject.toml)
# via pymatgen (pyproject.toml)
ruamel-yaml==0.18.6
# via pymatgen (pyproject.toml)
# via pymatgen (pyproject.toml)
ruamel-yaml-clib==0.2.8
# via ruamel-yaml
# via ruamel-yaml
scipy==1.13.1
# via pymatgen (pyproject.toml)
# via pymatgen (pyproject.toml)
six==1.16.0
# via
# pybtex
# python-dateutil
# via
# pybtex
# python-dateutil
spglib==2.5.0
# via pymatgen (pyproject.toml)
# via pymatgen (pyproject.toml)
sympy==1.12.1
# via pymatgen (pyproject.toml)
# via pymatgen (pyproject.toml)
tabulate==0.9.0
# via pymatgen (pyproject.toml)
# via pymatgen (pyproject.toml)
tenacity==8.4.1
# via plotly
tqdm==4.66.4
# via pymatgen (pyproject.toml)
# via plotly
tqdm==4.66.5
# via pymatgen (pyproject.toml)
tzdata==2024.1
# via pandas
# via pandas
uncertainties==3.2.1
# via pymatgen (pyproject.toml)
urllib3==2.2.2
# via requests
# via pymatgen (pyproject.toml)
urllib3==2.2.3
# via requests
Loading

0 comments on commit be6d33d

Please sign in to comment.