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

Update for release #375

Merged
merged 2 commits into from
Oct 31, 2023
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
2 changes: 1 addition & 1 deletion balsam/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from balsam.util import config_root_logger

__version__ = "0.7.0.a22"
__version__ = "0.7.0.a23"
config_root_logger()
2 changes: 1 addition & 1 deletion balsam/_api/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
10 changes: 5 additions & 5 deletions balsam/_api/models.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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]()
Expand All @@ -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:
"""
Expand Down Expand Up @@ -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.
Expand Down
10 changes: 6 additions & 4 deletions balsam/config/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down