Skip to content

Commit

Permalink
Update for TRAPI 1.4 deployments
Browse files Browse the repository at this point in the history
  • Loading branch information
Woozl committed Oct 18, 2023
1 parent d9e6933 commit e8dfa41
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
12 changes: 10 additions & 2 deletions scripts/preprocess.js
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand All @@ -30,6 +30,7 @@ async function fetchSpec() {
async function writeSourceMetadata(jsonData) {
const SOURCES = [
"biolink",
"binding-db",
"cam-kp",
"ctd",
"drugcentral",
Expand All @@ -45,6 +46,7 @@ async function writeSourceMetadata(jsonData) {
"intact",
"panther",
"pharos",
"reactome",
"robokopkg",
"sri-reference-kg",
"string-db",
Expand Down Expand Up @@ -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()}`
Expand Down
10 changes: 7 additions & 3 deletions src/theme/DocCard/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand All @@ -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"],
Expand All @@ -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: {
Expand Down Expand Up @@ -106,6 +108,8 @@ function CardCategory({ item }) {
})();
}, []);

console.log(item);

if (!href) {
return null;
}
Expand Down

0 comments on commit e8dfa41

Please sign in to comment.