BioSchemas / specifications

Issue tracker, technical wiki, and example markup
https://bioschemas.org
54 stars 52 forks source link

Replace exampleURLs with resource name in Live Deploys/By Profile #641

Open ivanmicetic opened 1 year ago

ivanmicetic commented 1 year ago

Live Deploys/By Profile list all profiles of live deploys but it misses the resource name and uses exampleURL instead which might be missing (see for example MolecularEntity profile). This is due to Liquid extracting all resources.profiles objects from live_deployments.json and looping through them but loosing parent resource properties like name and url.

This could be fixed by adding the name and url resource properties to all child profiles objects.

Can such a "flattened" list of objects be created directly with Liquid language or alternatively is it possible to create a GitHub action or similar that can trigger a script to create the new live_deployment_profiles.json from live_deployments.json automatically?

bedroesb commented 1 year ago

@ivanmicetic I understand the use of name for the url, this would also increase the accessibility. But I don't understand why we would allow resources that do not have an example url? We have nothing to link out to, so I also don't see the benefit for the end-user on or website to be honest. But Maybe I am missing something!

ivanmicetic commented 1 year ago

@bedroesb I get your point, I also thought that way but Egon Willighagen pointed out that some of these resources are links to data dumps so they don't have a link to a page with the display of a profile. See the slack thread here. Bottom line is that it is possible to have it missing. So, can we produce a flattened version of live_deployments.json directly with Liquid/Jekyll or we need some other language/script/GitHub action in order to process the JSON?

bedroesb commented 1 year ago

I found a solution that works: https://github.com/BioSchemas/bioschemas.github.io/pull/739

But this is only because of the fact that the combination of exampleURL, profileName an profileName is unique. I suggest we add the datadump url as url for the exampleURL to gurantee uniqueness and to also have a working url when people click on the link. Now we are overwriting the proposed schema with "http:///" which is also not ideal imo.

ivanmicetic commented 1 year ago

I like your solution in #739 and yes, we could use the datadump URL for exampleURL. Then those if checks should exclude SMV and BMUSE buttons and leave only the Page button.