Skip to content

Commit 1daab24

Browse files
authored
removing checks for versions across all files and 2.x image commands … (#191)
* removing checks for versions across all files and 2.x image commands import, export the reason being so we can easily support apptainer and singularityce installs, which both provide an executable singularity but with different versions! Also, people should not be using the 2.x command groups at this point because there are too many security issues. We can support this in some small way by not making it easy/possible to do here, unless they want to install an older version. This will fix #190 Signed-off-by: vsoch <[email protected]>
1 parent d0099dd commit 1daab24

File tree

25 files changed

+56
-325
lines changed

25 files changed

+56
-325
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
run: |
2828
export PATH="/usr/share/miniconda/bin:$PATH"
2929
source activate black
30-
pyflakes spython/oci spython/image spython/instance spython/main
30+
pyflakes spython/oci spython/image.py spython/instance spython/main
3131
3232
pytest:
3333
runs-on: ubuntu-latest

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ The client here will eventually be released as "spython" (and eventually to
1717
singularity on pypi), and the versions here will coincide with these releases.
1818

1919
## [master](https://github.com/singularityhub/singularity-cli/tree/master)
20+
- version checks removed to support Singularity 3.x and above (0.2.0)
2021
- adding support for SIF (oras pull) (0.1.18)
2122
- updating CI/tests and fixing deprecations (warnings) (0.1.17)
2223
- fixing bug with defining comments earlier (0.1.16)

spython/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This will briefly outline the content of the folders here.
44
## Main Functions
55

66
- [main](main) holds the primary client functions to interact with Singularity (e.g., exec, run, pull), and the subfolders within represent command groups (e.g., instance, image) along with the base of the client ([base](main/base)). This folder is where **commands** go!
7-
- [image](image) is a class that represents and holds an image object, in the case that the user wants to initialize a client with an image. This holds the ImageClass, which is only needed to instantiate an image.
7+
- [image](image.py) is a class that represents and holds an image object, in the case that the user wants to initialize a client with an image. This holds the ImageClass, which is only needed to instantiate an image.
88
- [instance](instance) is a class that represents and holds an instance object. The user can instantiate the class, and then run it's sub functions to interact with it. The higher level "list" command is provided on the level of the client.
99
- [cli](cli): is the actual entry point that connects the user to the python API client from the command line. The user inputs are parsed, and then passed into functions from main.
1010

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from spython.utils import split_uri
1111

1212

13-
class ImageBase(object):
13+
class ImageBase:
1414
def __str__(self):
1515
protocol = getattr(self, "protocol", None)
1616
if protocol:

spython/image/cmd/__init__.py

Lines changed: 0 additions & 46 deletions
This file was deleted.

spython/image/cmd/create.py

Lines changed: 0 additions & 35 deletions
This file was deleted.

spython/image/cmd/export.py

Lines changed: 0 additions & 34 deletions
This file was deleted.

spython/image/cmd/importcmd.py

Lines changed: 0 additions & 25 deletions
This file was deleted.

spython/image/cmd/utils.py

Lines changed: 0 additions & 31 deletions
This file was deleted.

spython/instance/cmd/start.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,7 @@ def start(
5656

5757
image = self._image
5858

59-
# Derive subgroup command based on singularity version
60-
subgroup = "instance.start"
61-
if "version 3" in self.version():
62-
subgroup = ["instance", "start"]
63-
64-
cmd = self._init_command(subgroup, singularity_options)
59+
cmd = self._init_command(["instance", "start"], singularity_options)
6560

6661
# Set options and args
6762
args = args or self.args

0 commit comments

Comments
 (0)