Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ dependencies:
- networkx =3.6.1
- pydantic =2.12.5
- pyiron_snippets =1.2.0
- python-workflow-definition =0.1.4
4 changes: 4 additions & 0 deletions .ci_support/environment-pwd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
channels:
- conda-forge
dependencies:
- python-workflow-definition =0.1.4
1 change: 1 addition & 0 deletions .ci_support/lower-bounds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ dependencies:
- networkx =3.4.2
- pydantic =2.12.0
- pyiron_snippets =1.2.0
- python-workflow-definition =0.1.4
4 changes: 3 additions & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# .coveragerc to control coverage.py
[run]
source = flowrep
omit = flowrep/_version.py
omit =
flowrep/_version.py
flowrep/models/api/*
concurrency = multiprocessing
5 changes: 4 additions & 1 deletion .github/workflows/push-pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ jobs:
do-codecov: true
# Run mypy, ensuring it has access to pydantic
do-mypy: true
mypy-env-files: .ci_support/environment.yml
tests-env-files: .ci_support/environment.yml .ci_support/environment-pwd.yml
docs-env-files: .ci_support/environment.yml .ci_support/environment-pwd.yml
notebooks-env-files: .ci_support/environment.yml .ci_support/environment-pwd.yml
mypy-env-files: .ci_support/environment.yml .ci_support/environment-pwd.yml
# The test matrix supports up to four python versions
python-version-alt3: 'exclude'
python-version-alt2: '3.11'
Expand Down
1 change: 1 addition & 0 deletions docs/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ dependencies:
- networkx =3.6.1
- pydantic =2.12.5
- pyiron_snippets =1.2.0
- python-workflow-definition =0.1.4
12 changes: 12 additions & 0 deletions flowrep/models/api/converters.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
"""
Converters to and from the flowrep model paradigm.
May require additional dependencies.
"""

from flowrep.models.converters.python_workflow_definition import (
flowrep2pwd as flowrep2pwd,
)
from flowrep.models.converters.python_workflow_definition import (
pwd2flowrep as pwd2flowrep,
)
4 changes: 2 additions & 2 deletions flowrep/models/base_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class IOTypes(StrEnum):
} # No having labels with these names


def _valid_label(label: str) -> bool:
def is_valid_label(label: str) -> bool:
return (
label.isidentifier()
and not keyword.iskeyword(label)
Expand All @@ -38,7 +38,7 @@ def _valid_label(label: str) -> bool:


def _validate_label(v: str) -> str:
if not isinstance(v, str) or not _valid_label(v):
if not isinstance(v, str) or not is_valid_label(v):
raise ValueError(
f"Label must be a valid Python identifier and not in "
f"reserved labels {RESERVED_NAMES}. Got '{v}'"
Expand Down
Empty file.
Loading
Loading