From 1600123e6f48d41b01d4b6f10316926fd90b9199 Mon Sep 17 00:00:00 2001 From: Kori Kuzma Date: Tue, 9 Jan 2024 04:40:40 -0800 Subject: [PATCH 1/4] cicd: update branch name for release (#319) --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fd6a4601..6bface85 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,7 +22,7 @@ jobs: name: Build distribution runs-on: ubuntu-latest needs: get_branch - if: needs.get_branch.outputs.branch_name == '2-alpha' + if: needs.get_branch.outputs.branch_name == '2.x' steps: - uses: actions/checkout@v4 - name: Set up Python From 6f285d950fb91a07134bef4115e9881abcd07dc6 Mon Sep 17 00:00:00 2001 From: Kori Kuzma Date: Tue, 9 Jan 2024 04:41:16 -0800 Subject: [PATCH 2/4] chore: update submodules (#320) * Now points to vrs 2.x branch --- .gitmodules | 2 +- submodules/vrs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 416af4ac..d56ef359 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ [submodule "submodules/vrs"] path = submodules/vrs url = https://github.com/ga4gh/vrs.git - branch = 2.0-alpha + branch = 2.x diff --git a/submodules/vrs b/submodules/vrs index 0c9498d4..86067b81 160000 --- a/submodules/vrs +++ b/submodules/vrs @@ -1 +1 @@ -Subproject commit 0c9498d4eae1e868ac0b49b7e480fd6a3d67468c +Subproject commit 86067b81f5c096bbf80b22040ec84eede8ac4138 From 328b8dca4b23cddb3656c9479fbaafa40f951c48 Mon Sep 17 00:00:00 2001 From: Kori Kuzma Date: Tue, 9 Jan 2024 04:42:29 -0800 Subject: [PATCH 3/4] docs: update uta docker image in readme (#323) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 06e80323..866c111f 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ Check that the containers are running: $ docker ps CONTAINER ID IMAGE // NAMES 86e872ab0c69 biocommons/seqrepo-rest-service:latest // vrs-python_seqrepo-rest-service_1 - a40576b8cf1f biocommons/uta:uta_20180821 // vrs-python_uta_1 + a40576b8cf1f biocommons/uta:uta_20210129b // vrs-python_uta_1 Depending on your network and host, the _first_ run is likely to take 5-15 minutes in order to download and install data. Subsequent startups should be From 5386d5c26361e23f62fab63a3683f5dfa25932c9 Mon Sep 17 00:00:00 2001 From: Kori Kuzma Date: Tue, 9 Jan 2024 04:47:30 -0800 Subject: [PATCH 4/4] docs: change order in readme (#294) (#321) * Order change in readme * Fixed readme order * Added venv changes * Readme changes Co-authored-by: Shivang Bagri <61118650+sivangbagri@users.noreply.github.com> --- README.md | 96 ++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 59 insertions(+), 37 deletions(-) diff --git a/README.md b/README.md index 866c111f..618cb182 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