pepkit / pephub

A web API and database for biological sample metadata
https://pephub.databio.org
BSD 2-Clause "Simplified" License
13 stars 2 forks source link

validator is failing #285

Closed nsheff closed 4 months ago

nsheff commented 5 months ago

not sure if it's due to updates in schema.databio.org but anyway:

image

khoroshevskyi commented 5 months ago

Additionally, if project is invalid, validator is not showing where are the problems in the PEP

nleroy917 commented 5 months ago

not sure if it's due to updates in schema.databio.org but anyway:

I think that it is, its a server-side error indicating that

{ 
    "error": "Error fetching schema: 404 Client Error: Not Found for url: https://schema.databio.org/schemas/pipelines/bedboss.yaml" 
}

If you remove /schemas/ it wants to download it. But why are the schemas on the UI all prefixed with schemas/ ? Is that correct? I think we need to remove that

nleroy917 commented 5 months ago

I see. Its because https://schema.databio.org/list.json leads to a list where they are all prefixed wth schemas - I think I'll just strip that out?

nsheff commented 5 months ago

Did they used to be at /schemas and then I moved them and didn't update the API? maybe oops...

nleroy917 commented 5 months ago

Not too sure... I got it working though. I just am doing this on the UI for that little dropdown selector:

  const options = Object.keys(schemas || {}).map((schema) => ({
    label: schema.replace('schemas/', ''),
    value: schema.replace('schemas/', ''),
  }));

Which works, but I think it would be nice to either change that json list or perhaps add another attribute that gives the registry path of the schema, maybe? Something like:

{
    "schemas/refget/annotated_collection_digest": {
        "registry": "refget/annotated_collection_digest",
        "project": "refget",
        "url": "refget/annotated_collection_digest.yaml",
        "description": "Schema for an Annotated Collection Digest; this is analogous to a single fasta file with metadata."
    },
    "schemas/refget/SeqColArraySetInherent": {
        "registry": "refget/SeqColArraySetInherent",
        "project": "refget",
        "url": "refget/SeqColArraySetInherent.yaml",
        "description": "SeqColArraySet"
    },
    ...
}
nleroy917 commented 5 months ago

Additionally, if project is invalid, validator is not showing where are the problems in the PEP

Is this just because it was broken? I see issues now:

image
khoroshevskyi commented 4 months ago

This issue was solved