From cc6f05e7df509cbe3f17560d4622394e60e0d40a Mon Sep 17 00:00:00 2001 From: vsoch Date: Wed, 19 Jan 2022 19:21:42 -0700 Subject: [PATCH 1/6] adding oras and bumping license years Signed-off-by: vsoch --- CHANGELOG.md | 1 + spython/__init__.py | 2 +- spython/client/__init__.py | 2 +- spython/client/recipe.py | 2 +- spython/client/shell.py | 2 +- spython/client/test.py | 2 +- spython/image/__init__.py | 2 +- spython/image/cmd/__init__.py | 2 +- spython/image/cmd/create.py | 2 +- spython/image/cmd/export.py | 2 +- spython/image/cmd/importcmd.py | 2 +- spython/image/cmd/utils.py | 2 +- spython/instance/__init__.py | 2 +- spython/instance/cmd/__init__.py | 2 +- spython/instance/cmd/logs.py | 2 +- spython/instance/cmd/start.py | 2 +- spython/instance/cmd/stop.py | 2 +- spython/logger/compatibility.py | 2 +- spython/logger/message.py | 2 +- spython/logger/spinner.py | 2 +- spython/main/__init__.py | 2 +- spython/main/apps.py | 2 +- spython/main/base/__init__.py | 2 +- spython/main/base/command.py | 2 +- spython/main/base/flags.py | 2 +- spython/main/base/generate.py | 2 +- spython/main/base/logger.py | 2 +- spython/main/base/sutils.py | 2 +- spython/main/build.py | 2 +- spython/main/execute.py | 2 +- spython/main/export.py | 2 +- spython/main/help.py | 2 +- spython/main/inspect.py | 2 +- spython/main/instances.py | 2 +- spython/main/parse/parsers/__init__.py | 2 +- spython/main/parse/parsers/base.py | 2 +- spython/main/parse/parsers/docker.py | 2 +- spython/main/parse/parsers/singularity.py | 2 +- spython/main/parse/recipe.py | 2 +- spython/main/parse/writers/__init__.py | 2 +- spython/main/parse/writers/base.py | 2 +- spython/main/parse/writers/docker.py | 2 +- spython/main/parse/writers/singularity.py | 2 +- spython/main/pull.py | 8 +++----- spython/oci/__init__.py | 2 +- spython/oci/cmd/__init__.py | 2 +- spython/oci/cmd/actions.py | 2 +- spython/oci/cmd/mounts.py | 2 +- spython/oci/cmd/states.py | 2 +- spython/tests/conftest.py | 8 ++++++++ spython/tests/test_base.py | 2 +- spython/tests/test_client.py | 10 +++++++++- spython/tests/test_conversion.py | 2 +- spython/tests/test_instances.py | 2 +- spython/tests/test_oci.py | 2 +- spython/tests/test_parsers.py | 2 +- spython/tests/test_recipe.py | 2 +- spython/tests/test_utils.py | 2 +- spython/tests/test_writers.py | 2 +- spython/utils/fileio.py | 2 +- spython/utils/misc.py | 2 +- spython/utils/terminal.py | 2 +- spython/version.py | 6 +++--- 63 files changed, 82 insertions(+), 67 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ee4168e6..b0fc3334 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ The client here will eventually be released as "spython" (and eventually to singularity on pypi), and the versions here will coincide with these releases. ## [master](https://github.com/singularityhub/singularity-cli/tree/master) + - adding support for SIF (oras pull) (0.1.18) - updating CI/tests and fixing deprecations (warnings) (0.1.17) - fixing bug with defining comments earlier (0.1.16) - ensure options and args from instance init are honored (0.1.15) diff --git a/spython/__init__.py b/spython/__init__.py index 621fb585..9a8bcdd5 100644 --- a/spython/__init__.py +++ b/spython/__init__.py @@ -1,6 +1,6 @@ """ -Copyright (C) 2017-2021 Vanessa Sochat. +Copyright (C) 2017-2022 Vanessa Sochat. This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/client/__init__.py b/spython/client/__init__.py index e5e50ec5..343a5faa 100644 --- a/spython/client/__init__.py +++ b/spython/client/__init__.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (C) 2017-2021 Vanessa Sochat. +# Copyright (C) 2017-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/client/recipe.py b/spython/client/recipe.py index c2768fcd..189506b9 100644 --- a/spython/client/recipe.py +++ b/spython/client/recipe.py @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2021 Vanessa Sochat. +# Copyright (C) 2017-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/client/shell.py b/spython/client/shell.py index 48b19c88..252165f2 100644 --- a/spython/client/shell.py +++ b/spython/client/shell.py @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2021 Vanessa Sochat. +# Copyright (C) 2017-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/client/test.py b/spython/client/test.py index 2b735817..97c8d60a 100644 --- a/spython/client/test.py +++ b/spython/client/test.py @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2021 Vanessa Sochat. +# Copyright (C) 2017-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/image/__init__.py b/spython/image/__init__.py index 9a7456fd..36cc4ed2 100644 --- a/spython/image/__init__.py +++ b/spython/image/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2021 Vanessa Sochat. +# Copyright (C) 2017-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/image/cmd/__init__.py b/spython/image/cmd/__init__.py index 72181599..dbdadf42 100644 --- a/spython/image/cmd/__init__.py +++ b/spython/image/cmd/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2021 Vanessa Sochat. +# Copyright (C) 2017-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/image/cmd/create.py b/spython/image/cmd/create.py index 621cb67c..4be68312 100644 --- a/spython/image/cmd/create.py +++ b/spython/image/cmd/create.py @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2021 Vanessa Sochat. +# Copyright (C) 2017-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/image/cmd/export.py b/spython/image/cmd/export.py index 546da669..51342b4f 100644 --- a/spython/image/cmd/export.py +++ b/spython/image/cmd/export.py @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2021 Vanessa Sochat. +# Copyright (C) 2017-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/image/cmd/importcmd.py b/spython/image/cmd/importcmd.py index ab453919..88402b7e 100644 --- a/spython/image/cmd/importcmd.py +++ b/spython/image/cmd/importcmd.py @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2021 Vanessa Sochat. +# Copyright (C) 2017-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/image/cmd/utils.py b/spython/image/cmd/utils.py index d055ce1a..08f0ae8e 100644 --- a/spython/image/cmd/utils.py +++ b/spython/image/cmd/utils.py @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2021 Vanessa Sochat. +# Copyright (C) 2017-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/instance/__init__.py b/spython/instance/__init__.py index 46216bf8..bfb32a32 100644 --- a/spython/instance/__init__.py +++ b/spython/instance/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2021 Vanessa Sochat. +# Copyright (C) 2017-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/instance/cmd/__init__.py b/spython/instance/cmd/__init__.py index 2f074e3d..2580ea67 100644 --- a/spython/instance/cmd/__init__.py +++ b/spython/instance/cmd/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2021 Vanessa Sochat. +# Copyright (C) 2017-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/instance/cmd/logs.py b/spython/instance/cmd/logs.py index 67622774..1d8aaa87 100644 --- a/spython/instance/cmd/logs.py +++ b/spython/instance/cmd/logs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2019-2021 Vanessa Sochat. +# Copyright (C) 2019-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/instance/cmd/start.py b/spython/instance/cmd/start.py index 57278f9b..c68e8998 100644 --- a/spython/instance/cmd/start.py +++ b/spython/instance/cmd/start.py @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2021 Vanessa Sochat. +# Copyright (C) 2017-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/instance/cmd/stop.py b/spython/instance/cmd/stop.py index 5bc6091f..2e5aff59 100644 --- a/spython/instance/cmd/stop.py +++ b/spython/instance/cmd/stop.py @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2021 Vanessa Sochat. +# Copyright (C) 2017-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/logger/compatibility.py b/spython/logger/compatibility.py index 8c869dac..bde9692f 100644 --- a/spython/logger/compatibility.py +++ b/spython/logger/compatibility.py @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2021 Vanessa Sochat. +# Copyright (C) 2017-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/logger/message.py b/spython/logger/message.py index 0bcde31b..15637f85 100644 --- a/spython/logger/message.py +++ b/spython/logger/message.py @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2021 Vanessa Sochat. +# Copyright (C) 2017-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/logger/spinner.py b/spython/logger/spinner.py index 786a6a71..9d32753f 100644 --- a/spython/logger/spinner.py +++ b/spython/logger/spinner.py @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2021 Vanessa Sochat. +# Copyright (C) 2017-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/main/__init__.py b/spython/main/__init__.py index b33ba69d..107d7a61 100644 --- a/spython/main/__init__.py +++ b/spython/main/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2021 Vanessa Sochat. +# Copyright (C) 2017-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/main/apps.py b/spython/main/apps.py index a0fea23b..fc304f91 100644 --- a/spython/main/apps.py +++ b/spython/main/apps.py @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2021 Vanessa Sochat. +# Copyright (C) 2017-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/main/base/__init__.py b/spython/main/base/__init__.py index c06a09f2..7c7dc457 100644 --- a/spython/main/base/__init__.py +++ b/spython/main/base/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2021 Vanessa Sochat. +# Copyright (C) 2017-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/main/base/command.py b/spython/main/base/command.py index 215d3cfb..9ac1536e 100644 --- a/spython/main/base/command.py +++ b/spython/main/base/command.py @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2021 Vanessa Sochat. +# Copyright (C) 2017-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/main/base/flags.py b/spython/main/base/flags.py index ebd39957..72e5f06c 100644 --- a/spython/main/base/flags.py +++ b/spython/main/base/flags.py @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2021 Vanessa Sochat. +# Copyright (C) 2017-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/main/base/generate.py b/spython/main/base/generate.py index c5eeb799..b6bdfaef 100644 --- a/spython/main/base/generate.py +++ b/spython/main/base/generate.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (C) 2017-2021 Vanessa Sochat. +# Copyright (C) 2017-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/main/base/logger.py b/spython/main/base/logger.py index 3a4d7728..d47ce7dc 100644 --- a/spython/main/base/logger.py +++ b/spython/main/base/logger.py @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2021 Vanessa Sochat. +# Copyright (C) 2017-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/main/base/sutils.py b/spython/main/base/sutils.py index d4e7cf91..bf4d802f 100644 --- a/spython/main/base/sutils.py +++ b/spython/main/base/sutils.py @@ -1,7 +1,7 @@ # Singularity Image utils for interacting with the Image/Instance # classes from the client -# Copyright (C) 2017-2021 Vanessa Sochat. +# Copyright (C) 2017-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/main/build.py b/spython/main/build.py index b379fab3..3cbbe2d4 100644 --- a/spython/main/build.py +++ b/spython/main/build.py @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2021 Vanessa Sochat. +# Copyright (C) 2017-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/main/execute.py b/spython/main/execute.py index 55039b65..066abb43 100644 --- a/spython/main/execute.py +++ b/spython/main/execute.py @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2021 Vanessa Sochat. +# Copyright (C) 2017-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/main/export.py b/spython/main/export.py index 42003aa3..d3a22f41 100644 --- a/spython/main/export.py +++ b/spython/main/export.py @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2021 Vanessa Sochat. +# Copyright (C) 2017-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/main/help.py b/spython/main/help.py index 7100d083..306787a3 100644 --- a/spython/main/help.py +++ b/spython/main/help.py @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2021 Vanessa Sochat. +# Copyright (C) 2017-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/main/inspect.py b/spython/main/inspect.py index 64e6e89e..9fc83431 100644 --- a/spython/main/inspect.py +++ b/spython/main/inspect.py @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2021 Vanessa Sochat. +# Copyright (C) 2017-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/main/instances.py b/spython/main/instances.py index 8023e1ad..202f2ad2 100644 --- a/spython/main/instances.py +++ b/spython/main/instances.py @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2021 Vanessa Sochat. +# Copyright (C) 2017-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/main/parse/parsers/__init__.py b/spython/main/parse/parsers/__init__.py index 9021534d..df50b596 100644 --- a/spython/main/parse/parsers/__init__.py +++ b/spython/main/parse/parsers/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2021 Vanessa Sochat. +# Copyright (C) 2017-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/main/parse/parsers/base.py b/spython/main/parse/parsers/base.py index 89839d83..89e73ca4 100644 --- a/spython/main/parse/parsers/base.py +++ b/spython/main/parse/parsers/base.py @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2021 Vanessa Sochat. +# Copyright (C) 2017-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/main/parse/parsers/docker.py b/spython/main/parse/parsers/docker.py index e88730da..8b72a6cc 100644 --- a/spython/main/parse/parsers/docker.py +++ b/spython/main/parse/parsers/docker.py @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2021 Vanessa Sochat. +# Copyright (C) 2017-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/main/parse/parsers/singularity.py b/spython/main/parse/parsers/singularity.py index 3f709719..1c3a1a6f 100644 --- a/spython/main/parse/parsers/singularity.py +++ b/spython/main/parse/parsers/singularity.py @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2021 Vanessa Sochat. +# Copyright (C) 2017-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/main/parse/recipe.py b/spython/main/parse/recipe.py index 72793843..8c064181 100644 --- a/spython/main/parse/recipe.py +++ b/spython/main/parse/recipe.py @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2021 Vanessa Sochat. +# Copyright (C) 2017-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/main/parse/writers/__init__.py b/spython/main/parse/writers/__init__.py index 20b8054e..a59313c9 100644 --- a/spython/main/parse/writers/__init__.py +++ b/spython/main/parse/writers/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2021 Vanessa Sochat. +# Copyright (C) 2017-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/main/parse/writers/base.py b/spython/main/parse/writers/base.py index dc037a0c..dbd8def9 100644 --- a/spython/main/parse/writers/base.py +++ b/spython/main/parse/writers/base.py @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2021 Vanessa Sochat. +# Copyright (C) 2017-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/main/parse/writers/docker.py b/spython/main/parse/writers/docker.py index 730d1696..3ede137a 100644 --- a/spython/main/parse/writers/docker.py +++ b/spython/main/parse/writers/docker.py @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2021 Vanessa Sochat. +# Copyright (C) 2017-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/main/parse/writers/singularity.py b/spython/main/parse/writers/singularity.py index 75453632..8007ea09 100644 --- a/spython/main/parse/writers/singularity.py +++ b/spython/main/parse/writers/singularity.py @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2021 Vanessa Sochat. +# Copyright (C) 2017-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/main/pull.py b/spython/main/pull.py index 65860e5e..d4068af7 100644 --- a/spython/main/pull.py +++ b/spython/main/pull.py @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2021 Vanessa Sochat. +# Copyright (C) 2017-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed @@ -60,10 +60,8 @@ def pull( bot.exit("You must provide an image uri, or use client.load() first.") # Singularity Only supports shub, docker and library pull - if not re.search("^(shub|docker|library|https)://", image): - bot.exit( - "pull only valid for docker, https, shub and library. Use sregistry client." - ) + if not re.search("^(shub|docker|library|https|oras)://", image): + bot.exit("pull only valid for docker, oras, https, shub and library.") # If we still don't have a custom name, base off of image uri. if name is None: diff --git a/spython/oci/__init__.py b/spython/oci/__init__.py index 7ad713f0..6cf061ca 100644 --- a/spython/oci/__init__.py +++ b/spython/oci/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2021 Vanessa Sochat. +# Copyright (C) 2017-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/oci/cmd/__init__.py b/spython/oci/cmd/__init__.py index 3a49602e..c89a7679 100644 --- a/spython/oci/cmd/__init__.py +++ b/spython/oci/cmd/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2021 Vanessa Sochat. +# Copyright (C) 2017-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/oci/cmd/actions.py b/spython/oci/cmd/actions.py index ed5c8bdd..9f54bdbc 100644 --- a/spython/oci/cmd/actions.py +++ b/spython/oci/cmd/actions.py @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2021 Vanessa Sochat. +# Copyright (C) 2017-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/oci/cmd/mounts.py b/spython/oci/cmd/mounts.py index 204a05d6..f8f8deac 100644 --- a/spython/oci/cmd/mounts.py +++ b/spython/oci/cmd/mounts.py @@ -1,4 +1,4 @@ -# Copyright (C) 2019-2021 Vanessa Sochat. +# Copyright (C) 2019-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/oci/cmd/states.py b/spython/oci/cmd/states.py index b505999d..1b2a5210 100644 --- a/spython/oci/cmd/states.py +++ b/spython/oci/cmd/states.py @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2021 Vanessa Sochat. +# Copyright (C) 2017-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/tests/conftest.py b/spython/tests/conftest.py index 5c212751..b6a4969d 100644 --- a/spython/tests/conftest.py +++ b/spython/tests/conftest.py @@ -24,6 +24,14 @@ def test_data(installdir): # pylint: disable=redefined-outer-name } +@pytest.fixture(scope="session") +def oras_container(tmp_path_factory): + folder = tmp_path_factory.mktemp("oras-img") + return folder, Client.pull( + "oras://ghcr.io/singularityhub/github-ci:latest", pull_folder=str(folder) + ) + + @pytest.fixture(scope="session") def docker_container(tmp_path_factory): folder = tmp_path_factory.mktemp("docker-img") diff --git a/spython/tests/test_base.py b/spython/tests/test_base.py index 3af669b8..73eb2964 100644 --- a/spython/tests/test_base.py +++ b/spython/tests/test_base.py @@ -1,6 +1,6 @@ #!/usr/bin/python -# Copyright (C) 2017-2021 Vanessa Sochat. +# Copyright (C) 2017-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/tests/test_client.py b/spython/tests/test_client.py index 7b2aba5f..a235472b 100644 --- a/spython/tests/test_client.py +++ b/spython/tests/test_client.py @@ -1,6 +1,6 @@ #!/usr/bin/python -# Copyright (C) 2017-2021 Vanessa Sochat. +# Copyright (C) 2017-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed @@ -40,6 +40,14 @@ def test_docker_pull(docker_container): assert os.path.exists(container) +def test_oras_pull(oras_container): + tmp_path, container = oras_container + print(container) + ext = "sif" if Client.version_info().major >= 3 else "simg" + assert container == str(tmp_path / ("github-ci_latest." + ext)) + assert os.path.exists(container) + + def test_execute(docker_container): result = Client.execute(docker_container[1], "ls /") print(result) diff --git a/spython/tests/test_conversion.py b/spython/tests/test_conversion.py index 93e52f86..e6fe7b2b 100644 --- a/spython/tests/test_conversion.py +++ b/spython/tests/test_conversion.py @@ -1,6 +1,6 @@ #!/usr/bin/python -# Copyright (C) 2017-2021 Vanessa Sochat. +# Copyright (C) 2017-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/tests/test_instances.py b/spython/tests/test_instances.py index 558ade9b..74961839 100644 --- a/spython/tests/test_instances.py +++ b/spython/tests/test_instances.py @@ -1,6 +1,6 @@ #!/usr/bin/python -# Copyright (C) 2017-2021 Vanessa Sochat. +# Copyright (C) 2017-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/tests/test_oci.py b/spython/tests/test_oci.py index f5d2e2a0..aa48da1b 100644 --- a/spython/tests/test_oci.py +++ b/spython/tests/test_oci.py @@ -1,6 +1,6 @@ #!/usr/bin/python -# Copyright (C) 2020-2021 Vanessa Sochat. +# Copyright (C) 2020-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/tests/test_parsers.py b/spython/tests/test_parsers.py index ff41d626..9cfc475a 100644 --- a/spython/tests/test_parsers.py +++ b/spython/tests/test_parsers.py @@ -1,6 +1,6 @@ #!/usr/bin/python -# Copyright (C) 2017-2021 Vanessa Sochat. +# Copyright (C) 2017-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/tests/test_recipe.py b/spython/tests/test_recipe.py index ce4d3438..bf76a829 100644 --- a/spython/tests/test_recipe.py +++ b/spython/tests/test_recipe.py @@ -1,6 +1,6 @@ #!/usr/bin/python -# Copyright (C) 2019-2021 Vanessa Sochat. +# Copyright (C) 2019-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/tests/test_utils.py b/spython/tests/test_utils.py index 3553bc25..5076f9fe 100644 --- a/spython/tests/test_utils.py +++ b/spython/tests/test_utils.py @@ -1,6 +1,6 @@ #!/usr/bin/python -# Copyright (C) 2017-2021 Vanessa Sochat. +# Copyright (C) 2017-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/tests/test_writers.py b/spython/tests/test_writers.py index b6fc7c1d..b7bd30a3 100644 --- a/spython/tests/test_writers.py +++ b/spython/tests/test_writers.py @@ -1,6 +1,6 @@ #!/usr/bin/python -# Copyright (C) 2019-2021 Vanessa Sochat. +# Copyright (C) 2019-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/utils/fileio.py b/spython/utils/fileio.py index 993145e7..cbd27b17 100644 --- a/spython/utils/fileio.py +++ b/spython/utils/fileio.py @@ -1,6 +1,6 @@ """ -# Copyright (C) 2017-2021 Vanessa Sochat. +# Copyright (C) 2017-2022 Vanessa Sochat. This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/utils/misc.py b/spython/utils/misc.py index ce3c7d37..712c13d7 100644 --- a/spython/utils/misc.py +++ b/spython/utils/misc.py @@ -1,4 +1,4 @@ -# Copyright (C) 2019-2021 Vanessa Sochat. +# Copyright (C) 2019-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/utils/terminal.py b/spython/utils/terminal.py index a06633d1..5f8cd0ac 100644 --- a/spython/utils/terminal.py +++ b/spython/utils/terminal.py @@ -1,6 +1,6 @@ """ -# Copyright (C) 2017-2021 Vanessa Sochat. +# Copyright (C) 2017-2022 Vanessa Sochat. This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed diff --git a/spython/version.py b/spython/version.py index c0a85515..b5966155 100644 --- a/spython/version.py +++ b/spython/version.py @@ -1,13 +1,13 @@ -# Copyright (C) 2017-2021 Vanessa Sochat. +# Copyright (C) 2017-2022 Vanessa Sochat. # This Source Code Form is subject to the terms of the # Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed # with this file, You can obtain one at http://mozilla.org/MPL/2.0/. -__version__ = "0.1.17" +__version__ = "0.1.18" AUTHOR = "Vanessa Sochat" -AUTHOR_EMAIL = "vsochat@stanford.edu" +AUTHOR_EMAIL = "vsoch@users.noreply.github.com" NAME = "spython" PACKAGE_URL = "https://github.com/singularityhub/singularity-cli" KEYWORDS = "singularity python client (spython)" From 6726936294e919673bba5248c6516139e5b1e046 Mon Sep 17 00:00:00 2001 From: vsoch Date: Wed, 19 Jan 2022 19:25:46 -0700 Subject: [PATCH 2/6] wrong name Signed-off-by: vsoch --- spython/tests/test_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spython/tests/test_client.py b/spython/tests/test_client.py index a235472b..34dda3ae 100644 --- a/spython/tests/test_client.py +++ b/spython/tests/test_client.py @@ -44,7 +44,7 @@ def test_oras_pull(oras_container): tmp_path, container = oras_container print(container) ext = "sif" if Client.version_info().major >= 3 else "simg" - assert container == str(tmp_path / ("github-ci_latest." + ext)) + assert container == str(tmp_path / ("github-ci:latest." + ext)) assert os.path.exists(container) From bd53e5ca6fd875f33135a35bbf761f43f1144c1a Mon Sep 17 00:00:00 2001 From: vsoch Date: Wed, 19 Jan 2022 19:29:21 -0700 Subject: [PATCH 3/6] works locally? Signed-off-by: vsoch --- spython/tests/test_client.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/spython/tests/test_client.py b/spython/tests/test_client.py index 34dda3ae..67ff5dba 100644 --- a/spython/tests/test_client.py +++ b/spython/tests/test_client.py @@ -35,16 +35,14 @@ def test_export(): def test_docker_pull(docker_container): tmp_path, container = docker_container print(container) - ext = "sif" if Client.version_info().major >= 3 else "simg" - assert container == str(tmp_path / ("busybox:1.30.1." + ext)) + assert container == str(tmp_path / ("busybox:1.30.1.sif")) assert os.path.exists(container) def test_oras_pull(oras_container): tmp_path, container = oras_container print(container) - ext = "sif" if Client.version_info().major >= 3 else "simg" - assert container == str(tmp_path / ("github-ci:latest." + ext)) + assert container == str(tmp_path / ("github-ci:latest.sif")) assert os.path.exists(container) From fcd45a68062a0add5580cb0d3980fe6ec5e4cf79 Mon Sep 17 00:00:00 2001 From: vsoch Date: Wed, 19 Jan 2022 19:31:24 -0700 Subject: [PATCH 4/6] bump singularity install Signed-off-by: vsoch --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b63bb40d..82331730 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -38,7 +38,7 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: eWaterCycle/setup-singularity@1631b12cf3878381179be0eab9624219bc12979e # v6 release + - uses: eWaterCycle/setup-singularity@bebf1d6f54f9d2d159ac5c15385912dc39b23711 # v7 release - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v2 From 2b9c7a6d7da3628cef116e6d9d943448c916a136 Mon Sep 17 00:00:00 2001 From: vsoch Date: Wed, 19 Jan 2022 19:33:23 -0700 Subject: [PATCH 5/6] use latest Signed-off-by: vsoch --- .github/workflows/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 82331730..985baf83 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -39,7 +39,8 @@ jobs: steps: - uses: actions/checkout@v2 - uses: eWaterCycle/setup-singularity@bebf1d6f54f9d2d159ac5c15385912dc39b23711 # v7 release - + with: + singularity-version: 3.9.4 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v2 with: From 442477e238910f04a1e135a3d8d078bb3d996a88 Mon Sep 17 00:00:00 2001 From: vsoch Date: Wed, 19 Jan 2022 19:35:35 -0700 Subject: [PATCH 6/6] ugggg using apptainer gross Signed-off-by: vsoch --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 985baf83..35fee761 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -40,7 +40,7 @@ jobs: - uses: actions/checkout@v2 - uses: eWaterCycle/setup-singularity@bebf1d6f54f9d2d159ac5c15385912dc39b23711 # v7 release with: - singularity-version: 3.9.4 + singularity-version: 3.8.4 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v2 with: