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

Description domain #49

Closed HadleyKing closed 5 years ago

HadleyKing commented 5 years ago

Issues from description_domain.md

corburn commented 5 years ago

pipeline_steps.step_number

The base_type and schema define step_number as an integer.

https://github.com/biocompute-objects/BCO_Specification/blob/05d02cbf4564805fe680cefffbaf1014a5f10d0d/base_type_BioCompute.json#L147-L149

https://github.com/biocompute-objects/BCO_Specification/blob/05d02cbf4564805fe680cefffbaf1014a5f10d0d/schemas/description_domain.json#L95-L99

pipeline_steps.prerequisite.uri.{access,address}

Does required/regex refer to prerequisite or the access and address properties?

The base_type and schema define prerequisite as optional (i.e. it is absent in the schemas required array).

https://github.com/biocompute-objects/BCO_Specification/blob/05d02cbf4564805fe680cefffbaf1014a5f10d0d/base_type_BioCompute.json#L153-L164

https://github.com/biocompute-objects/BCO_Specification/blob/05d02cbf4564805fe680cefffbaf1014a5f10d0d/schemas/description_domain.json#L87-L94

The base_type and schema reference a uri definition:

https://github.com/biocompute-objects/BCO_Specification/blob/05d02cbf4564805fe680cefffbaf1014a5f10d0d/schemas/description_domain.json#L121-L145

https://github.com/biocompute-objects/BCO_Specification/blob/05d02cbf4564805fe680cefffbaf1014a5f10d0d/schemas/biocomputeobject.json#L26-L47

The uri definition includes regex validation and requires the address field:

https://github.com/biocompute-objects/BCO_Specification/blob/05d02cbf4564805fe680cefffbaf1014a5f10d0d/primitives.json#L41-L56

https://github.com/biocompute-objects/BCO_Specification/blob/05d02cbf4564805fe680cefffbaf1014a5f10d0d/schemas/biocomputeobject.json#L26-L47

pipeline_steps.{input_list,output_list}

The base_type and schema reference a uri definition.

HadleyKing commented 5 years ago
  • [ ] pipeline_steps.prerequisite.uri.access, pipeline_steps.prerequisite.uri.address regex required
  • [ ] pipeline_steps.input_list,pipeline_steps.output_list regex for url values of these arrays

As JSON Schema specifically defines uri and other resource identifier types, this should be renamed.

Suggestions?

corburn commented 5 years ago

@HadleyKing I am not aware of any potential for a name conflict between a BCO file and the JSON Schema that describes its constraints.

In regards to the BCO, I can imagine replacing address with uri to be clear it is not a geographic location. The following example is for the sake of discussion; it knowingly deviates from the schema:

  "prerequisites": [{
    "filename": "<STRING>",
    "uri": "<URI>",
    "sha256": "<SHA256>",
    "date_accessed": "<ISO8601>"
  }]
HadleyKing commented 5 years ago

Would it make sense to replace this definition: https://github.com/biocompute-objects/BCO_Specification/blob/a7633cc849c8a56335ee23a37c940a9bd2581367/schemas/biocomputeobject.json#L33-L55

with something like the following?

        "uri": {
            "type": "object",
            "additionalProperties": false,
            "required": [
                "uri"
            ],
            "properties": {
                "filename":{
                    "type": "string"
                  },
                "uri": {
                    "type": "string",
                    "format": "uri"
                },
                "access_time": {
                    "type": "string",
                    "format": "date-time"
                },
                "sha1_chksum": {
                    "type": "string",
                    "description": "Sha256 hash function that produces a message digest",
                    "pattern": "[A-Za-z0-9]+"
                }
            }
        }
corburn commented 5 years ago

@HadleyKing the definition looks valid. Sha256 will need to be removed from the description.

HadleyKing commented 5 years ago

https://github.com/biocompute-objects/BCO_Specification/commit/bf4fb1603fa156542c0e8b58c60260c3086d21db Fixed this issue