From eba5f5403601285168c9d55f83c89b7780330124 Mon Sep 17 00:00:00 2001 From: Shivang Bagri <61118650+sivangbagri@users.noreply.github.com> Date: Wed, 20 Dec 2023 21:36:10 +0530 Subject: [PATCH 1/5] docs: change order in readme (#294) * Order change in readme * Fixed readme order * Added venv changes * Readme changes --- README.md | 96 ++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 59 insertions(+), 37 deletions(-) diff --git a/README.md b/README.md index 06e80323..7135d426 100644 --- a/README.md +++ b/README.md @@ -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 git@github.com: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,34 +179,6 @@ 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 git@github.com: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. @@ -164,4 +186,4 @@ 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. \ No newline at end of file From 89a08af2265e1b2935597e4a133c773a90227fd0 Mon Sep 17 00:00:00 2001 From: Manish Kuniyal <110035752+manish0kuniyal@users.noreply.github.com> Date: Sun, 7 Jan 2024 06:15:04 +0530 Subject: [PATCH 2/5] Enhanced installation guide (#306) * Enhanced installation guide * Added MacSetup and Postgres for UTA. * Added Homebrew installation guide and referenced documentation --- README.md | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7135d426..2e1392ae 100644 --- a/README.md +++ b/README.md @@ -93,6 +93,27 @@ location. # Installation ## Installing with pip +Before installing the `ga4gh.vrs[extras]` package, ensure that **PostgreSQL** is installed on your system. You can download and install PostgreSQL from [here](https://www.postgresql.org/download/). +### To install PostgreSQL using ``Homebrew`` +1.**Install Homebrew**: If you don't have Homebrew installed, you can install it by opening Terminal and running the following command: +``` +/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" +``` +2.**Update Homebrew**: Make sure Homebrew is up-to-date by running: +``` +brew update +``` +3.**Install PostgreSQL**: Use the following command to install PostgreSQL: +``` +brew install postgresql +``` +4.**Start PostgreSQL**: Once the installation is complete, you can start the PostgreSQL service using: +``` +brew services start postgresql +``` +You can refer to these documents [setup help docs](https://github.com/ga4gh/vrs-python/tree/main/docs/setup_help) for additional assistance. + +Once PostgreSQL is installed, proceed with the following command to install the `ga4gh.vrs[extras]` package: pip install 'ga4gh.vrs[extras]' @@ -186,4 +207,4 @@ 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. \ No newline at end of file +audit. From ef5ce411c810e5f31d76047ac2bc1fabad395446 Mon Sep 17 00:00:00 2001 From: korikuzma Date: Mon, 8 Jan 2024 19:57:58 -0500 Subject: [PATCH 3/5] docs: clean up postgresql readme --- README.md | 47 +++++++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 2e1392ae..d90f5de8 100644 --- a/README.md +++ b/README.md @@ -92,28 +92,31 @@ location. # Installation -## Installing with pip -Before installing the `ga4gh.vrs[extras]` package, ensure that **PostgreSQL** is installed on your system. You can download and install PostgreSQL from [here](https://www.postgresql.org/download/). -### To install PostgreSQL using ``Homebrew`` -1.**Install Homebrew**: If you don't have Homebrew installed, you can install it by opening Terminal and running the following command: -``` -/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" -``` -2.**Update Homebrew**: Make sure Homebrew is up-to-date by running: -``` -brew update -``` -3.**Install PostgreSQL**: Use the following command to install PostgreSQL: -``` -brew install postgresql -``` -4.**Start PostgreSQL**: Once the installation is complete, you can start the PostgreSQL service using: -``` -brew services start postgresql -``` -You can refer to these documents [setup help docs](https://github.com/ga4gh/vrs-python/tree/main/docs/setup_help) for additional assistance. - -Once PostgreSQL is installed, proceed with the following command to install the `ga4gh.vrs[extras]` package: +## Install PostgreSQL + +PostgreSQL is required for UTA. Ensure that PostgreSQL is installed on your system. You can download and install PostgreSQL from [here](https://www.postgresql.org/download/) or [install using Homebrew](#install-postgresql-using-homebrew). + +There are additional [setup help docs](https://github.com/ga4gh/vrs-python/tree/2.x/docs/setup_help) for additional assistance. + +### Install PostgreSQL using Homebrew + +1. Install Homebrew: See the [documentation](https://docs.brew.sh/Installation) for how to install. + +1. Update Homebrew: Make sure Homebrew is up-to-date by running: + + brew update + +1. Install PostgreSQL: Use the following command to install [PostgreSQL](https://formulae.brew.sh/formula/postgresql@14#default): + + brew install postgresql@14 + +1. Start PostgreSQL: Once the installation is complete, you can start the PostgreSQL service using: + + brew services start postgresql + +## Installing the VRS-Python package with pip + +Once PostgreSQL is installed, proceed with the following command to install the VRS-Python package: pip install 'ga4gh.vrs[extras]' From 2c68560f4d90a043d857ac1a7ef0afc5d4383fec Mon Sep 17 00:00:00 2001 From: korikuzma Date: Mon, 8 Jan 2024 20:03:15 -0500 Subject: [PATCH 4/5] docs: change wording --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d90f5de8..b802a9c1 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,7 @@ location. PostgreSQL is required for UTA. Ensure that PostgreSQL is installed on your system. You can download and install PostgreSQL from [here](https://www.postgresql.org/download/) or [install using Homebrew](#install-postgresql-using-homebrew). -There are additional [setup help docs](https://github.com/ga4gh/vrs-python/tree/2.x/docs/setup_help) for additional assistance. +There are [macOS docs](https://github.com/ga4gh/vrs-python/tree/2.x/docs/setup_help) for additional assistance. ### Install PostgreSQL using Homebrew From 0e7de25dc24b910a9c94e71cfce26f0c49c54c0d Mon Sep 17 00:00:00 2001 From: Kori Kuzma Date: Tue, 9 Jan 2024 04:36:08 -0800 Subject: [PATCH 5/5] docs: update vrs-python and vrs version correspondences --- README.md | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index b802a9c1..746d0c90 100644 --- a/README.md +++ b/README.md @@ -25,20 +25,29 @@ This repository contains several related components: # VRS-Python and VRS Version Correspondence 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: +therefore each ga4gh.vrs package on PyPI embeds a particular version of VRS. The +correspondences between the packages that are **currently maintained** 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-python tag/version | vrs branch | vrs version | +| --- | --- | --- | --- | +| [2.x](https://github.com/ga4gh/vrs-python/tree/2.x) _(default branch)_ | 2.x | [2.x](https://github.com/ga4gh/vrs/tree/2.x) | 2.x +| [1.x](https://github.com/ga4gh/vrs-python/tree/1.x) | 0.8.x | [1.x](https://github.com/ga4gh/vrs/tree/1.x) | 1.x | + +⚠ **Note: Only 2.x branch is being actively maintained. The 1.x branch will only be maintained for bug fixes.** ⚠ **Developers: See the development section below for recommendations for using submodules gracefully (and without causing problems for others!).** +## Previous VRS-Python and VRS Version Correspondence + +The correspondences between the packages that are **no longer maintained** may be summarized as: + +| vrs-python branch | vrs-python tag/version | vrs branch | vrs version | +| --- | --- | --- | --- | +| [0.6](https://github.com/ga4gh/vrs-python/tree/0.6) | 0.6.x | [1.1](https://github.com/ga4gh/vrs/tree/1.1) | 1.1.x | +| [0.7](https://github.com/ga4gh/vrs-python/tree/0.7) | 0.7.x | [1.2](https://github.com/ga4gh/vrs/tree/1.2) | 1.2.x | +| [0.9](https://github.com/ga4gh/vrs-python/tree/0.9) | 0.9.x | [metaschema-update](https://github.com/ga4gh/vrs/tree/metaschema-update) | N/A | + # Pre-requisite [Python 3.10](https://www.python.org/downloads/release/python-3100/)