Skip to content

Commit 8e95963

Browse files
docs: update readme for installation + setup (#496)
docs: update readme for installation + setup --------- Co-authored-by: James Stevenson <[email protected]>
1 parent 84455b8 commit 8e95963

File tree

2 files changed

+94
-66
lines changed

2 files changed

+94
-66
lines changed

Makefile

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
PYV:=3.12
2+
VEDIR=venv/${PYV}
3+
4+
############################################################################
5+
#= SETUP, INSTALLATION, PACKAGING
6+
7+
#=> venv: make a Python 3 virtual environment
8+
.PHONY: venv/%
9+
venv/%:
10+
python$* -m venv $@; \
11+
source $@/bin/activate; \
12+
python -m ensurepip --upgrade; \
13+
pip install --upgrade pip setuptools
14+
15+
#=> develop: install package in develop mode
16+
.PHONY: develop setup
17+
develop setup:
18+
pip install -r .requirements.txt
19+
20+
#=> devready: create venv, install prerequisites, install pkg in develop mode
21+
.PHONY: devready
22+
devready:
23+
make ${VEDIR} && source ${VEDIR}/bin/activate && make develop
24+
@echo '#################################################################################'
25+
@echo '### Do not forget to `source ${VEDIR}/bin/activate` to use this environment ###'
26+
@echo '#################################################################################'
27+
28+
############################################################################
29+
#= TESTING
30+
# see test configuration in pyproject.toml
31+
32+
#=> test: execute tests
33+
.PHONY: test
34+
test:
35+
pytest tests/
36+
37+
#=> doctest: execute documentation tests (requires extra data)
38+
.PHONY: doctest
39+
doctest:
40+
pytest tests/ --doctest-modules

README.md

+54-66
Original file line numberDiff line numberDiff line change
@@ -1,101 +1,89 @@
1+
# Variation Representation Specification (VRS)
2+
13
[![DOI](https://zenodo.org/badge/67005248.svg)](https://zenodo.org/badge/latestdoi/67005248)
24
[![Read the Docs](https://img.shields.io/readthedocs/vr-spec/1.1)](https://vrs.ga4gh.org/)
35
[![tests](https://github.com/ga4gh/vrs/actions/workflows/tests.yml/badge.svg)](https://github.com/ga4gh/vrs/actions/workflows/tests.yml)
46

5-
The [GA4GH](https://www.ga4gh.org/) [Variation Representation
6-
Specification](https://vrs.ga4gh.org/) provides a
7-
comprehensive framework for the computational representation of
8-
biological sequence variation. VRS is the result of a
9-
collaboration among [contributors](CONTRIBUTORS.md) representing
10-
national information resource providers, major international public
11-
initiatives, and diagnostic testing laboratories.
7+
The [GA4GH](https://www.ga4gh.org/) [Variation Representation Specification](https://vrs.ga4gh.org/)
8+
provides a comprehensive framework for the computational representation of biological sequence
9+
variation. VRS is the result of a collaboration among [contributors](CONTRIBUTORS.md) representing
10+
national information resource providers, major international public initiatives, and diagnostic
11+
testing laboratories.
1212

1313
VRS is licensed under the [Apache License 2.0](LICENSE).
1414

15+
> **NOTE:** VRS is under active development.
16+
> See the [VRS Project Roadmap](https://github.com/orgs/ga4gh/projects/12).
1517
16-
> **NOTE:** VRS is under active development. See [VR
17-
> Project Roadmap](https://github.com/orgs/ga4gh/projects/5).
18-
18+
## Specific goals
1919

20-
# Specific goals:
21-
22-
* Develop common language- and protocol-neutral information models and
23-
nomenclature for biological sequence variation.
24-
* From the information models, develop data schemas. The current
25-
schema is defined in JSON Schema, but other formats are expected.
26-
* Provide algorithmic guidance and conventions to minimize
27-
representational ambiguity.
28-
* Define a globally unique *computed identifier* for covered data
29-
classes.
30-
* Develop [validation
31-
tests](https://github.com/ga4gh/vrs/tree/main/validation) to ensure
20+
* Develop common language and protocol-neutral information models and nomenclature for
21+
biological sequence variation.
22+
* From the information models, develop data schemas. The current schema is defined in
23+
JSON Schema, but other formats are expected.
24+
* Provide algorithmic guidance and conventions to minimize representational ambiguity.
25+
* Define a globally unique *computed identifier* for covered data classes.
26+
* Develop [validation tests](https://github.com/ga4gh/vrs/tree/main/validation) to ensure
3227
consistency of implementations.
3328

34-
The VRS model is the product of the [GA4GH Variation Representation
35-
group](https://ga4gh-gks.github.io/variant_representation.html).
36-
37-
38-
> **SEE ALSO**: See [vrs-python](https://github.com/ga4gh/vrs-python)
39-
> for an implementation and Jupyter notebooks.
40-
41-
42-
# Using the schema
29+
The VRS model is the product of the [GA4GH Variation Representation group](https://www.ga4gh.org/product/variation-representation/).
4330

44-
The schema is available in the `schema/` directory, in both yaml and
45-
json versions. It conforms to JSON Schema draft-07. For a list of
46-
libraries that support JSON schema, see [JSON
47-
Schema>Implementations](https://json-schema.org/implementations.html).
31+
> **SEE ALSO**: See [VRS-Python](https://github.com/ga4gh/vrs-python) for a Python
32+
> implementation and Jupyter notebooks.
4833
34+
## Using the schema
4935

36+
The schema is available in the [schema/](./schema/) directory, in both yaml and json versions.
37+
It conforms to JSON Schema draft-07. For a list of libraries that support JSON schema,
38+
see [JSONSchema>Implementations](https://json-schema.org/implementations.html).
5039

51-
# Contributing to the schema
40+
## Installing for development
5241

53-
VRS uses yaml as the source document for JSON Schema
42+
Fork the repo at <https://github.com/ga4gh/vrs>.
5443

55-
To convert vrs.yaml to vrs.json:
44+
git clone --recurse-submodules [email protected]:YOUR_GITHUB_ID/vrs.git
45+
cd vrs
46+
make devready
47+
source venv/3.12/bin/activate
5648

57-
make vrs.json
49+
If you already cloned the repo, but forgot to include `--recurse-submodules` you can run:
5850

59-
You'll probably have to `pip install pyyaml` first.
51+
git submodule update --init --recursive
6052

61-
To watch for changes and update automatically:
53+
## Contributing to the schema
6254

63-
make -C schema watch &
55+
VRS uses [vrs-source.yaml](./schema//vrs/vrs-source.yaml) as the source document for JSON Schema.
6456

57+
To create the corresponding def and json files after making changes to the source document, from the root directory:
6558

66-
# Contributing docs
59+
cd schema
60+
make all
6761

68-
The VR specification documentation is written in reStructuredText and
69-
located in `docs/source/`. Commits to this repo are built
70-
automatically at `vrs.ga4gh.org`.
62+
## Contributing to the docs
7163

72-
To build documentation locally, type:
64+
The VRS specification documentation is written in reStructuredText and located in [docs/source](docs/source/). Commits to this repo are built automatically at <https://vrs.ga4gh.org>.
7365

74-
make -C docs clean watch &
66+
To build documentation locally, you must install `entr`:
7567

76-
Then, open `docs/build/html/index.html`. The above make command
77-
should build docs when source changes. (Some types of changes require
78-
recleaning and building.)
68+
brew install entr
7969

70+
Then from the root directory:
8071

81-
# Testing
72+
cd docs
73+
make clean watch &
8274

83-
The VRS repo contains two kinds of tests. Basic smoketests in `tests/`
84-
ensure that the schema is parseable and works with certain tools.
85-
These tests provide a basic sanity check during development.
75+
Then, open `docs/build/html/index.html`. The above make command should build docs when
76+
source changes. (Some types of changes require recleaning and building.)
8677

87-
Validation tests (in `validation/`) provide language-neutral tests for
88-
those implementing tools with VRS.
78+
## Testing
8979

90-
## Using smoketests
80+
The VRS repo contains two kinds of tests. Basic smoke tests in `tests/` ensure that the
81+
schema is parsable and works with certain tools. These tests provide a basic sanity
82+
check during development.
9183

92-
The smoketests require python 3.8+. This is the recommended setup:
84+
Validation tests (in `validation/`) provide language-neutral tests for those implementing
85+
tools with VRS.
9386

94-
```
95-
$ python3 -m venv venv
96-
$ source venv/bin/activate
97-
$ pip install -U setuptools pip
98-
$ pip install -r .requirements.txt
99-
$ python3 -m pytest
87+
To run the smoke tests:
10088

101-
```
89+
make test

0 commit comments

Comments
 (0)