Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single import for workflows #645

Merged
merged 6 commits into from
May 1, 2023
Merged

Single import for workflows #645

merged 6 commits into from
May 1, 2023

Conversation

liamhuber
Copy link
Member

Expose the node-creation decorators (right now just node) as class attributes on the workflow so that you can work with the workflow infrastructure after only importing Workflow.

Eg the following now works:

from pyiron_contrib.workflow.workflow import Workflow

@Workflow.wrap_as.node("y")
def plus_one(x: int = 0) -> int:
    return x + 1

plus_one().outputs.y.value
>>> 1

To guarantee that you can get the decorator straight from the workflow class itself
Git reset didn't work after I already pushed the bad commit
@coveralls
Copy link

coveralls commented Apr 26, 2023

Pull Request Test Coverage Report for Build 4853687399

  • 5 of 5 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.03%) to 12.519%

Totals Coverage Status
Change from base Build 4853665754: 0.03%
Covered Lines: 1530
Relevant Lines: 12221

💛 - Coveralls

@liamhuber
Copy link
Member Author

Failed tests are mamba seg faulting

Run mamba env update -n my-env -f environment.yml
  mamba env update -n my-env -f environment.yml
  shell: /usr/bin/bash -l {0}
  env:
    INPUT_RUN_POST: true
    CONDA: /usr/share/miniconda3
    CONDA_PKGS_DIR: /home/runner/conda_pkgs_dir
    DATE: 20230426
conda-forge/linux-64                                        Using cache
conda-forge/noarch                                          Using cache
Looking for: ['ase=3.22.1', 'coveralls', 'coverage', 'codacy-coverage', 'matplotlib=3.7.1', 'numpy=1.24.3', 'pyiron_base=0.5.36', 'pyiron_atomistics=0.2.66', 'pyparsing=3.0.9', 'scipy=1.10.1', 'seaborn=0.12.2', 'scikit-image=0.20.0', 'randspg=0.0.1', 'boto3=1.26.118', 'moto=4.1.8', 'pycp2k=0.2.2', 'typeguard=3.0.2', 'aws-sam-translator=1.65.0']
/home/runner/work/_temp/3f95bc7e-22d4-4021-88d5-3b267a7ee143.sh: line 1:  2119 Segmentation fault      (core dumped) mamba env update -n my-env -f environment.yml
Error: Process completed with exit code 139.

@liamhuber liamhuber mentioned this pull request Apr 26, 2023
@liamhuber liamhuber merged commit 455c48e into main May 1, 2023
@delete-merged-branch delete-merged-branch bot deleted the single_import branch May 1, 2023 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants