Skip to content

Commit 4001c1e

Browse files
committed
readme updates
1 parent 4f75338 commit 4001c1e

File tree

1 file changed

+10
-22
lines changed

1 file changed

+10
-22
lines changed

README.md

+10-22
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
# schema.databio.org
22

3-
Welcome to lab schema repository. The schemas are hosted on github pages.
4-
5-
## Accessing a schema
6-
7-
You can access schemas at the URLS: https://schema.databio.org/File.yaml. For example: https://schema.databio.org/pep/2.0.0.yaml
8-
9-
This corresponds to the indicated folder in this repo.
3+
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
4+
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`.
105

116
## Contributing a schema
127

@@ -18,23 +13,16 @@ First, you have to write a schema yaml file. It should follow json-schema format
1813

1914
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.
2015

21-
## Dev for react v2
16+
## Devopment guide
2217

23-
This will change in the future, but for now:
18+
The front-end is built in React, using `vite`. Clone the repository and then start a development server with:
2419

25-
- source schemas are found in the `/schemas` subfolder. Edit there.
26-
- `index_contents.py` will create all the API endpoints and copy the schemas themselves into `/public`, so they will be served by react
27-
- run `npm run build` to create the `/dist` folder from the source in `/src` (and `/public`).
28-
- run `mv dist docs` since github pages wants to host from `/docs` only. (hack!)
29-
- Host the site on github pages from the `docs` folder
20+
```
21+
npm run dev
22+
```
3023

31-
TODO:
32-
- [ ] re-automate the index_contents.py action (it's broken)
33-
- [ ] automate the above build steps
34-
- [ ] fix the breadcrumbs so they just update search params instead of triggering page refresh
24+
### Preparing the inputs
25+
26+
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.
3527

36-
This is a `vite` site. Clone the repository and then start a development server with:
3728

38-
```
39-
npm run dev
40-
```

0 commit comments

Comments
 (0)