Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating About section #265

Merged
merged 22 commits into from
Aug 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,7 @@ gha-creds-*.json
site
docs/Data-Model

### Script ignores
scripts/scholarly_*.json

.DS_Store
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
# Monarch App


[![documentation](https://img.shields.io/badge/-Documentation-purple?logo=read-the-docs&logoColor=white&style=for-the-badge)](https://monarch-initiative.github.io/monarch-app/docs)
![](https://github.com/monarch-initiative/monarch-app/actions/workflows/test-backend.yaml/badge.svg)
![](https://github.com/monarch-initiative/monarch-app/actions/workflows/test-frontend.yaml/badge.svg)
![](https://github.com/monarch-initiative/monarch-app/actions/workflows/deploy-documentation.yaml/badge.svg)
![](https://github.com/monarch-initiative/monarch-app/actions/workflows/build-image.yaml/badge.svg)

[The New Website](https://monarch-app.monarchinitiative.org)

This repository contains the source code for the Monarch Initiative website (a Vue TS frontend),
as well as `monarch-py`, a Python library for interacting with the Monarch Initiative knowledge graph,
which includes an optional FastAPI module that serves as the website's backend.

[The New Website](https://monarch-app.monarchinitiative.org)

[Documentation](https://monarch-app.monarchinitiative.org/docs)

### For developers

Expand Down
3 changes: 2 additions & 1 deletion backend/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Monarch-Py

[![documentation](https://img.shields.io/badge/-Documentation-purple?logo=read-the-docs&logoColor=white&style=for-the-badge)](https://monarch-initiative.github.io/monarch-app/docs)

Monarch-Py is a Python library for interfacing with the Monarch Initiative Knowledge graph.
It can be used from CLI, as a module, or as a FastAPI app

[Documentation](https://monarch-app.monarchinitiative.org/docs)


## For Developers
Expand Down
1,220 changes: 917 additions & 303 deletions backend/poetry.lock

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions backend/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ mkdocs-material = ">=9.1.16"
mkdocstrings = {extras = ["python"], version = ">=0.22.0"}
black = "^22.10.0"
ruff = "*"
# isort = "^5.10.1"
# flake8 = "^5.0.4"
# autoflake = "^1.7.7"
uvicorn = {extras = ["standard"], version = "^0.20.0"}
httpx = "^0.24.1"
scholarly = "*"
habanero = "*"
manubot = "*"


[tool.poetry.extras]
Expand Down
1 change: 0 additions & 1 deletion frontend/e2e/axe.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ const paths = [
"/about",
"/help",
"/overview",
"/sources",
"/cite",
"/team",
"/publications",
Expand Down
32 changes: 16 additions & 16 deletions frontend/e2e/node.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { expect, test } from "@playwright/test";

test("Table of contents works", async ({ page }) => {
await page.goto("/node/MONDO:0007947");
await page.goto("/node/MONDO:0007523");
await page.setViewportSize({ width: 800, height: 1000 });

/** toggle button exists */
Expand Down Expand Up @@ -78,16 +78,16 @@ test("Table of contents works", async ({ page }) => {
});

test("Title info shows", async ({ page }) => {
await page.goto("/node/MONDO:0007947");
await page.goto("/node/MONDO:0007523");

/** text info in top section */
await expect(page.getByText(/Marfan syndrome/i).first()).toBeVisible();
await expect(page.getByText(/Ehlers-Danlos/i).first()).toBeVisible();
await expect(page.getByText(/Disease/i).first()).toBeVisible();
await expect(page.getByText(/MONDO:0007947/i).first()).toBeVisible();
await expect(page.getByText(/MONDO:0007523/i).first()).toBeVisible();
});

test("Overview items show", async ({ page }) => {
await page.goto("/node/MONDO:0007947");
await page.goto("/node/MONDO:0007523");

/** check for description */
await expect(
Expand All @@ -98,10 +98,10 @@ test("Overview items show", async ({ page }) => {
test("Details items show", async ({ page }) => {
test.skip(true, "No fixture data yet");

await page.goto("/node/MONDO:0007947");
await page.goto("/node/MONDO:0007523");

/** check inheritance, xref, etc. */
await expect(page.getByText(/MONDO_0007947/i).first()).toBeVisible();
await expect(page.getByText(/MONDO_0007523/i).first()).toBeVisible();
await expect(
page.getByText(/Autosomal dominant inheritance/i).first(),
).toBeVisible();
Expand All @@ -110,7 +110,7 @@ test("Details items show", async ({ page }) => {
});

test("Hierarchy items show", async ({ page }) => {
await page.goto("/node/MONDO:0007947");
await page.goto("/node/MONDO:0007523");

/** check super/equiv/sub classes */
await expect(page.getByText(/myopathy/i).first()).toBeVisible();
Expand Down Expand Up @@ -141,7 +141,7 @@ test("Publication specific info shows", async ({ page }) => {
test("Summary association info shows", async ({ page }) => {
test.skip(true, "Fixture data not stable yet");

await page.goto("/node/MONDO:0007947");
await page.goto("/node/MONDO:0007523");

/** check node, relation, target node */
await expect(
Expand All @@ -159,12 +159,12 @@ test("Summary association info shows", async ({ page }) => {
test("Table association info shows", async ({ page }) => {
test.skip(true, "Fixture data not stable yet");

await page.goto("/node/MONDO:0007947");
await page.goto("/node/MONDO:0007523");

/** check node, relation, target node */
await page.getByText(/Table/i).first().click();
await expect(
page.locator("tr", { hasText: /Marfan syndrome/ }).first(),
page.locator("tr", { hasText: /Ehlers-Danlos/ }).first(),
).toBeVisible();
await expect(
page
Expand All @@ -185,7 +185,7 @@ test("Table association info shows", async ({ page }) => {
test("Association mode switching works", async ({ page }) => {
test.skip(true, "Fixture data not stable yet");

await page.goto("/node/MONDO:0007947");
await page.goto("/node/MONDO:0007523");
await expect(page).toHaveURL(/associations=phenotype/i);

/** switch to table mode and variant associations */
Expand All @@ -210,7 +210,7 @@ test("Association mode switching works", async ({ page }) => {
test("Association table has extra metadata columns", async ({ page }) => {
test.skip(true, "No fixture data yet");

await page.goto("/node/MONDO:0007947");
await page.goto("/node/MONDO:0007523");

/** switch to table mode */
await page.getByText(/Table/i).first().click();
Expand Down Expand Up @@ -276,7 +276,7 @@ test("Association table has extra metadata columns", async ({ page }) => {
test("Evidence viewer works", async ({ page }) => {
test.skip(true, "Fixture data not stable yet");

await page.goto("/node/MONDO:0007947");
await page.goto("/node/MONDO:0007523");

/** get evidence section */
const evidence = page.locator("#evidence").locator("..");
Expand Down Expand Up @@ -319,14 +319,14 @@ test("Breadcrumbs section works", async ({ page, browserName }) => {
"Clearly a Firefox bug or peculiarity with Playwright, works fine in real Firefox",
);

await page.goto("/node/MONDO:0007947");
await page.goto("/node/MONDO:0007523");

/**
* visit chain of nodes. include clicking on both association links and
* hierarchy item links
*/
const chain = [
"Marfan syndrome",
"Ehlers-Danlos syndrome, hypermobility type",
"Has Phenotype",
"Dural ectasia",
"Has Phenotype",
Expand Down
50 changes: 0 additions & 50 deletions frontend/e2e/sources.test.ts

This file was deleted.

9 changes: 2 additions & 7 deletions frontend/fixtures/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { rest } from "msw";
/** url bases */
import { biolink, monarch } from "@/api";
import { feedbackEndpoint } from "@/api/feedback";
import { obo } from "@/api/ontologies";
import { efetch, esummary } from "@/api/publications";
import { uptimeRobot } from "@/api/uptime";
import associations from "./association-table.json";
Expand All @@ -13,7 +12,6 @@ import histopheno from "./histopheno.json";
import nodePublicationAbstract from "./node-publication-abstract.json";
import nodePublicationSummary from "./node-publication-summary.json";
import node from "./node.json";
import ontologies from "./ontologies.json";
import phenotypeExplorerCompare from "./phenotype-explorer-compare.json";
import phenotypeExplorerSearch from "./phenotype-explorer-search.json";
import search from "./search.json";
Expand All @@ -30,9 +28,6 @@ export const handlers = [
rest.get(regex(biolink, "/metadata/datasets"), (req, res, ctx) =>
res(ctx.status(200), ctx.json(datasets)),
),
rest.get(regex(obo), (req, res, ctx) =>
res(ctx.status(200), ctx.json(ontologies)),
),

/** api status monitoring on /help */
rest.post(regex(uptimeRobot), (req, res, ctx) =>
Expand Down Expand Up @@ -88,8 +83,8 @@ export const handlers = [
const replace: {
[key: string]: { name?: string; category?: string };
} = {
"MONDO:0007947": {
name: "Marfan syndrome",
"MONDO:0007523": {
name: "Ehlers-Danlos syndrome, hypermobility",
category: "biolink:Disease",
},
"HP:0100775": {
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
This web app is the
<strong v-if="apiName === 'beta'">BETA VERSION</strong
><strong v-if="apiName === 'dev'">DEV VERSION</strong> successor to the
<a href="https://monarchinitiative.org/">old web app here</a>. Not all
features are implemented yet. Please use the feedback form to tell us what
you think!
<AppLink to="https://monarchinitiative.org/">old web app here</AppLink>. Not
all features are implemented yet. Please use the feedback form to tell us
what you think!
</TheBanner>

<TheHeader />
Expand Down
Loading