Skip to content

Commit 0c3e470

Browse files
committed
First "working" version. tests pass locally.
1 parent 172f2d0 commit 0c3e470

79 files changed

Lines changed: 7802 additions & 17690 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/test.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,6 @@ jobs:
6161
resolution: highest
6262
extras: prototypes,optional
6363

64-
# pytest-split automatically distributes work load so parallel jobs finish in similar time
65-
# update durations file with `pytest --store-durations --durations-path tests/files/.pytest-split-durations`
66-
split: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
67-
6864
runs-on: ${{ matrix.config.os }}
6965
env:
7066
OPT_BIN_DIR: ${{ github.workspace }}/opt/bin # for optional Ubuntu dependencies
@@ -111,13 +107,11 @@ jobs:
111107
if: (matrix.config.os == 'ubuntu-latest' || matrix.config.os == 'macos-latest') && steps.optbin-cache.outputs.cache-hit != 'true'
112108
run: bash .github/workflows/_install_opt_unit_deps.sh "$OPT_BIN_DIR"
113109

114-
- name: pytest split ${{ matrix.split }}
110+
- name: pytest
115111
env:
116112
MPLBACKEND: Agg # non-interactive backend for matplotlib
117113
PMG_MAPI_KEY: ${{ secrets.PMG_MAPI_KEY }}
118114
PMG_TEST_FILES_DIR: "${{ github.workspace }}/pymatgen-test-files"
119115
PYTHONWARNDEFAULTENCODING: "true" # PEP 597: Enable optional EncodingWarning
120116
run: |
121-
pytest tests \
122-
-n auto --splits 10 --group ${{ matrix.split }} \
123-
--durations-path tests/files/.pytest-split-durations \
117+
pytest tests -n auto

.pre-commit-config.yaml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
exclude: ^(docs|tests/files|tasks.py)
2+
3+
ci:
4+
autoupdate_schedule: monthly
5+
skip: [mypy, pyright]
6+
autofix_commit_msg: pre-commit auto-fixes
7+
autoupdate_commit_msg: pre-commit autoupdate
8+
9+
repos:
10+
- repo: https://github.com/astral-sh/ruff-pre-commit
11+
rev: v0.14.14
12+
hooks:
13+
- id: ruff
14+
args: [--fix, --unsafe-fixes]
15+
- id: ruff-format
16+
17+
- repo: https://github.com/pre-commit/pre-commit-hooks
18+
rev: v6.0.0
19+
hooks:
20+
- id: check-yaml
21+
- id: end-of-file-fixer
22+
- id: trailing-whitespace
23+
24+
- repo: https://github.com/pre-commit/mirrors-mypy
25+
rev: v1.19.1
26+
hooks:
27+
- id: mypy
28+
entry: mypy -p pymatgen
29+
pass_filenames: false
30+
31+
- repo: https://github.com/codespell-project/codespell
32+
rev: v2.4.1
33+
hooks:
34+
- id: codespell
35+
stages: [pre-commit, commit-msg]
36+
exclude_types: [html]
37+
additional_dependencies: [tomli] # needed to read pyproject.toml below py3.11
38+
exclude: src/pymatgen/analysis/aflow_prototypes.json
39+
40+
- repo: https://github.com/MarcoGorelli/cython-lint
41+
rev: v0.19.0
42+
hooks:
43+
- id: cython-lint
44+
args: [--no-pycodestyle]
45+
- id: double-quote-cython-strings
46+
47+
- repo: https://github.com/adamchainz/blacken-docs
48+
rev: 1.20.0
49+
hooks:
50+
- id: blacken-docs
51+
52+
- repo: https://github.com/igorshubovych/markdownlint-cli
53+
rev: v0.47.0
54+
hooks:
55+
- id: markdownlint
56+
# MD013: line too long
57+
# MD024: Multiple headings with the same content
58+
# MD033: no inline HTML
59+
# MD041: first line in a file should be a top-level heading
60+
# MD025: single title
61+
args: [--disable, MD013, MD024, MD025, MD033, MD041, "--"]
62+
63+
- repo: https://github.com/kynan/nbstripout
64+
rev: 0.9.0
65+
hooks:
66+
- id: nbstripout
67+
args: [--drop-empty-cells, --keep-output]
68+
69+
- repo: https://github.com/RobertCraigie/pyright-python
70+
rev: v1.1.408
71+
hooks:
72+
- id: pyright

pymatgen-test-files

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ dependencies = [
7474
"uncertainties>=3.1",
7575
"plotly>=6.0",
7676
"joblib>=1.3.2",
77+
"bibtexparser"
7778
]
7879
version = "2025.10.7"
7980

0 commit comments

Comments
 (0)