diff --git a/README.md b/README.md index 6c9c1f5..c50051c 100644 --- a/README.md +++ b/README.md @@ -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` \ No newline at end of file +The schema is available in the [schema/](./schema/) directory, in both reStructuredTex +(RST) and JSON versions. It conforms to JSON Schema Draft 2020-12. For a list of +libraries that support JSON schema, see +[JSONSchema>Implementations](https://json-schema.org/tools). + +## Installing for development + +Fork the repo at . + + git clone --recurse-submodules git@github.com: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 +. + +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.)