pepkit / eido

Validator for PEP objects
http://eido.databio.org
BSD 2-Clause "Simplified" License
5 stars 5 forks source link

'_samples' is a required property: (1 samples) project #78

Closed rschauner closed 1 month ago

rschauner commented 1 month ago

I'm trying to create a PEP schema for a Snakemake workflow I'm writing. I've parsed my config file and sample table to the smallest form I can and still get the same error: '_samples' is a required property: (1 samples) project.

config.yml

pep_version: 2.1.0
sample_table: "test_table.csv"

test_table.csv

sample_name, exp
P081-BAL-NonInf-Multi, A
P081-BAL-InfAd-Multi, A
P081-BAL-InfAdPep-Multi, B

schema.yml

imports:
  - http://schema.databio.org/pep/2.1.0.yaml
properties:
  config:
    properties:
    required:
      - pep_version
      - sample_table
  samples:
    type: array
    items:
      type: object
      properties:
        exp:
          type: string
          description: "Experimental Condition"
      required:
        - sample_name
        - exp

When I run eido validate pep/config.yml -s http://schema.databio.org/pep/2.1.0.yaml I get the error. However, running eido with either the -c or -n flags validates the PEP.

Removing the last two lines (see below) of the PEP schema removes this error. Changing the "sample_name" column to "sample_name2" results in an error: sample_table is missing 'sample_name' column; you must specify sample_tables in sample_name or derive them. Using a sample CSV with a schema that requires a metadata column still validates with that column missing (using eido validate pep/config.yml -s schema.yml

Lines removed from http://schema.databio.org/pep/2.1.0.yaml

[...]
required:
  - samples
nsheff commented 1 month ago

Can you try upgrading the eido package and see if that changes it?

rschauner commented 1 month ago

I'm now on eido 0.2.2 (peppy 0.40.7) and still have the same problem

nsheff commented 1 month ago

It would require eido 0.2.4, which is available on pypi: https://pypi.org/project/eido/#history

https://github.com/pepkit/eido

rschauner commented 1 month ago

It seems the version on conda-forge is too out of date.

nsheff commented 1 month ago

Thanks for pointing that out. I'm going to re-open this until we solve the conda-forge issue.

khoroshevskyi commented 1 month ago

This issue is fixed, and new version of eido is added to conda