Skip to content

Commit 560821c

Browse files
jan-janssenjoergfunger
authored andcommitted
Update pyiron_base to 0.8.0 - to parse stdout directly without defining a collect_output() function
1 parent 605f676 commit 560821c

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ jobs:
323323
- name: run-workflow
324324
shell: bash -l {0}
325325
run: |
326-
conda install conda_subprocess=0.0.1 pyiron_base=0.7.11
326+
conda install conda_subprocess=0.0.1 pyiron_base=0.8.0
327327
cd $GITHUB_WORKSPACE/exemplary_workflow/pyiron
328328
python workflow.py
329329
- name: upload-paper-artifact

exemplary_workflow/pyiron/workflow.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,9 @@
3838

3939
# Processing
4040
## poisson
41-
def collect_output_poisson(working_directory):
42-
with open(os.path.join(working_directory, "numdofs.txt"), "r") as f:
43-
return {"numdofs": int(f.read())}
44-
4541
poisson = pr.wrap_executable(
4642
job_name="poisson",
4743
executable_str="python poisson.py --mesh square.xdmf --degree 2 --outputfile poisson.pvd --num-dofs numdofs.txt",
48-
collect_output_funct=collect_output_poisson,
4944
conda_environment_path=pr.conda_environment.processing,
5045
input_file_lst=["../source/poisson.py", meshio.files.square_xdmf, meshio.files.square_h5],
5146
execute_job=True,
@@ -65,7 +60,7 @@ def collect_output_poisson(working_directory):
6560
## substitute macros
6661
macros = pr.wrap_executable(
6762
job_name="macros",
68-
executable_str=f"python prepare_paper_macros.py --macro-template-file macros.tex.template --plot-data-path plotoverline.csv --domain-size {domain_size} --num-dofs {poisson.output['numdofs']} --output-macro-file macros.tex",
63+
executable_str=f"python prepare_paper_macros.py --macro-template-file macros.tex.template --plot-data-path plotoverline.csv --domain-size {domain_size} --num-dofs {int(poisson.output['stdout'].split()[-1])} --output-macro-file macros.tex",
6964
conda_environment_path=pr.conda_environment.postprocessing,
7065
input_file_lst=["../source/macros.tex.template", "../source/prepare_paper_macros.py", pvbatch.files.plotoverline_csv],
7166
execute_job=True,

0 commit comments

Comments
 (0)