specifications icon indicating copy to clipboard operation
specifications copied to clipboard

Replace exampleURLs with resource name in Live Deploys/By Profile

Open ivanmicetic opened this issue 1 year ago • 4 comments

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?

ivanmicetic avatar Mar 07 '23 16:03 ivanmicetic

@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!

bedroesb avatar Mar 08 '23 09:03 bedroesb

@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?

ivanmicetic avatar Mar 08 '23 10:03 ivanmicetic

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.

bedroesb avatar Mar 08 '23 14:03 bedroesb

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.

ivanmicetic avatar Mar 20 '23 09:03 ivanmicetic