diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b63bb40..35fee76 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -38,8 +38,9 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: eWaterCycle/setup-singularity@1631b12cf3878381179be0eab9624219bc12979e # v6 release - + - uses: eWaterCycle/setup-singularity@bebf1d6f54f9d2d159ac5c15385912dc39b23711 # v7 release + with: + singularity-version: 3.8.4 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v2 with: diff --git a/CHANGELOG.md b/CHANGELOG.md index ee4168e..b0fc333 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 621fb58..9a8bcdd 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 e5e50ec..343a5fa 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 c2768fc..189506b 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 48b19c8..252165f 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 2b73581..97c8d60 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 9a7456f..36cc4ed 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 7218159..dbdadf4 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 621cb67..4be6831 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 546da66..51342b4 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 ab45391..88402b7 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 d055ce1..08f0ae8 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 46216bf..bfb32a3 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 2f074e3..2580ea6 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 6762277..1d8aaa8 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 57278f9..c68e899 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 5bc6091..2e5aff5 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 8c869da..bde9692 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 0bcde31..15637f8 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 786a6a7..9d32753 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 b33ba69..107d7a6 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 a0fea23..fc304f9 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 c06a09f..7c7dc45 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 215d3cf..9ac1536 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 ebd3995..72e5f06 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 c5eeb79..b6bdfae 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 3a4d772..d47ce7d 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 d4e7cf9..bf4d802 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 b379fab..3cbbe2d 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 55039b6..066abb4 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 42003aa..d3a22f4 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 7100d08..306787a 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 64e6e89..9fc8343 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 8023e1a..202f2ad 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 9021534..df50b59 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 89839d8..89e73ca 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 e88730d..8b72a6c 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 3f70971..1c3a1a6 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 7279384..8c06418 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 20b8054..a59313c 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 dc037a0..dbd8def 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 730d169..3ede137 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 7545363..8007ea0 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 65860e5..d4068af 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 7ad713f..6cf061c 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 3a49602..c89a767 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 ed5c8bd..9f54bdb 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 204a05d..f8f8dea 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 b505999..1b2a521 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 5c21275..b6a4969 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 3af669b..73eb296 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 7b2aba5..67ff5db 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 @@ -35,8 +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) + assert container == str(tmp_path / ("github-ci:latest.sif")) assert os.path.exists(container) diff --git a/spython/tests/test_conversion.py b/spython/tests/test_conversion.py index 93e52f8..e6fe7b2 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 558ade9..7496183 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 f5d2e2a..aa48da1 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 ff41d62..9cfc475 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 ce4d343..bf76a82 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 3553bc2..5076f9f 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 b6fc7c1..b7bd30a 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 993145e..cbd27b1 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 ce3c7d3..712c13d 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 a06633d..5f8cd0a 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 c0a8551..b596615 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)"