Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Description domain #49

Closed
6 tasks done
HadleyKing opened this issue Nov 27, 2018 · 6 comments
Closed
6 tasks done

Description domain #49

HadleyKing opened this issue Nov 27, 2018 · 6 comments
Labels
help wanted Extra attention is needed

Comments

@HadleyKing
Copy link
Contributor

HadleyKing commented Nov 27, 2018

Issues from description_domain.md

  • xref.access_time
    regex for datetime but this mayebe already validated in first level
  • pipeline_steps.tools
    schema says it is required, spec text should say the same thing
  • pipeline_steps.tool
    should is redundant property (pipeline_steps should be flat list of
    step objects)
  • pipeline_steps.step_number
    is an integer in the schema but the spec text has it as a string
  • 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
@corburn
Copy link
Contributor

corburn commented Nov 27, 2018

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.

@mr-c mr-c mentioned this issue Nov 28, 2018
HadleyKing added a commit that referenced this issue Nov 30, 2018
`platform` added to `description_domain`
apply to #49 and #28
HadleyKing added a commit that referenced this issue Nov 30, 2018
HadleyKing added a commit that referenced this issue Nov 30, 2018
pipeline_steps.step_number
is an integer in the schema but the spec text has it as a string
apply #49
@HadleyKing
Copy link
Contributor Author

  • 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?

@HadleyKing HadleyKing added the help wanted Extra attention is needed label Dec 4, 2018
@corburn
Copy link
Contributor

corburn commented Dec 4, 2018

@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
Copy link
Contributor Author

HadleyKing commented Dec 5, 2018

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
Copy link
Contributor

corburn commented Dec 5, 2018

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

HadleyKing added a commit that referenced this issue Dec 6, 2018
apply #49 #48 #50 #51
Define a BCO specific `uri` object
@HadleyKing
Copy link
Contributor Author

bf4fb16 Fixed this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants