comses.net icon indicating copy to clipboard operation
comses.net copied to clipboard

structured data on codebase landing pages + codemeta integration

Open alee opened this issue 7 years ago • 6 comments

Each codebase release should have its own specific CodeMeta associated with it. Embed structured json-ld data in the landing page, and provide it in the downloaded archive.

Google's schema.org testing tool (ignore warning about deprecation - https://developers.google.com/search/blog/2020/07/rich-results-test-out-of-beta):

https://search.google.com/structured-data/testing-tool/u/0/

https://search.google.com/test/rich-results

alee avatar May 18 '18 18:05 alee

https://codemeta.github.io/user-guide/

List of codemeta terms we should be mapping our metadata onto: https://codemeta.github.io/terms/

https://github.com/proycon/codemetapy

alee avatar Aug 30 '18 15:08 alee

Example codemeta from codemeta: https://github.com/codemeta/codemeta/blob/master/codemeta.json

Example codemeta from ASCL: https://ascl.net/1010.051/codemeta.json

alee avatar May 09 '19 22:05 alee

crosswalk in progress at https://docs.google.com/spreadsheets/d/1huJnxvk41AiMRpDwcdSX-Vg_Aw4_GHv1bhUFZyP_Ehs/edit?usp=sharing

alee avatar Nov 13 '19 22:11 alee

The root object is an instance of https://schema.org/SoftwareSourceCode

  • [x] add a targetProduct that is an instance of https://schema.org/SoftwareApplication
  • [ ] provide additional properties where possible, for example the SoftwareSourceCode discussionUrl should point to the related Discourse comments page this would require some hacking since the discourseEmbed is generating that link..
  • [ ] add softwareRequirements properties based on captured dependencies (from stencila/dockta?)

alee avatar Nov 19 '19 20:11 alee

discussionUrl can be set by querying the discourse endpoint /embed/info

Example:

curl 'https://meta.discourse.org/embed/info?embed_url=https://blog.discourse.org/2021/04/discourse-team-grows-to-50' -H 'API-KEY: logapikeygoeshere' -H 'API-USERNAME: apiusernamehere' 

Response:

{
  "topic_id": 187794,
  "post_id": 925017,
  "topic_slug": "discourse-team-grows-to-50-blog",
  "comment_count": 2
}

The embed_url should be the permanent_url for the codebase landing page, and the response we get can be parsed for the topic_id to generate a forum.comses.net/t/<topic_id> link to include as the discussionUrl.

From

https://meta.discourse.org/t/embedding-discourse-comments-via-javascript/31963/394

alee avatar Dec 02 '21 05:12 alee

add dedicated sponsors and funding fields to Codebase metadata as well as emitted codemeta

alee avatar Apr 11 '22 19:04 alee