-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Order change in readme * Fixed readme order * Added venv changes * Readme changes Co-authored-by: Shivang Bagri <[email protected]>
- Loading branch information
1 parent
328b8dc
commit 5386d5c
Showing
1 changed file
with
59 additions
and
37 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 |
---|---|---|
|
@@ -28,17 +28,68 @@ The ga4gh/vrs-python repo embeds the ga4gh/vrs repo as a git submodule, and | |
therefore each ga4gh.vrs package on PyPi embeds a particular version of VRS. The | ||
correspondences between the packages may be summarized as: | ||
|
||
| vrs-python branch | vrs branch | | ||
| --- | --- | | ||
| [main](https://github.com/ga4gh/vrs-python/tree/main) | [main](https://github.com/ga4gh/vrs/tree/main) | | ||
| [0.6](https://github.com/ga4gh/vrs-python/tree/0.6) | [1.1](https://github.com/ga4gh/vrs/tree/1.1) | | ||
| [0.7](https://github.com/ga4gh/vrs-python/tree/0.7) | [1.2](https://github.com/ga4gh/vrs/tree/1.2) | | ||
| [0.8](https://github.com/ga4gh/vrs-python/tree/0.8) | [1.3](https://github.com/ga4gh/vrs/tree/1.3) | | ||
| [0.9](https://github.com/ga4gh/vrs-python/tree/0.9) | [metaschema-update](https://github.com/ga4gh/vrs/tree/metaschema-update) | | ||
| vrs-python branch | vrs branch | | ||
| ----------------------------------------------------- | ------------------------------------------------------------------------ | | ||
| [main](https://github.com/ga4gh/vrs-python/tree/main) | [main](https://github.com/ga4gh/vrs/tree/main) | | ||
| [0.6](https://github.com/ga4gh/vrs-python/tree/0.6) | [1.1](https://github.com/ga4gh/vrs/tree/1.1) | | ||
| [0.7](https://github.com/ga4gh/vrs-python/tree/0.7) | [1.2](https://github.com/ga4gh/vrs/tree/1.2) | | ||
| [0.8](https://github.com/ga4gh/vrs-python/tree/0.8) | [1.3](https://github.com/ga4gh/vrs/tree/1.3) | | ||
| [0.9](https://github.com/ga4gh/vrs-python/tree/0.9) | [metaschema-update](https://github.com/ga4gh/vrs/tree/metaschema-update) | | ||
|
||
⚠ **Developers: See the development section below for recommendations for using submodules | ||
gracefully (and without causing problems for others!).** | ||
|
||
# Pre-requisite | ||
|
||
[Python 3.10](https://www.python.org/downloads/release/python-3100/) | ||
|
||
# Development | ||
|
||
## Submodules! | ||
|
||
vrs-python embeds vrs as a submodule. When checking out vrs-python and switching | ||
branches, it is important to make sure that the submodule tracks vrs-python | ||
correctly. The recommended way to do this is `git config --global submodule.recurse true`. **If you don't set submodule.recurse, developers and | ||
reviewers must be extremely careful to not accidentally upgrade or downgrade | ||
schemas with respect to vrs-python.** | ||
|
||
Alternatively, see `misc/githooks/`. | ||
|
||
## Installing for development | ||
|
||
Fork the repo at https://github.com/ga4gh/vrs-python/ . | ||
|
||
$ git clone --recurse-submodules [email protected]:YOUR_GITHUB_ID/vrs-python.git | ||
$ cd vrs-python | ||
$ make devready | ||
|
||
Activate the virtual environment (if not already) : | ||
|
||
$ source venv/3.10/bin/activate | ||
|
||
## Pre-commit | ||
|
||
We use [pre-commit](https://pre-commit.com/) to check code style. | ||
|
||
Before first commit, run: | ||
|
||
$ pre-commit install | ||
|
||
## Testing | ||
|
||
This package implements typical unit tests for ga4gh.core and ga4gh.vrs. This | ||
package also implements the compliance tests from vrs (vrs/validation) in the | ||
tests/validation/ directory. | ||
|
||
$ make test | ||
|
||
## Developing VRS (the schema) too | ||
|
||
If you want to develop the VRS schema in conjunction with vrs-python, the | ||
recommended approach for most users is to fork and clone the `ga4gh/vrs` repo, | ||
then set the `VRS_SCHEMA_DIR` environment variable to use an alternative schema | ||
location. | ||
|
||
# Installation | ||
|
||
## Installing with pip | ||
|
@@ -104,7 +155,6 @@ Here are some things to try. | |
|
||
Once installed as described above, type | ||
|
||
$ source venv/3.10/bin/activate | ||
$ jupyter notebook --notebook-dir notebooks/ | ||
|
||
The following jupyter extensions are recommended but not required | ||
|
@@ -129,39 +179,11 @@ We have created a public [`VRS-demo-notebooks`](https://app.terra.bio/#workspace | |
**4. Select the Jupyter Kernel**: In a notebook, click `Select Kernel` at the top right. Select the option where the path is `venv/3.10/bin/python3`. See [here](https://code.visualstudio.com/docs/datascience/jupyter-kernel-management) for more information on managing Jupyter Kernels in VS Code. | ||
**5. Run the Notebook**: After selecting the kernel you can now run the notebook. | ||
|
||
# Development | ||
|
||
## Submodules! | ||
|
||
vrs-python embeds vrs as a submodule. When checking out vrs-python and switching | ||
branches, it is important to make sure that the submodule tracks vrs-python | ||
correctly. The recommended way to do this is `git config --global submodule.recurse true`. **If you don't set submodule.recurse, developers and | ||
reviewers must be extremely careful to not accidentally upgrade or downgrade | ||
schemas with respect to vrs-python.** | ||
|
||
Alternatively, see `misc/githooks/`. | ||
|
||
## Installing for development | ||
|
||
Fork the repo at https://github.com/ga4gh/vrs-python/ . | ||
|
||
$ git clone --recurse-submodules [email protected]:YOUR_GITHUB_ID/vrs-python.git | ||
$ cd vrs-python | ||
$ make devready | ||
|
||
## Testing | ||
|
||
This package implements typical unit tests for ga4gh.core and ga4gh.vrs. This | ||
package also implements the compliance tests from vrs (vrs/validation) in the | ||
tests/validation/ directory. | ||
|
||
$ make test | ||
|
||
# Security Note (from the GA4GH Security Team) | ||
|
||
A stand-alone security review has been performed on the specification itself. | ||
This implementation is offered as-is, and without any security guarantees. It | ||
will need an independent security review before it can be considered ready for | ||
use in security-critical applications. If you integrate this code into your | ||
application it is AT YOUR OWN RISK AND RESPONSIBILITY to arrange for a security | ||
audit. | ||
audit. |