File tree 4 files changed +27
-4
lines changed
4 files changed +27
-4
lines changed Original file line number Diff line number Diff line change
1
+ import tomlkit
2
+
3
+
4
+ if __name__ == "__main__" :
5
+ with open ("pyproject.toml" , "r" ) as f :
6
+ data = tomlkit .load (f )
7
+
8
+ lst = []
9
+ for sub_lst in data ["project" ]["optional-dependencies" ].values ():
10
+ for el in sub_lst :
11
+ lst .append (el )
12
+
13
+ data ["project" ]["dependencies" ] += [el for el in set (lst ) if not el .startswith ("pwtools" )]
14
+
15
+ with open ("pyproject.toml" , "w" ) as f :
16
+ f .writelines (tomlkit .dumps (data ))
Original file line number Diff line number Diff line change @@ -2,3 +2,4 @@ channels:
2
2
- conda-forge
3
3
dependencies :
4
4
- pymace =0.3.6
5
+ - pytorch =2.5.1
Original file line number Diff line number Diff line change @@ -2,4 +2,4 @@ channels:
2
2
- conda-forge
3
3
dependencies :
4
4
- qe =7.2
5
- - pwtools =1.2.3
5
+ - pwtools =1.2.3
Original file line number Diff line number Diff line change @@ -134,18 +134,24 @@ jobs:
134
134
steps :
135
135
- uses : actions/checkout@v4
136
136
- name : Conda config
137
- run : echo -e "channels:\n - conda-forge\n" > .condarc
137
+ run : |
138
+ cp .ci_support/environment.yml environment.yml
139
+ tail --lines=+4 .ci_support/environment-lammps.yml >> environment.yml
140
+ tail --lines=+4 .ci_support/environment-gpaw.yml >> environment.yml
141
+ echo -e "channels:\n - conda-forge\n" > .condarc
138
142
- name : Setup Mambaforge
139
143
uses : conda-incubator/setup-miniconda@v3
140
144
with :
141
145
python-version : ' 3.12'
142
146
miniforge-version : latest
143
147
condarc-file : .condarc
144
- environment-file : .ci_support/ environment.yml
148
+ environment-file : environment.yml
145
149
- name : Pip check
146
150
shell : bash -l {0}
147
151
run : |
148
- pip install versioneer[toml]==0.29
152
+ pip install versioneer[toml]==0.29 tomlkit
153
+ python .ci_support/check.py
154
+ cat pyproject.toml
149
155
pip install . --no-deps --no-build-isolation
150
156
pip check
151
157
You can’t perform that action at this time.
0 commit comments