Skip to content

Commit b1d1f46

Browse files
committed
Merge remote-tracking branch 'refs/remotes/origin/main' into standardize
# Conflicts: # structuretoolkit/analyse/symmetry.py
2 parents bfc42f0 + 8fc7273 commit b1d1f46

Some content is hidden

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

59 files changed

+2917
-614
lines changed

.ci_support/environment-lammps.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
channels:
2+
- conda-forge
3+
dependencies:
4+
- lammps =2024.02.07

.ci_support/environment-old.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ dependencies:
99
- phonopy =2.16.2
1010
- plotly =4.14.3
1111
- pymatgen =2022.2.1
12-
- pyscal =2.10.4
12+
- pyscal3 =3.2.5
1313
- pyxtal =0.5.5
1414
- scikit-learn =1.2.1
1515
- scipy =1.9.3

.ci_support/environment.yml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
1+
name: pyiron-structuretoolkit
12
channels:
23
- conda-forge
34
dependencies:
4-
- aimsgb =1.1.0
5-
- ase =3.22.1
5+
- aimsgb =1.1.1
6+
- ase =3.23.0
67
- coverage
7-
- matplotlib-base =3.8.2
8-
- nglview =3.1.1
8+
- dscribe =2.1.1
9+
- matplotlib-base =3.9.1
10+
- nglview =3.1.2
911
- notebook
1012
- numpy =1.26.4
11-
- phonopy =2.21.0
12-
- plotly =5.18.0
13-
- pymatgen =2024.2.8
14-
- pyscal =2.10.18
15-
- pyxtal =0.6.2
16-
- scikit-learn =1.4.0
17-
- scipy =1.12.0
18-
- spglib =2.3.1
13+
- phonopy =2.26.5
14+
- plotly =5.22.0
15+
- pymatgen =2024.6.10
16+
- pyscal3 =3.2.6
17+
- pyxtal =0.6.7
18+
- scikit-learn =1.5.1
19+
- scipy =1.14.0
20+
- spglib =2.5.0
1921
- sqsgenerator =0.3

.ci_support/environment_mini.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
channels:
22
- conda-forge
33
dependencies:
4-
- ase =3.22.1
4+
- ase =3.23.0
55
- coverage
66
- numpy =1.26.4
7-
- scipy =1.12.0
7+
- scipy =1.14.0

.ci_support/release.py

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
def get_setup_version_and_pattern(setup_content):
22
depend_lst, version_lst = [], []
33
for l in setup_content:
4-
if '==' in l:
5-
lst = l.split('[')[-1].split(']')[0].replace(' ', '').replace('"', '').replace("'", '').split(',')
4+
if "==" in l:
5+
lst = (
6+
l.split("[")[-1]
7+
.split("]")[0]
8+
.replace(" ", "")
9+
.replace('"', "")
10+
.replace("'", "")
11+
.split(",")
12+
)
613
for dep in lst:
7-
if dep != '\n':
8-
version_lst.append(dep.split('==')[1])
9-
depend_lst.append(dep.split('==')[0])
14+
if dep != "\n":
15+
version_lst.append(dep.split("==")[1])
16+
depend_lst.append(dep.split("==")[0])
1017

1118
version_high_dict = {d: v for d, v in zip(depend_lst, version_lst)}
1219
return version_high_dict
@@ -16,14 +23,14 @@ def get_env_version(env_content):
1623
read_flag = False
1724
depend_lst, version_lst = [], []
1825
for l in env_content:
19-
if 'dependencies:' in l:
26+
if "dependencies:" in l:
2027
read_flag = True
2128
elif read_flag:
22-
lst = l.replace('-', '').replace(' ', '').replace('\n', '').split("=")
29+
lst = l.replace("-", "").replace(" ", "").replace("\n", "").split("=")
2330
if len(lst) == 2:
2431
depend_lst.append(lst[0])
2532
version_lst.append(lst[1])
26-
return {d:v for d, v in zip(depend_lst, version_lst)}
33+
return {d: v for d, v in zip(depend_lst, version_lst)}
2734

2835

2936
def update_dependencies(setup_content, version_low_dict, version_high_dict):
@@ -35,27 +42,29 @@ def update_dependencies(setup_content, version_low_dict, version_high_dict):
3542
version_combo_dict[dep] = dep + "==" + ver
3643

3744
setup_content_new = ""
38-
pattern_dict = {d:d + "==" + v for d, v in version_high_dict.items()}
45+
pattern_dict = {d: d + "==" + v for d, v in version_high_dict.items()}
3946
for l in setup_content:
4047
for k, v in pattern_dict.items():
4148
if v in l:
4249
l = l.replace(v, version_combo_dict[k])
43-
setup_content_new +=l
50+
setup_content_new += l
4451
return setup_content_new
4552

4653

4754
if __name__ == "__main__":
48-
with open('pyproject.toml', "r") as f:
55+
with open("pyproject.toml", "r") as f:
4956
setup_content = f.readlines()
5057

51-
with open('environment.yml', "r") as f:
58+
with open("environment.yml", "r") as f:
5259
env_content = f.readlines()
5360

5461
setup_content_new = update_dependencies(
5562
setup_content=setup_content[2:],
5663
version_low_dict=get_env_version(env_content=env_content),
57-
version_high_dict=get_setup_version_and_pattern(setup_content=setup_content[2:]),
64+
version_high_dict=get_setup_version_and_pattern(
65+
setup_content=setup_content[2:]
66+
),
5867
)
5968

60-
with open('pyproject.toml', "w") as f:
69+
with open("pyproject.toml", "w") as f:
6170
f.writelines("".join(setup_content[:2]) + setup_content_new)

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @jan-janssen

.github/workflows/black.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ on:
66
push:
77
branches: [ main ]
88
pull_request:
9-
branches: [ main ]
109

1110
jobs:
1211
build:

.github/workflows/deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ jobs:
1919
id-token: write
2020
steps:
2121
- uses: actions/checkout@v4
22-
- uses: conda-incubator/setup-miniconda@v2.2.0
22+
- uses: conda-incubator/setup-miniconda@v3
2323
with:
24-
python-version: 3.11
24+
python-version: "3.12"
2525
mamba-version: "*"
2626
channels: conda-forge
2727
miniforge-variant: Mambaforge

.github/workflows/mini.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ on:
66
push:
77
branches: [ main ]
88
pull_request:
9-
branches: [ main ]
109

1110
env:
1211
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -19,7 +18,7 @@ jobs:
1918
steps:
2019
- uses: actions/checkout@v4
2120
- name: Setup Mambaforge
22-
uses: conda-incubator/setup-miniconda@v2
21+
uses: conda-incubator/setup-miniconda@v3
2322
with:
2423
python-version: '3.12'
2524
miniforge-variant: Mambaforge

.github/workflows/pypicheck.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ on:
66
push:
77
branches: [ main ]
88
pull_request:
9-
branches: [ main ]
109

1110
jobs:
1211
build:
@@ -16,9 +15,9 @@ jobs:
1615
steps:
1716
- uses: actions/checkout@v4
1817
- name: Setup Mambaforge
19-
uses: conda-incubator/setup-miniconda@v2
18+
uses: conda-incubator/setup-miniconda@v3
2019
with:
21-
python-version: '3.11'
20+
python-version: '3.12'
2221
miniforge-variant: Mambaforge
2322
channels: conda-forge
2423
channel-priority: strict
@@ -30,4 +29,4 @@ jobs:
3029
run: |
3130
pip install versioneer[toml]==0.29
3231
pip install . --no-deps --no-build-isolation
33-
python -m pip check
32+
python -m pip check

.github/workflows/unittests.yml

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ on:
66
push:
77
branches: [ main ]
88
pull_request:
9-
branches: [ main ]
109

1110
env:
1211
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -20,15 +19,20 @@ jobs:
2019
matrix:
2120
include:
2221
- operating-system: windows-latest
23-
python-version: '3.11'
24-
label: win-64-py-3-11
22+
python-version: '3.12'
23+
label: win-64-py-3-12
2524
prefix: C:\Miniconda3\envs\my-env
2625

2726
- operating-system: macos-latest
28-
python-version: '3.11'
29-
label: osx-64-py-3-11
27+
python-version: '3.12'
28+
label: osx-64-py-3-12
3029
prefix: /Users/runner/miniconda3/envs/my-env
3130

31+
- operating-system: ubuntu-latest
32+
python-version: '3.12'
33+
label: linux-64-py-3-12
34+
prefix: /usr/share/miniconda3/envs/my-env
35+
3236
- operating-system: ubuntu-latest
3337
python-version: '3.11'
3438
label: linux-64-py-3-11
@@ -39,15 +43,13 @@ jobs:
3943
label: linux-64-py-3-10
4044
prefix: /usr/share/miniconda3/envs/my-env
4145

42-
- operating-system: ubuntu-latest
43-
python-version: '3.9'
44-
label: linux-64-py-3-9
45-
prefix: /usr/share/miniconda3/envs/my-env
46-
4746
steps:
4847
- uses: actions/checkout@v4
48+
- name: Merge conda environment
49+
if: matrix.operating-system != 'windows-latest'
50+
run: tail --lines=+4 .ci_support/environment-lammps.yml >> .ci_support/environment.yml
4951
- name: Setup Mambaforge
50-
uses: conda-incubator/setup-miniconda@v2
52+
uses: conda-incubator/setup-miniconda@v3
5153
with:
5254
python-version: ${{ matrix.python-version }}
5355
miniforge-variant: Mambaforge
@@ -62,7 +64,8 @@ jobs:
6264
run: |
6365
pip install versioneer[toml]==0.29
6466
pip install . --no-deps --no-build-isolation
65-
coverage run --omit structuretoolkit/_version.py -m unittest discover tests
67+
coverage run --omit="structuretoolkit/_version.py,tests/*" -m unittest discover tests
68+
coverage xml
6669
- name: Coverage
67-
if: matrix.label == 'linux-64-py-3-10'
70+
if: matrix.label == 'linux-64-py-3-12'
6871
uses: coverallsapp/github-action@v2

.github/workflows/unittests_old.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ on:
66
push:
77
branches: [ main ]
88
pull_request:
9-
branches: [ main ]
109

1110
jobs:
1211
build:
@@ -15,7 +14,7 @@ jobs:
1514
steps:
1615
- uses: actions/checkout@v4
1716
- name: Setup Mambaforge
18-
uses: conda-incubator/setup-miniconda@v2
17+
uses: conda-incubator/setup-miniconda@v3
1918
with:
2019
python-version: '3.9'
2120
miniforge-variant: Mambaforge

.pre-commit-config.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
repos:
2+
- repo: https://github.com/astral-sh/ruff-pre-commit
3+
rev: v0.5.2
4+
hooks:
5+
- id: ruff
6+
name: ruff lint
7+
args: ["--select", "I", "--fix"]
8+
files: ^structuretoolkit/
9+
- id: ruff-format
10+
name: ruff format

pyproject.toml

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,22 @@ authors = [
1111
readme = "README.md"
1212
license = { file = "LICENSE" }
1313
keywords = ["pyiron"]
14-
requires-python = ">=3.8"
14+
requires-python = ">=3.9, <3.13"
1515
classifiers = [
1616
"Development Status :: 5 - Production/Stable",
1717
"Topic :: Scientific/Engineering :: Physics",
1818
"License :: OSI Approved :: BSD License",
1919
"Intended Audience :: Science/Research",
2020
"Operating System :: OS Independent",
21-
"Programming Language :: Python :: 3.8",
2221
"Programming Language :: Python :: 3.9",
2322
"Programming Language :: Python :: 3.10",
2423
"Programming Language :: Python :: 3.11",
24+
"Programming Language :: Python :: 3.12",
2525
]
2626
dependencies = [
27-
"ase==3.22.1",
27+
"ase==3.23.0",
2828
"numpy==1.26.4",
29-
"scipy==1.12.0",
29+
"scipy==1.14.0",
3030
]
3131
dynamic = ["version"]
3232

@@ -36,25 +36,26 @@ Documentation = "https://github.com/pyiron/structuretoolkit"
3636
Repository = "https://github.com/pyiron/structuretoolkit"
3737

3838
[project.optional-dependencies]
39+
dscribe = ["dscribe==2.1.1"]
3940
grainboundary = [
40-
"aimsgb==1.1.0",
41-
"pymatgen==2024.2.8",
41+
"aimsgb==1.1.1",
42+
"pymatgen==2024.6.10",
4243
]
43-
pyscal = ["pyscal2==2.10.18"]
44-
nglview = ["nglview==3.1.1"]
45-
matplotlib = ["matplotlib==3.8.2"]
46-
plotly = ["plotly==5.18.0"]
47-
clusters = ["scikit-learn==1.4.0"]
48-
symmetry = ["spglib==2.3.1"]
44+
pyscal = ["pyscal3==3.2.6"]
45+
nglview = ["nglview==3.1.2"]
46+
matplotlib = ["matplotlib==3.9.1"]
47+
plotly = ["plotly==5.22.0"]
48+
clusters = ["scikit-learn==1.5.1"]
49+
symmetry = ["spglib==2.5.0"]
4950
surface = [
50-
"spglib==2.3.1",
51-
"pymatgen==2024.2.8",
51+
"spglib==2.5.0",
52+
"pymatgen==2024.6.10",
5253
]
5354
phonopy = [
54-
"phonopy==2.21.0",
55-
"spglib==2.3.1",
55+
"phonopy==2.26.5",
56+
"spglib==2.5.0",
5657
]
57-
pyxtal = ["pyxtal==0.6.2"]
58+
pyxtal = ["pyxtal==0.6.7"]
5859

5960
[tool.setuptools.packages.find]
6061
include = ["structuretoolkit*"]

setup.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
from setuptools import setup
2-
31
import versioneer
2+
from setuptools import setup
43

54
setup(
65
version=versioneer.get_version(),
76
cmdclass=versioneer.get_cmdclass(),
8-
)
7+
)

0 commit comments

Comments
 (0)