pepkit / eido

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

Change config key to project #71

Closed donaldcampbelljr closed 2 months ago

donaldcampbelljr commented 3 months ago

In an effort to unify input schemas for eido with output schemas for pipestat, we would like to make the following changes to the input schemas:

  1. change config key to project key.
  2. add type:object to the beginning of the schema

Example section of the minimal pep example with the modified changes:

description: "Schema for a minimal PEP"
version: "2.1.0"
type: object
properties:
  project:
    type: object
    properties:
      name: 
        type: string
        pattern: "^\\S*$"
        description: "Project name with no whitespace"
      pep_version:
        description: "Version of the PEP Schema this PEP follows"
        type: string
      sample_table:
        type: string
        description: "Path to the sample annotation table"
donaldcampbelljr commented 3 months ago

After some initial testing it appears we can simply make these changes without negatively impacting eido validation. It appears that schema <-> peppy object validation occurs such that the project is converted to a dict and the config key is removed and its items are placed directly under project. The pep from which it is made has no top level config key either (it IS the config!).

As a reality check, I made a modified version of the minimal pep with the proposed changes in pephub and it is validating just fine.

donaldcampbelljr commented 2 months ago

This was solved with newest releases of peppy and eido