Open jennydaman opened 2 years ago
Hello @jennydaman, My name is Nile Okomo(GMT + 3), an outreachy applicant interested in being assigned this issue. Could I possibly work on it?
@beingnile you are welcome to take a stab. This would be a huge change. I'll lay out my plan of how this could be implemented, and it will be up to you whether you're up to the task.
This issue will be difficult to take up as it requires relatively in-depth knowledge of the ChRIS plugin specification. ChRIS plugins identify themselves to the ChRIS Store using the selfpath
, selfexec
, and execshell
keys. This spec will be referred to as the "broken spec."
The API of pman
was changed to accept a list[str] as entrypoint
which represents the entirety of the information within the broken spec. This spec will be referred to as the "entrypoint spec." The entrypoint spec is simpler and better than the broken spec. However, changing CUBE to use the entrypoint spec would be very challenging.
Currently, the plugin spec requires plugins to define all of
selfpath
,selfexec
, andexecshell
. This "spec" is clearly Python-biased, and even so it does not adhere to best practices:selfpath
is not necessary:selfexec
should be found in thePATH
environment variable (OCI spec). Moreover,selfpath
is usually managed by something such aspip
,conda
, ... so hard-coding it is bad practice.execshell
does not make sense for binary applications. For interpreted languages, this should be configured by a shebang (#!
). Again, this is managed by the language's package installer, such aspip
.I propose that the spec for ChRIS plugins simply be to give one string called
command
which represents the name of the executable. It should represent a file inPATH
which has the executable bit set for all users. It can be either a plaintext file with a shebang, or a compiled binary application.Related to https://github.com/FNNDSC/pman/issues/203
For backwards compatibility, perhaps
command
should instead be a list of strings instead where the first element is the name of an executable. Legacy plugin descriptions which specifyselfpath
,selfexec
, andexecshell
can be accepted. These options are simply concatenated as["{execshell}", "{selfpath}{selfexec}"]