diff --git a/balsam/__init__.py b/balsam/__init__.py index b43cf51a..7578e3df 100644 --- a/balsam/__init__.py +++ b/balsam/__init__.py @@ -1,4 +1,4 @@ from balsam.util import config_root_logger -__version__ = "0.7.0.a22" +__version__ = "0.7.0.a23" config_root_logger() diff --git a/balsam/_api/model.py b/balsam/_api/model.py index 38ae2c48..b889fd18 100644 --- a/balsam/_api/model.py +++ b/balsam/_api/model.py @@ -186,7 +186,7 @@ def __repr__(self) -> str: def __str__(self) -> str: d = self.display_dict() - return yaml.dump(d, sort_keys=False, indent=4) + return str(yaml.dump(d, sort_keys=False, indent=4)) def __eq__(self, other: Any) -> bool: if not isinstance(other, BalsamModel): diff --git a/balsam/_api/models.py b/balsam/_api/models.py index 3321a5d5..ac91f412 100644 --- a/balsam/_api/models.py +++ b/balsam/_api/models.py @@ -1,5 +1,5 @@ -# This file was auto-generated via /home/turam/miniconda3/bin/python balsam/schemas/api_generator.py -# [git rev 7634992] +# This file was auto-generated via /Users/turam/opt/miniconda3/bin/python balsam/schemas/api_generator.py +# [git rev 5034973] # Do *not* make changes to the API by changing this file! import datetime @@ -765,7 +765,7 @@ class BatchJob(balsam._api.bases.BatchJobBase): job_mode = Field[balsam.schemas.batchjob.JobMode]() optional_params = Field[typing.Dict[str, str]]() filter_tags = Field[typing.Dict[str, str]]() - partitions = Field[Optional[typing.Union[typing.List[balsam.schemas.batchjob.BatchJobPartition], None]]]() + partitions = Field[typing.Optional[typing.List[balsam.schemas.batchjob.BatchJobPartition]]]() site_id = Field[int]() project = Field[str]() queue = Field[str]() @@ -786,7 +786,7 @@ def __init__( queue: str, optional_params: Optional[typing.Dict[str, str]] = None, filter_tags: Optional[typing.Dict[str, str]] = None, - partitions: Optional[typing.Union[typing.List[balsam.schemas.batchjob.BatchJobPartition], None]] = None, + partitions: Optional[typing.Optional[typing.List[balsam.schemas.batchjob.BatchJobPartition]]] = None, **kwargs: Any, ) -> None: """ @@ -918,7 +918,7 @@ def create( queue: str, optional_params: Optional[typing.Dict[str, str]] = None, filter_tags: Optional[typing.Dict[str, str]] = None, - partitions: Optional[typing.Union[typing.List[balsam.schemas.batchjob.BatchJobPartition], None]] = None, + partitions: Optional[typing.Optional[typing.List[balsam.schemas.batchjob.BatchJobPartition]]] = None, ) -> BatchJob: """ Create a new BatchJob object and save it to the API in one step. diff --git a/balsam/config/config.py b/balsam/config/config.py index e4c8f066..3f460ff6 100644 --- a/balsam/config/config.py +++ b/balsam/config/config.py @@ -236,10 +236,12 @@ def save(self, path: Union[str, Path]) -> None: fp.write(self.dump_yaml()) def dump_yaml(self) -> str: - return yaml.dump( - json.loads(self.json()), - sort_keys=False, - indent=4, + return str( + yaml.dump( + json.loads(self.json()), + sort_keys=False, + indent=4, + ) ) @classmethod