Skip to content

Commit

Permalink
Merge pull request #22 from Sage-Bionetworks/update-documentation
Browse files Browse the repository at this point in the history
Updated documentation related to running schema viz
  • Loading branch information
linglp authored Nov 27, 2023
2 parents fd9d273 + ce8912a commit 49716f4
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,18 @@ This repository is for extracting D3 and Javascript code from observables to pro
# Running the code
Simply clone the repository and run `python3 -m http.server`.

# Update schema used for your project utilizing schematic API (preferred)
# Run schema viz for your data model locally utilizing schematic APIs (preferred)
* Open files/config.yml and update the schema url that you want to use for your project. Please note that by default we are using schematic prod environment when making API calls.
* Run `python3 -m http.server` and you should be able to see the visualization of your schema.

Note: if the tangled tree or the attribute table is not showing up, it is likely that there is an error when using your schema to make API calls to the following endpoints: 1) `GET /visualize/tangled_tree/layers`; 2) `Get /visualize/attributes`. Please start by using schematic prod: https://schematic.api.sagebionetworks.org/v1/ui/ and see if you could use these two endpoints with your schema. If you could not, please contact FAIR data service desk.
# Run schema viz for your data model and publish visualization using github action (preferred)
* Fork this repository. If you have forked this repo, make sure that the `main` branch of your forked repository is in sync with the `main` branch of this repo.
* In your forked repository, open `files/config.yml` and update the schema url that you want to use for your project. Please note that by default we are using schematic prod environment when making API calls.
* Run schema viz locally by running `python3 -m http.server` and see the schema viz locally. If some parts of the visualization gets cut, please adjust the width of your visualization in `createCollapsibleTree` function in `collapsibleTangleTree.js` (See around line 66 in `collapsibleTangleTree.js`)
* Enable Github action in your repo. Click on "Settings" > "Pages". Under section "Build and deployment", select "main" branch or a branch that you desire to build github pages. (Please see more instructions [here](https://github.com/ncihtan/schema_visualization/tree/develop-update-schema-viz))
* After your site gets published successfully, to visit your published site, under "GitHub Pages", click `Visit site`

> Note: if the tangled tree or the attribute table is not showing up, it is likely that there is an error when using your schema to make API calls to the following endpoints: 1) `GET /visualize/tangled_tree/layers`; 2) `Get /visualize/attributes`. Please start by using schematic prod: https://schematic.api.sagebionetworks.org/v1/ui/ and see if you could use these two endpoints with your schema. If you could not, please contact FAIR data service desk.

# Update Static files (**Will be deprecated**)
Expand Down

0 comments on commit 49716f4

Please sign in to comment.