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

do schemas need to be updated #20

Closed
nsheff opened this issue Sep 4, 2023 · 14 comments
Closed

do schemas need to be updated #20

nsheff opened this issue Sep 4, 2023 · 14 comments
Assignees
Labels
likely-solved priority-high question Further information is requested

Comments

@nsheff
Copy link
Member

nsheff commented Sep 4, 2023

There are several schemas here:

https://github.com/databio/bbconf/tree/dev/bbconf/schemas

I believe these are pipestat schemas. But when pipestat was updated, the schema definition changed.

bbconf has I believe been updated to use the new pipestat.

Are these schemas up-to-date?

@nsheff nsheff added the question Further information is requested label Sep 4, 2023
@khoroshevskyi
Copy link
Member

This pipestat sachems were updated by @donaldcampbelljr , and I believe they are working and up-to-date

@donaldcampbelljr
Copy link
Member

I believe I only updated the pipeline names but did not touch the actual schema fields as they were working during testing with the new pipestat. Pipestat should raise a schema error if the required keys are not present for complex types.

@nsheff
Copy link
Member Author

nsheff commented Sep 5, 2023

I thought the pipestat schema format changed like this:

pepkit/pipestat#20

@nsheff
Copy link
Member Author

nsheff commented Sep 5, 2023

I see now. It was not actually updated to be json-schema compatible.

I think we need to change the pipestat schema format to follow json-schema...

The reason I think this is that I think we may be able to use jsonschema functionality for pydantic model creation that will simplify things with bedhost...

See:

@nsheff
Copy link
Member Author

nsheff commented Oct 27, 2023

@donaldcampbelljr pipestat schemas are now json schemas, right?

@donaldcampbelljr
Copy link
Member

Pipestat can accept either the old way or a JSON schema, yes.

However, after our discussion ~ last week, I realized we are still using types such as file and image within the JSON pipestat schema (and later converting them to be objects).

Therefore the schema is still not actually 100% JSON schema: https://json-schema.org/understanding-json-schema/reference/type

@nsheff
Copy link
Member Author

nsheff commented Oct 27, 2023

I thought we decided on doing:

type: object
object_type: file

that makes it a valid json-schema, but allows our type-specific treatment.

@donaldcampbelljr
Copy link
Member

Close, but right now its:

type: file
object_type: file

Pipestat still uses the type field and if its an image or a file, recursively replaces that with title and path and changes the type to object.

@donaldcampbelljr
Copy link
Member

Current bbconf example from dev:

pipeline_name: bedfile
samples:
  name:
    type: string
    description: BED file name
  genome:
    type: object
    description: genome assembly of the BED files
  bedfile:
    type: file
    pipestat_type: file
    label: bed
    description: BED file
  bigbedfile:
    type: file
    pipestat_type: file
    label: bigBed
    description: bigBed file

@nsheff
Copy link
Member Author

nsheff commented Oct 27, 2023

that's the old format, not a json schema at all

@donaldcampbelljr
Copy link
Member

Yes, pipestat can accept either format currently. However, I'm just showing how the pipestat_type was implemented along with the original type.

@nsheff
Copy link
Member Author

nsheff commented Oct 27, 2023

We need to update those bbconf schemas to use the new format, and deprecate the old.

Issue raised: #32

@khoroshevskyi
Copy link
Member

Fixed in 0.4.0 release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
likely-solved priority-high question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants