You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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`.
10
5
11
6
## Contributing a schema
12
7
@@ -18,23 +13,16 @@ First, you have to write a schema yaml file. It should follow json-schema format
18
13
19
14
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.
20
15
21
-
## Dev for react v2
16
+
## Devopment guide
22
17
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:
24
19
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
+
```
30
23
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.
35
27
36
-
This is a `vite` site. Clone the repository and then start a development server with:
0 commit comments