Skip to content

Commit 5fe421c

Browse files
committed
Merge branch 'main' of github.com:materialsproject/atomate2
pull turnk main
2 parents ba420ba + f25693d commit 5fe421c

File tree

1,387 files changed

+67818
-4320
lines changed

Some content is hidden

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

1,387 files changed

+67818
-4320
lines changed

.github/PULL_REQUEST_TEMPLATE.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,9 @@ Before a pull request can be merged, the following items must be checked:
2727

2828
* [ ] Code is in the [standard Python style](https://www.python.org/dev/peps/pep-0008/).
2929
The easiest way to handle this is to run the following in the **correct sequence** on
30-
your local machine. Start with running [black](https://black.readthedocs.io/en/stable/index.html) on your new code. This will
31-
automatically reformat your code to PEP8 conventions and removes most issues. Then run
32-
[ruff](https://ruff.rs).
33-
* [ ] Docstrings have been added in the [Numpy docstring format](https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_numpy.html).
30+
your local machine. Start with running [`ruff`](https://docs.astral.sh/ruff) and `ruff format` on your new code. This will
31+
automatically reformat your code to PEP8 conventions and fix many linting issues.
32+
* [ ] Doc strings have been added in the [Numpy docstring format](https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_numpy.html).
3433
Run [ruff](https://beta.ruff.rs/docs/rules/#pydocstyle-d) on your code.
3534
* [ ] Type annotations are **highly** encouraged. Run [mypy](http://mypy-lang.org) to
3635
type check your code.

.github/workflows/deploy.yml

+10-12
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,30 @@ on:
66
types: [completed]
77

88
jobs:
9-
109
deploy-docs:
11-
1210
# only run if commit is a push to master and the testing finished
1311
if: ${{ github.repository_owner == 'materialsproject' && github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'push' && startsWith(github.event.workflow_run.head_branch, 'v0.') }}
1412
runs-on: ubuntu-latest
1513

1614
steps:
17-
- uses: actions/checkout@v3
15+
- uses: actions/checkout@v4
1816
with:
1917
ref: ${{ github.event.workflow_run.head_branch }}
2018

2119
- name: Install pandoc
2220
run: sudo apt-get install pandoc
2321

24-
- uses: actions/setup-python@v4
22+
- uses: actions/setup-python@v5
2523
with:
26-
python-version: '3.10'
24+
python-version: "3.10"
2725
cache: pip
2826
cache-dependency-path: pyproject.toml
2927

3028
- name: Install dependencies
3129
run: |
3230
python -m pip install --upgrade pip
31+
# ase needed to get FrechetCellFilter used by ML force fields
32+
pip install git+https://gitlab.com/ase/ase
3333
pip install .[strict,docs]
3434
3535
- name: Build
@@ -42,19 +42,18 @@ jobs:
4242
publish_dir: ./docs_build/
4343

4444
deploy-pypi:
45-
4645
# only run if commit is a push to master, the testing finished, and tagged as version
4746
if: github.repository_owner == 'materialsproject' && github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'push' && startsWith(github.event.workflow_run.head_branch, 'v0.')
4847
runs-on: ubuntu-latest
4948

5049
steps:
51-
- uses: actions/checkout@v3
50+
- uses: actions/checkout@v4
5251
with:
5352
ref: ${{ github.event.workflow_run.head_branch }}
5453

55-
- uses: actions/setup-python@v4
54+
- uses: actions/setup-python@v5
5655
with:
57-
python-version: '3.10'
56+
python-version: "3.10"
5857

5958
- name: Build
6059
run: |
@@ -68,19 +67,18 @@ jobs:
6867
password: ${{ secrets.PYPI_PASSWORD }}
6968

7069
deploy-github:
71-
7270
runs-on: ubuntu-latest
7371
needs:
7472
- deploy-pypi
7573

7674
steps:
77-
- uses: actions/checkout@v3
75+
- uses: actions/checkout@v4
7876
with:
7977
ref: ${{ github.event.workflow_run.head_branch }}
8078

8179
- name: Write release info
8280
run: |
83-
awk 'BEGIN {p = 0} {a = 0 }; /^v\d*.\d*.\d*./ { p += 1; a = 1}; p + a == 1 { print } ' CHANGELOG.md | sed -e '1,1d' | sed -e '/./,$!d' -e :a -e '/^\n*$/{$d;N;ba' -e '}' > release_info.txt
81+
awk 'BEGIN {p = 0} {a = 0 }; /^\#\#\ v\d*.\d*.\d*./ { p += 1; a = 1}; p + a == 1 { print } ' CHANGELOG.md | sed -e '1,1d' | sed -e '/./,$!d' -e :a -e '/^\n*$/{$d;N;ba' -e '}' > release_info.txt
8482
echo "" >> release_info.txt
8583
awk '/CONTRIBUTOR SECTION/{f=1; c=0} f' CHANGELOG.md >> release_info.txt
8684

.github/workflows/docs.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ jobs:
1717
runs-on: ubuntu-latest
1818

1919
steps:
20-
- uses: actions/checkout@v3
20+
- uses: actions/checkout@v4
2121
with:
2222
ref: ${{ github.event.workflow_run.head_branch }}
2323

2424
- name: Install pandoc
2525
run: sudo apt-get install pandoc
2626

27-
- uses: actions/setup-python@v4
27+
- uses: actions/setup-python@v5
2828
with:
2929
python-version: "3.10"
3030
cache: pip
@@ -33,6 +33,8 @@ jobs:
3333
- name: Install dependencies
3434
run: |
3535
python -m pip install --upgrade pip
36+
# ase needed to get FrechetCellFilter used by ML force fields
37+
pip install git+https://gitlab.com/ase/ase
3638
pip install .[strict,docs]
3739
3840
- name: Build

.github/workflows/testing.yml

+27-13
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@ name: testing
33
on:
44
push:
55
branches: [main]
6-
tags: ['v*']
6+
tags: ["v*"]
77
pull_request:
8-
branches: [main]
8+
workflow_dispatch:
99

1010
jobs:
1111
lint:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v3
14+
- uses: actions/checkout@v4
1515

16-
- uses: actions/setup-python@v4
16+
- uses: actions/setup-python@v5
1717
with:
18-
python-version: "3.8"
18+
python-version: "3.9"
1919
cache: pip
2020
cache-dependency-path: pyproject.toml
2121

@@ -31,21 +31,33 @@ jobs:
3131
runs-on: ubuntu-latest
3232
strategy:
3333
matrix:
34-
python-version: ["3.8", "3.9", "3.10"]
34+
python-version: ["3.9", "3.10", "3.11"]
3535

3636
steps:
37-
- uses: actions/checkout@v3
37+
- uses: actions/checkout@v4
3838

39-
- uses: actions/setup-python@v4
39+
- uses: actions/setup-python@v5
4040
with:
4141
python-version: ${{ matrix.python-version }}
42-
cache: pip
43-
cache-dependency-path: pyproject.toml
42+
4443

4544
- name: Install dependencies
45+
# ERROR: Cannot install atomate2 and atomate2[strict,tests]==0.0.1 because these package versions have conflicting dependencies.
46+
# The conflict is caused by:
47+
# atomate2[strict,tests] 0.0.1 depends on pymatgen>=2023.10.4
48+
# atomate2[strict,tests] 0.0.1 depends on pymatgen==2023.10.4; extra == "strict"
49+
# ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
50+
# chgnet 0.2.1 depends on pymatgen>=2023.5.31
51+
# emmet-core 0.70.0 depends on pymatgen>=2023.10.11
4652
run: |
4753
python -m pip install --upgrade pip
48-
pip install .[strict,tests]
54+
mkdir -p ~/.abinit/pseudos
55+
cp -r tests/test_data/abinit/pseudos/ONCVPSP-PBE-SR-PDv0.4 ~/.abinit/pseudos
56+
# ase needed to get FrechetCellFilter used by ML force fields
57+
pip install git+https://gitlab.com/ase/ase
58+
pip install .[strict,tests,abinit]
59+
pip install torch-runstats
60+
pip install --no-deps nequip
4961
5062
- name: Test
5163
env:
@@ -62,9 +74,9 @@ jobs:
6274
runs-on: ubuntu-latest
6375

6476
steps:
65-
- uses: actions/checkout@v3
77+
- uses: actions/checkout@v4
6678

67-
- uses: actions/setup-python@v4
79+
- uses: actions/setup-python@v5
6880
with:
6981
python-version: "3.10"
7082
cache: pip
@@ -73,6 +85,8 @@ jobs:
7385
- name: Install dependencies
7486
run: |
7587
python -m pip install --upgrade pip
88+
# ase needed to get FrechetCellFilter used by ML force fields
89+
pip install git+https://gitlab.com/ase/ase
7690
pip install .[strict,docs]
7791
7892
- name: Build

.github/workflows/update-precommit.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@ name: pre-commit-auto-update
22

33
on:
44
schedule:
5-
- cron: '0 0 1,14,28 * *'
5+
- cron: "0 0 1,14,28 * *"
66
workflow_dispatch:
77

88
jobs:
99
auto-update:
1010
runs-on: ubuntu-latest
11-
11+
1212
steps:
13-
- uses: actions/checkout@v3
13+
- uses: actions/checkout@v4
1414

1515
- name: Set up Python
16-
uses: actions/setup-python@v4
16+
uses: actions/setup-python@v5
1717
with:
18-
python-version: 3.8
18+
python-version: 3.9
1919

2020
- name: Install pre-commit
2121
run: pip install pre-commit

.pre-commit-config.yaml

+7-24
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,27 @@
11
default_language_version:
22
python: python3
3-
exclude: '^.github/'
3+
exclude: ^(.github/|tests/test_data/abinit/)
44
repos:
55
- repo: https://github.com/charliermarsh/ruff-pre-commit
6-
rev: v0.0.287
6+
rev: v0.3.5
77
hooks:
88
- id: ruff
99
args: [--fix]
10+
- id: ruff-format
1011
- repo: https://github.com/pre-commit/pre-commit-hooks
11-
rev: v4.4.0
12+
rev: v4.5.0
1213
hooks:
1314
- id: check-yaml
1415
- id: fix-encoding-pragma
1516
args: [--remove]
1617
- id: end-of-file-fixer
1718
- id: trailing-whitespace
18-
- repo: https://github.com/psf/black
19-
rev: 23.7.0
20-
hooks:
21-
- id: black
2219
- repo: https://github.com/asottile/blacken-docs
2320
rev: 1.16.0
2421
hooks:
2522
- id: blacken-docs
2623
additional_dependencies: [black]
2724
exclude: README.md
28-
- repo: https://github.com/pycqa/flake8
29-
rev: 6.1.0
30-
hooks:
31-
- id: flake8
32-
entry: pflake8
33-
files: ^src/
34-
additional_dependencies:
35-
- pyproject-flake8==6.0.0a1
36-
- flake8-bugbear==22.12.6
37-
- flake8-typing-imports==1.14.0
38-
- flake8-docstrings==1.6.0
39-
- flake8-rst-docstrings==0.3.0
40-
- flake8-rst==0.8.0
4125
- repo: https://github.com/pre-commit/pygrep-hooks
4226
rev: v1.10.0
4327
hooks:
@@ -46,18 +30,17 @@ repos:
4630
- id: rst-directive-colons
4731
- id: rst-inline-touching-normal
4832
- repo: https://github.com/pre-commit/mirrors-mypy
49-
rev: v1.5.1
33+
rev: v1.9.0
5034
hooks:
5135
- id: mypy
5236
files: ^src/
5337
additional_dependencies:
5438
- tokenize-rt==4.1.0
55-
- types-pkg_resources==0.1.2
5639
- types-paramiko
5740
- repo: https://github.com/codespell-project/codespell
58-
rev: v2.2.5
41+
rev: v2.2.6
5942
hooks:
6043
- id: codespell
6144
stages: [commit, commit-msg]
62-
args: [--ignore-words-list, 'titel,statics,ba,nd,te']
45+
args: [--ignore-words-list, 'titel,statics,ba,nd,te,atomate']
6346
types_or: [python, rst, markdown]

ADMIN.md

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
Version releases on Pypi and GitHub are handled automatically through GitHub
44
actions. The steps to push a new release are:
5+
56
1. Update `CHANGELOG.md` with a new version and release notes.
67
2. Create a tagged Git commit with the above changes: `git tag v0.0.1`
78
3. Push the commit and tags to GitHub using: `git push origin --tags`

0 commit comments

Comments
 (0)