From 4001c1e90132aaeffd8b1699412b18c8e86f4c83 Mon Sep 17 00:00:00 2001 From: nsheff Date: Sat, 27 Jan 2024 15:05:00 -0500 Subject: [PATCH] readme updates --- README.md | 32 ++++++++++---------------------- 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index f0ca649..ac4d66f 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,7 @@ # schema.databio.org -Welcome to lab schema repository. The schemas are hosted on github pages. - -## Accessing a schema - -You can access schemas at the URLS: https://schema.databio.org/File.yaml. For example: https://schema.databio.org/pep/2.0.0.yaml - -This corresponds to the indicated folder in this repo. +Welcome to the databio schema registry. This repository holds schemas that are then hosted using simple static API on GitHub pages. You can browse the API +at https://schema.databio.org/. To get a specific schema, construct a URL like: `https://schema.databio.org/{namspace}/{schema}.yaml` -- for example, https://schema.databio.org/pep/2.0.0.yaml would give you the file found in this repository under `schemas/pep/2.0.0.yaml`. ## Contributing a schema @@ -18,23 +13,16 @@ First, you have to write a schema yaml file. It should follow json-schema format After creating your schema file, you can contribute it to this repository so that you and others can more easily load it. Name your schema yaml file with the name of the schema. Schemas in the registry are divided into namespaces, which are represented as subfolders in this repository. So, place your schema into an appropriate subfolder, and then open a pull request. -## Dev for react v2 +## Devopment guide -This will change in the future, but for now: +The front-end is built in React, using `vite`. Clone the repository and then start a development server with: -- source schemas are found in the `/schemas` subfolder. Edit there. -- `index_contents.py` will create all the API endpoints and copy the schemas themselves into `/public`, so they will be served by react -- run `npm run build` to create the `/dist` folder from the source in `/src` (and `/public`). -- run `mv dist docs` since github pages wants to host from `/docs` only. (hack!) -- Host the site on github pages from the `docs` folder +``` +npm run dev +``` -TODO: -- [ ] re-automate the index_contents.py action (it's broken) -- [ ] automate the above build steps -- [ ] fix the breadcrumbs so they just update search params instead of triggering page refresh +### Preparing the inputs + +You need to run `index_contents.py` will create all the API endpoints and copy the schemas themselves into `/public`, so they will be served by React. This will be done by the github action for the deployed verison. For testing locally, you'll need to run it yourself. These resulting files are not checked into git since they are generated from the source schemas found in the `/schemas` subfolder. -This is a `vite` site. Clone the repository and then start a development server with: -``` -npm run dev -``` \ No newline at end of file