biocompute-objects / BCO_Documentation

Repository for documentation to support the IEEE 2791-2020 standard. Please see our home page for communications/publications:
http://biocomputeobject.org/
BSD 3-Clause "New" or "Revised" License
16 stars 12 forks source link

Execution Domain #50

Closed HadleyKing closed 5 years ago

HadleyKing commented 5 years ago

Issues from execution-domain

In general, this domain needs more refinement

corburn commented 5 years ago

@HadleyKing in regards to 98c53dc resolving extra-validation-items-execution-domain.md:

  1. env_parameters should a simple dictionary of a list of dictionaries Should avoid saying "Environmental parameters" --> should be environment variables

It looks like the idea was to change this:

"env_parameters": [{
    "key": "HOSTTYPE", 
    "value" : "x86_64-linux"
}]

to this:

"environment_variables": {
    "HOSTTYPE": "x86_64-linux",
    "EDITOR": "vim",
    "FOO_BAR": "baz_quox"
}
HadleyKing commented 5 years ago

@corburn ok. How would that look in the schema? I was unsure of how to implement that.

HadleyKing commented 5 years ago

@corburn

Issues from execution-domain

  • [x] Maybe script_access_type and script properities can be tied together (#26)

I was also trying to implement some sort of enum or oneOf for the script field to accommodate the possibility of two different types (e.g. uri or text) and referencing them as #definition, but could not get it to work. I think that would allow us to combine these fields into one. It would also solve the bullet below too... I think.

  • [x] script.uri URI values require regex
corburn commented 5 years ago

@HadleyKing

environment_variables schema:

    "environment_variables": {
      "type": "object",
      "description": "Environmental parameters that are useful to configure the execution environment on the target platform.",
      "additionalProperties": false,
      "patternProperties": {
        "^[a-zA-Z_]+[a-zA-Z0-9_]*$": {
          "type": "string"
        }
      }
    }

The regex is based on the following:

http://pubs.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap08.html Environment variable names used by the utilities in the Shell and Utilities volume of IEEE Std 1003.1-2001 consist solely of uppercase letters, digits, and the '_' (underscore) from the characters defined in Portable Character Set and do not begin with a digit. Other characters may be permitted by an implementation; applications shall tolerate the presence of such names. Uppercase and lowercase letters shall retain their unique identities and shall not be folded together. The name space of environment variable names containing lowercase letters is reserved for applications. Applications can define any environment variables with names from this name space without modifying the behavior of the standard utilities.

Note: Other applications may have difficulty dealing with environment variable names that start with a digit. For this reason, use of such names is not recommended anywhere.

script and script_access_type

I would drop script_access_type and define script simply as a URI:

https://tools.ietf.org/html/rfc8089 file://path/to/rfc8089.txt

"script": {
    "$ref": "#/definitions/uri"
}