pepkit / geofetch

Builds a PEP from SRA or GEO accessions
https://pep.databio.org/geofetch/
BSD 2-Clause "Simplified" License
45 stars 5 forks source link

subsample null #91

Closed nsheff closed 1 year ago

nsheff commented 1 year ago

Geofetch is populating every PEP config file with:

subsample_table: null

But this is a problem, because then eido won't let you validate:

Traceback (most recent call last):
  File "/home/ns5bc/.local/bin/eido", line 8, in <module>
    sys.exit(main())
  File "/home/ns5bc/.local/lib/python3.8/site-packages/eido/cli.py", line 62, in main
    validate_project(p, args.schema, args.exclude_case)
  File "/home/ns5bc/.local/lib/python3.8/site-packages/eido/eido.py", line 114, in validate_project
    _validate_object(project_dict, _preprocess_schema(schema_dict), exclude_case)
  File "/home/ns5bc/.local/lib/python3.8/site-packages/eido/eido.py", line 95, in _validate_object
    jsonschema.validate(object, schema)
  File "/apps/software/standard/core/anaconda/2020.11-py3.8/lib/python3.8/site-packages/jsonschema/validators.py", line 934, in validate
    raise error
jsonschema.exceptions.ValidationError: None is not of type 'string'

Failed validating 'type' in schema['properties']['_config']['properties']['subsample_table']:
    {'description': 'Path to the subsample annotation table with one row '
                    'per subsample and sample_name attribute matching an '
                    'entry in the sample table',
     'type': 'string'}

On instance['_config']['subsample_table']:
    None

So, I can't run looper on anything downloaded from geofetch, and the error message is hard to understand. This is a problem with the combination of geofetch and eido.

  1. Should geofetch put subsample_table: null ?
  2. Should eido require submsample_table to not be null?
khoroshevskyi commented 1 year ago

I think, it's problem in geofetch, not eido, I will fix it

khoroshevskyi commented 1 year ago

This issue is solved and will be available in release v0.11.0