From 4d850c4a2c0014f3347d33133962016672b4abb6 Mon Sep 17 00:00:00 2001 From: Thomas Uram Date: Thu, 12 Oct 2023 09:37:05 -0500 Subject: [PATCH 1/5] Update for release --- balsam/__init__.py | 2 +- balsam/_api/model.py | 2 +- balsam/_api/models.py | 10 +++++----- balsam/config/config.py | 10 ++++++---- 4 files changed, 13 insertions(+), 11 deletions(-) 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 From a46ffb27f1de9c1723b3d423f88b6bfd877fb593 Mon Sep 17 00:00:00 2001 From: Christine Simpson <48525133+cms21@users.noreply.github.com> Date: Fri, 20 Oct 2023 10:02:22 -0500 Subject: [PATCH 2/5] Update job-template.sh for ThetaGPU Placement of `:` causes the filesystems setting through attrs to fail. --- balsam/config/defaults/alcf_thetagpu/job-template.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/balsam/config/defaults/alcf_thetagpu/job-template.sh b/balsam/config/defaults/alcf_thetagpu/job-template.sh index 64d77eac..3dedee37 100644 --- a/balsam/config/defaults/alcf_thetagpu/job-template.sh +++ b/balsam/config/defaults/alcf_thetagpu/job-template.sh @@ -3,7 +3,7 @@ #COBALT -n {{ num_nodes }} #COBALT -q {{ queue }} #COBALT -t {{ wall_time_min }} -#COBALT --attrs pubnet=true:enable_ssh=1:filesystems=home,grand,eagle,theta-fs0:{% if optional_params.get("mig_count") %}mig-mode=true{% endif %} +#COBALT --attrs pubnet=true:enable_ssh=1:filesystems=home,grand,eagle,theta-fs0{% if optional_params.get("mig_count") %}:mig-mode=true{% endif %} export https_proxy=http://theta-proxy.tmi.alcf.anl.gov:3128 From 607b52dbf146cfa687382b816f984e9ac40d7a0e Mon Sep 17 00:00:00 2001 From: Christine Simpson <48525133+cms21@users.noreply.github.com> Date: Tue, 31 Oct 2023 09:50:28 -0500 Subject: [PATCH 3/5] Update deploy.txt --- requirements/deploy.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/requirements/deploy.txt b/requirements/deploy.txt index bce28e09..0a65693a 100644 --- a/requirements/deploy.txt +++ b/requirements/deploy.txt @@ -12,6 +12,8 @@ alembic==1.8.1 SQLAlchemy==1.4.41 aredis==1.1.8 redis==4.3.4 +starlette==0.19.1 +anyio==3.7.1 # Duplicated from setup.cfg (but pinned) PyYAML==6.0 From 00f1635bd6177140d5eab100b6408ede0b2575ef Mon Sep 17 00:00:00 2001 From: Christine Simpson <48525133+cms21@users.noreply.github.com> Date: Tue, 31 Oct 2023 10:06:30 -0500 Subject: [PATCH 4/5] Update deploy.txt --- requirements/deploy.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/deploy.txt b/requirements/deploy.txt index 0a65693a..e6fd7321 100644 --- a/requirements/deploy.txt +++ b/requirements/deploy.txt @@ -12,7 +12,7 @@ alembic==1.8.1 SQLAlchemy==1.4.41 aredis==1.1.8 redis==4.3.4 -starlette==0.19.1 +starlette==0.25.0 anyio==3.7.1 # Duplicated from setup.cfg (but pinned) From b05d8d9a7a72521e7edf87f42af1a5be4633569b Mon Sep 17 00:00:00 2001 From: Christine Simpson <48525133+cms21@users.noreply.github.com> Date: Tue, 31 Oct 2023 10:11:49 -0500 Subject: [PATCH 5/5] Update deploy.txt --- requirements/deploy.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/deploy.txt b/requirements/deploy.txt index e6fd7321..0a65693a 100644 --- a/requirements/deploy.txt +++ b/requirements/deploy.txt @@ -12,7 +12,7 @@ alembic==1.8.1 SQLAlchemy==1.4.41 aredis==1.1.8 redis==4.3.4 -starlette==0.25.0 +starlette==0.19.1 anyio==3.7.1 # Duplicated from setup.cfg (but pinned)