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

Update environment_variables schema #59

Closed HadleyKing closed 5 years ago

HadleyKing 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"
}