From 5c05922aef86e273e7d6739ee822ca3e8a7240db Mon Sep 17 00:00:00 2001 From: Vanessasaurus <814322+vsoch@users.noreply.github.com> Date: Fri, 26 Aug 2022 20:50:24 -0600 Subject: [PATCH] fixing bug that writing package file defaults to None (#582) * fixing bug that writing package file defaults to None * undo changed registry path Signed-off-by: vsoch --- CHANGELOG.md | 1 + shpc/main/registry/filesystem.py | 1 + shpc/settings.yml | 2 +- shpc/tests/test_wrappers.py | 4 ++-- shpc/version.py | 2 +- 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a6a1aae30..6f906797a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and **Merged pull requests**. Critical items to know are: The versions coincide with releases on pip. Only major versions will be released as tags on Github. ## [0.0.x](https://github.com/singularityhub/singularity-hpc/tree/main) (0.0.x) + - Fixing bug with writing package file in update (0.1.1) - Add support for remote registry and sync commands --all (0.1.0) - support for GitLab and GitHub remotes - fixing bug to config set/get nested fields, default for wrapper scripts true (0.0.57) diff --git a/shpc/main/registry/filesystem.py b/shpc/main/registry/filesystem.py index d8b40b519..5c7b6f6e3 100644 --- a/shpc/main/registry/filesystem.py +++ b/shpc/main/registry/filesystem.py @@ -49,6 +49,7 @@ def save(self, package_file): """ Save the new package file to container.yaml """ + package_file = package_file or self.package_file shpc.utils.write_yaml(self._config, package_file) def load_wrapper_script(self, container_tech, script): diff --git a/shpc/settings.yml b/shpc/settings.yml index d34ad4180..509186a5b 100644 --- a/shpc/settings.yml +++ b/shpc/settings.yml @@ -103,4 +103,4 @@ container_features: # defaults to ~/.Xauthority if set to true and the container has x11: true home: # one of null, or a single path or src:dest path. # home: true in a container.yaml will use this path, if defines -updated_at: '2022-08-20T16:40:24Z' +updated_at: '2022-08-26T20:38:06Z' diff --git a/shpc/tests/test_wrappers.py b/shpc/tests/test_wrappers.py index d60db2a47..69539e0f5 100644 --- a/shpc/tests/test_wrappers.py +++ b/shpc/tests/test_wrappers.py @@ -39,10 +39,10 @@ def test_get_local_template_paths(tmp_path, with_custom_wrapper_template_path): registry.FilesystemResult("quay.io/vgteam/vg", container_yaml) ) ws = wrappers_base.WrapperScript( - "dummy.sh", # Not used in this test + "dummy.sh", client.settings, config=config, - image=None, + image=None, # Not used in this test ) client.settings.set( "wrapper_scripts", diff --git a/shpc/version.py b/shpc/version.py index b4aab5e09..c3f7c6358 100644 --- a/shpc/version.py +++ b/shpc/version.py @@ -2,7 +2,7 @@ __copyright__ = "Copyright 2021-2022, Vanessa Sochat" __license__ = "MPL 2.0" -__version__ = "0.1.0" +__version__ = "0.1.1" AUTHOR = "Vanessa Sochat" NAME = "singularity-hpc" PACKAGE_URL = "https://github.com/singularityhub/singularity-hpc"