-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: update schema section in readme (#48)
* docs: update readme
- Loading branch information
Showing
1 changed file
with
47 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,18 +5,51 @@ | |
|
||
![image](docs/source/images/cat-vrs-transparent-bg.png) | ||
|
||
## Using the schema | ||
|
||
# How to set up a venv and update the schemata from the source.yaml files: (Guide for VSCode) | ||
|
||
1. Use the following code to install the venv in the root directory that contains the requirements.txt file. Note that requirements.txt may be hidden and not show up with `ls`, but it should show up if you ise `ls -a` to list hidden files. | ||
> `python3 -m venv venv` | ||
> | ||
> `source venv/bin/activate` | ||
> | ||
> `pip install -U setuptools pip` | ||
> | ||
> `pip install -r .requirements.txt` | ||
2. Then run the following code to pull in all of the submodule content: | ||
> `git submodule update --init --recursive` | ||
3. The venv should be all set up to update the `.rst` files as they are updated. `.rst` files inside the `docs/source` directory are static and can be edited directly. (you will need to install aan `.rst`-compatible extension to view the outputs inside the editor, however. I currently have both reStructuredText and RST Preview installed.) The `.rst` and `.json` files for the schemata are generated by making edits to the `-source.yaml` files, and thenrunning the `Makefile`. To run the `Makefile`, `cd` into the `cat-vrs/schema` directory which contains it and run the following line of code to update everything: | ||
> `make all` | ||
The schema is available in the [schema/](./schema/) directory, in both yaml and json versions. | ||
It conforms to JSON Schema Draft 2020-12. For a list of | ||
libraries that support JSON schema, see | ||
[JSONSchema>Tools](https://json-schema.org/tools). | ||
|
||
## Installing for development | ||
|
||
Fork the repo at <https://github.com/ga4gh/cat-vrs>. | ||
|
||
git clone --recurse-submodules [email protected]:YOUR_GITHUB_ID/cat-vrs.git | ||
cd cat-vrs | ||
make devready | ||
source venv/3.12/bin/activate | ||
|
||
If you already cloned the repo, but forgot to include `--recurse-submodules` you can run: | ||
|
||
git submodule update --init --recursive | ||
|
||
## Contributing to the schema | ||
|
||
Cat-VRS uses [cat-vrs-source.yaml](./schema/cat-vrs/cat-vrs-source.yaml) as the source | ||
document for JSON Schema. | ||
|
||
To create the corresponding def and json files after making changes to the source | ||
document, from the root directory: | ||
|
||
cd schema | ||
make all | ||
|
||
## Contributing to the docs | ||
|
||
The Cat-VRS specification documentation is written in reStructuredText and located in | ||
[docs/source](docs/source/). Commits to this repo are built automatically at | ||
<https://vrsatile.readthedocs.io/en/latest/catvars/index.html#>. | ||
|
||
To build documentation locally, you must install [entr](https://eradman.com/entrproject/): | ||
|
||
brew install entr | ||
|
||
Then from the root directory: | ||
|
||
cd docs | ||
make clean watch & | ||
|
||
Then, open [docs/build/html/index.html](./docs/build/html/index.html). The above make | ||
command should build docs when source changes. (Some types of changes require recleaning and building.) |