Skip to content

Commit

Permalink
Update pyiron_base to 0.8.0 - to parse stdout directly without defini…
Browse files Browse the repository at this point in the history
…ng a collect_output() function
  • Loading branch information
jan-janssen authored and joergfunger committed Mar 28, 2024
1 parent 605f676 commit 560821c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ jobs:
- name: run-workflow
shell: bash -l {0}
run: |
conda install conda_subprocess=0.0.1 pyiron_base=0.7.11
conda install conda_subprocess=0.0.1 pyiron_base=0.8.0
cd $GITHUB_WORKSPACE/exemplary_workflow/pyiron
python workflow.py
- name: upload-paper-artifact
Expand Down
7 changes: 1 addition & 6 deletions exemplary_workflow/pyiron/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,9 @@

# Processing
## poisson
def collect_output_poisson(working_directory):
with open(os.path.join(working_directory, "numdofs.txt"), "r") as f:
return {"numdofs": int(f.read())}

poisson = pr.wrap_executable(
job_name="poisson",
executable_str="python poisson.py --mesh square.xdmf --degree 2 --outputfile poisson.pvd --num-dofs numdofs.txt",
collect_output_funct=collect_output_poisson,
conda_environment_path=pr.conda_environment.processing,
input_file_lst=["../source/poisson.py", meshio.files.square_xdmf, meshio.files.square_h5],
execute_job=True,
Expand All @@ -65,7 +60,7 @@ def collect_output_poisson(working_directory):
## substitute macros
macros = pr.wrap_executable(
job_name="macros",
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",
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",
conda_environment_path=pr.conda_environment.postprocessing,
input_file_lst=["../source/macros.tex.template", "../source/prepare_paper_macros.py", pvbatch.files.plotoverline_csv],
execute_job=True,
Expand Down

0 comments on commit 560821c

Please sign in to comment.