Skip to content

Commit 602c851

Browse files
authored
Merge pull request #186 from pyiron/main
Merge main
2 parents d8c1485 + 2a5adbf commit 602c851

31 files changed

+316
-2427
lines changed

.ci_support/environment-docs.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
channels:
22
- conda-forge
33
dependencies:
4-
- nbsphinx
5-
- sphinx
6-
- myst-parser
7-
- numpy
8-
- mpi4py
9-
- pympipool
10-
- ase
11-
- scipy
4+
- nbsphinx
5+
- sphinx
6+
- myst-parser
7+
- numpy
8+
- mpi4py
9+
- pympipool
10+
- ase
11+
- scipy

.ci_support/environment-mpich.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
channels:
2-
- conda-forge
2+
- conda-forge
33
dependencies:
4-
- coverage
5-
- lammps =2023.08.02
6-
- mpich
7-
- numpy =1.26.0
8-
- mpi4py =3.1.4
9-
- pympipool =0.7.1
10-
- ase =3.22.1
11-
- scipy =1.11.3
4+
- coverage
5+
- lammps =2024.02.07
6+
- mpich
7+
- numpy =1.26.4
8+
- mpi4py =3.1.5
9+
- pympipool =0.7.17
10+
- ase =3.22.1
11+
- scipy =1.13.0

.ci_support/environment-old.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
channels:
2+
- conda-forge
3+
dependencies:
4+
- lammps =2022.06.23
5+
- openmpi
6+
- numpy =1.23.5
7+
- mpi4py =3.1.4
8+
- pympipool =0.7.0
9+
- ase =3.20.1
10+
- scipy =1.9.3
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
channels:
2-
- conda-forge
2+
- conda-forge
33
dependencies:
4-
- coverage
5-
- lammps =2023.08.02
6-
- openmpi
7-
- numpy =1.26.0
8-
- mpi4py =3.1.4
9-
- pympipool =0.7.1
10-
- ase =3.22.1
11-
- scipy =1.11.3
4+
- coverage
5+
- lammps =2024.02.07
6+
- openmpi
7+
- numpy =1.26.4
8+
- mpi4py =3.1.5
9+
- pympipool =0.7.17
10+
- ase =3.22.1
11+
- scipy =1.13.0

.ci_support/release.py

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
def get_setup_version_and_pattern(setup_content):
2+
depend_lst, version_lst = [], []
3+
for l in setup_content:
4+
if '==' in l:
5+
lst = l.split('[')[-1].split(']')[0].replace(' ', '').replace('"', '').replace("'", '').split(',')
6+
for dep in lst:
7+
if dep != '\n':
8+
version_lst.append(dep.split('==')[1])
9+
depend_lst.append(dep.split('==')[0])
10+
11+
version_high_dict = {d: v for d, v in zip(depend_lst, version_lst)}
12+
return version_high_dict
13+
14+
15+
def get_env_version(env_content):
16+
read_flag = False
17+
depend_lst, version_lst = [], []
18+
for l in env_content:
19+
if 'dependencies:' in l:
20+
read_flag = True
21+
elif read_flag:
22+
lst = l.replace('-', '').replace(' ', '').replace('\n', '').split("=")
23+
if len(lst) == 2:
24+
depend_lst.append(lst[0])
25+
version_lst.append(lst[1])
26+
return {d:v for d, v in zip(depend_lst, version_lst)}
27+
28+
29+
def update_dependencies(setup_content, version_low_dict, version_high_dict):
30+
version_combo_dict = {}
31+
for dep, ver in version_high_dict.items():
32+
if dep in version_low_dict.keys() and version_low_dict[dep] != ver:
33+
version_combo_dict[dep] = dep + ">=" + version_low_dict[dep] + ",<=" + ver
34+
else:
35+
version_combo_dict[dep] = dep + "==" + ver
36+
37+
setup_content_new = ""
38+
pattern_dict = {d:d + "==" + v for d, v in version_high_dict.items()}
39+
for l in setup_content:
40+
for k, v in pattern_dict.items():
41+
if v in l:
42+
l = l.replace(v, version_combo_dict[k])
43+
setup_content_new +=l
44+
return setup_content_new
45+
46+
47+
if __name__ == "__main__":
48+
with open('pyproject.toml', "r") as f:
49+
setup_content = f.readlines()
50+
51+
with open('environment.yml', "r") as f:
52+
env_content = f.readlines()
53+
54+
setup_content_new = update_dependencies(
55+
setup_content=setup_content[2:],
56+
version_low_dict=get_env_version(env_content=env_content),
57+
version_high_dict=get_setup_version_and_pattern(setup_content=setup_content[2:]),
58+
)
59+
60+
with open('pyproject.toml', "w") as f:
61+
f.writelines("".join(setup_content[:2]) + setup_content_new)

.coveragerc

Lines changed: 0 additions & 5 deletions
This file was deleted.

.github/delete-merged-branch-config.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

.github/dependabot.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@ updates:
33
- package-ecosystem: pip
44
directory: "/"
55
schedule:
6-
interval: weekly
7-
day: monday
6+
interval: "daily"
87
open-pull-requests-limit: 10

.github/workflows/black.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
1+
# This workflow is used to check the differences and find conflict markers or whitespace errors
32

43
name: Black
54

@@ -13,8 +12,8 @@ jobs:
1312
build:
1413
runs-on: ubuntu-latest
1514
steps:
16-
- uses: actions/checkout@v2
15+
- uses: actions/checkout@v4
1716
- uses: psf/black@stable
1817
with:
1918
options: "--check --diff"
20-
src: "./pylammpsmpi"
19+
src: ./${{ github.event.repository.name }}

.github/workflows/coverage.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1515

1616
steps:
17-
- uses: actions/checkout@v2
17+
- uses: actions/checkout@v4
1818
- uses: conda-incubator/setup-miniconda@v2
1919
with:
2020
python-version: "3.11"
@@ -23,14 +23,11 @@ jobs:
2323
channel-priority: strict
2424
use-mamba: true
2525
environment-file: .ci_support/environment-openmpi.yml
26-
- name: Setup
27-
shell: bash -l {0}
28-
run: |
29-
pip install --no-deps .
3026
- name: Test
3127
shell: bash -l {0}
3228
run: |
33-
coverage run --omit pylammpsmpi/_version.py -m unittest discover tests
34-
coverage combine
29+
pip install versioneer[toml]==0.29
30+
pip install . --no-deps --no-build-isolation
31+
coverage run --omit="pylammpsmpi/_version.py,tests/*" -m unittest discover tests
3532
- name: Coveralls
3633
uses: coverallsapp/github-action@v2

0 commit comments

Comments
 (0)