diff --git a/scripts/preprocess.js b/scripts/preprocess.js index d3bf67e..ea61b09 100644 --- a/scripts/preprocess.js +++ b/scripts/preprocess.js @@ -5,7 +5,7 @@ const fs = require("fs"); const { v4 } = require("uuid"); -const BASE_URL = "https://automat-u24.apps.renci.org"; +const BASE_URL = "https://robokop-automat.apps.renci.org"; const AUTOMAT_OPENAPI_URL = `${BASE_URL}/openapi.yml`; const OPENAPI_PATH = "./api/openapi.json"; @@ -30,6 +30,7 @@ async function fetchSpec() { async function writeSourceMetadata(jsonData) { const SOURCES = [ "biolink", + "binding-db", "cam-kp", "ctd", "drugcentral", @@ -45,6 +46,7 @@ async function writeSourceMetadata(jsonData) { "intact", "panther", "pharos", + "reactome", "robokopkg", "sri-reference-kg", "string-db", @@ -108,11 +110,17 @@ async function writeSourceMetadata(jsonData) { final_edge_count, } = tagMd; + // split the neo4j_dump url on '/' to get the containing directory and link to that instead + const fileDirLink = neo4j_dump + ?.split("/") + ?.slice(0, -1) + ?.join("/"); + tag.description = ` ${graph_description ?? ""}\n ${graph_version ? `**Version:** ${graph_version}` : ""}\n ${graph_url ? `**URL:** [${graph_url}](${graph_url})` : ""}\n -${neo4j_dump ? `**Neo4J:** [${neo4j_dump}](${neo4j_dump})` : ""}\n +${fileDirLink ? `**Files:** [${fileDirLink}](${fileDirLink})` : ""}\n ${ final_node_count ? `**Nodes:** ${parseInt(final_node_count).toLocaleString()}` diff --git a/src/theme/DocCard/index.js b/src/theme/DocCard/index.js index 628544e..344ae43 100644 --- a/src/theme/DocCard/index.js +++ b/src/theme/DocCard/index.js @@ -43,10 +43,11 @@ function CardLayout({ href, icon, title, description, info }) { const SOURCES = new Map([ ["RENCI SRI Reference KG", "biolink"], - ["CAM KP", "cam-kp"], + ["BINDING", "binding-db"], + ["CAM Provider KG", "cam-kp"], ["CTD", "ctd"], ["DrugCentral", "drugcentral"], - ["Alliance of Genome Resources Orthology", "genome-alliance"], + ["Alliance of Genome Resources", "genome-alliance"], ["GTEx", "gtex"], ["GtoPdb", "gtopdb"], ["GWAS Catalog", "gwas-catalog"], @@ -58,6 +59,7 @@ const SOURCES = new Map([ ["IntAct Molecular Interaction Database", "intact"], ["PANTHER", "panther"], ["Pharos", "pharos"], + ["Reactome", "reactome"], ["ROBOKOP KG", "robokopkg"], ["SRI Reference KG", "sri-reference-kg"], ["STRING", "string-db"], @@ -73,7 +75,7 @@ const getMetaData = async (label) => { try { const response = await fetch( - `https://automat-u24.apps.renci.org/${SOURCES.get(label)}/metadata`, + `https://robokop-automat.apps.renci.org/${SOURCES.get(label)}/metadata`, { method: "GET", headers: { @@ -106,6 +108,8 @@ function CardCategory({ item }) { })(); }, []); + console.log(item); + if (!href) { return null; }