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

in validator, should '*' validate for anything? #340

Closed
nsheff opened this issue Mar 9, 2020 · 2 comments
Closed

in validator, should '*' validate for anything? #340

nsheff opened this issue Mar 9, 2020 · 2 comments
Labels

Comments

@nsheff
Copy link
Contributor

nsheff commented Mar 9, 2020

I have a sample file where protocol is '*':

peppy validate paqc.yaml -s http://schema.databio.org/pipelines/pepatac.yaml
Traceback (most recent call last):
  File "/home/ns5bc/.local/bin/peppy", line 10, in <module>
    sys.exit(main())
  File "/home/ns5bc/.local/lib/python3.6/site-packages/peppy/cli.py", line 85, in main
    p.validate_project(args.schema, args.exclude_case)
  File "/home/ns5bc/.local/lib/python3.6/site-packages/peppy/project.py", line 760, in validate_project
    exclude_case)
  File "/home/ns5bc/.local/lib/python3.6/site-packages/peppy/project.py", line 828, in _validate_object
    jsonschema.validate(object, schema)
  File "/home/ns5bc/.local/lib/python3.6/site-packages/jsonschema/validators.py", line 934, in validate
    raise error
jsonschema.exceptions.ValidationError: '*' is not one of ['ATAC', 'ATAC-SEQ', 'ATAC-seq', 'DNase', 'DNase-seq']

Failed validating 'enum' in schema['properties']['_samples']['items']['properties']['protocol']:
    {'description': 'Must be an ATAC-seq or DNAse-seq sample',
     'enum': ['ATAC', 'ATAC-SEQ', 'ATAC-seq', 'DNase', 'DNase-seq'],
     'type': 'string'}

On instance['_samples'][0]['protocol']:
    '*'
@nsheff nsheff added the question label Mar 9, 2020
@stolarczyk
Copy link
Member

do you suggest to tweak the validator in peppy? Can this be solved by adding * to enum in the schema?

@nsheff
Copy link
Contributor Author

nsheff commented Mar 9, 2020

Actually my thinking was inverted. This doesn't make sense. Nevermind.

@nsheff nsheff closed this as completed Mar 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants