-
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.
- Loading branch information
Showing
146 changed files
with
14,152 additions
and
3,054 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "src/vrs-protobuf"] | ||
path = src/vrs-protobuf | ||
url = https://github.com/ga4gh/vrs-protobuf.git |
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 |
---|---|---|
@@ -1 +1 @@ | ||
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.6.2/apache-maven-3.6.2-bin.zip | ||
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.8.1/apache-maven-3.8.1-bin.zip |
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 |
---|---|---|
@@ -0,0 +1,79 @@ | ||
========= | ||
Changelog | ||
========= | ||
|
||
1.0.0 to 2.0 | ||
-------------- | ||
|
||
This is no an exhaustive list of changes, but highlights the most important additions and breaking changes. | ||
|
||
Phenopacket | ||
~~~~~~~~~~~ | ||
- Removed `genes` and `variant` fields. These should be sent as part of an `Interpretation`. | ||
|
||
|
||
Biosample | ||
~~~~~~~~~~~ | ||
- Removed `variant` field. These should be sent as part of an `Interpretation`. | ||
|
||
|
||
TimeElement | ||
~~~~~~~~~~~ | ||
- Added a new `TimeElement` message to wrap all the previous `oneof` in `Individual`, `Biosample`, `Disease`, `PhenotypicFeature` | ||
|
||
.. code-block:: | ||
message TimeElement { | ||
oneof element { | ||
GestationalAge gestational_age = 6; | ||
Age age = 1; | ||
AgeRange age_range = 2; | ||
OntologyClass ontology_class = 3; | ||
google.protobuf.Timestamp timestamp = 4; | ||
TimeInterval interval = 5; | ||
} | ||
} | ||
GestationalAge | ||
~~~~~~~~~~~~~~ | ||
- Added new `GestationalAge` message for pre-natal individuals and samples | ||
|
||
|
||
Individual | ||
~~~~~~~~~~ | ||
- Replaced oneof `age_at_collection` with new `TimeElement` message | ||
- Added new `OntologyClass` `gender` field | ||
- Added new `VitalStatus` field | ||
|
||
|
||
VitalStatus | ||
~~~~~~~~~~~ | ||
- Added new message for capturing the vital status of an individual | ||
|
||
|
||
PhenotypicFeature | ||
~~~~~~~~~~~~~~~~~ | ||
- Replaced oneof `onset` with new `TimeElement` message | ||
|
||
|
||
Disease | ||
~~~~~~~~~~~~~~~~~ | ||
- Replaced oneof `onset` with new `TimeElement` message | ||
|
||
|
||
Measurement | ||
~~~~~~~~~~~ | ||
|
||
- Added new `Measurement` message for capturing quantitative, ordinal (e.g., absent/present), or categorical measurements. This element is available as a repeated field in the `Phenopacket` and `Biosample` top-level elements. | ||
|
||
|
||
MedicalAction | ||
~~~~~~~~~~~~~ | ||
|
||
- Added new `MedicalAction` to capture medications, procedures, other actions taken for clinical management. This element is available as a repeated field in the `Phenopacket`. | ||
|
||
|
||
Interpretation | ||
~~~~~~~~~~~~~~ | ||
|
||
- `Interpretation` is now a sub-element of a `Phenopacket`, rather than an enclosing element. The change allows for better semantics on the `Gene` and `Variant` types and their relationship to an `Individual` or `Biosample` in the context of a `Diagnosis` based on a `GenomincInterpretation`. |
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
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
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 |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# Create Temporary Destination | ||
# Phenopackets folder | ||
TEMP_DIRECTORY=$(mktemp -d) | ||
echo "Building phenopacket distribution files in temporary directory at $TEMP_DIRECTORY" | ||
TEMP_DIRECTORY_PYTHON_MODULE="$TEMP_DIRECTORY/phenopackets" | ||
TEMP_DIRECTORY_TESTS_MODULE="$TEMP_DIRECTORY/tests" | ||
TEMP_DIRECTORY_VIRTUAL_ENV="$TEMP_DIRECTORY/phenopackets-venv" | ||
declare -a pyfiles=("base" "phenopackets" "biosample" "disease" "genome" "individual" "interpretation" "medical_action" "measurement" "meta_data" "pedigree" "phenotypic_feature" "vrsatile") | ||
# Functions | ||
createInitFile(){ | ||
echo "import pkg_resources" >> "$TEMP_DIRECTORY/phenopackets/__init__.py" | ||
echo "__version__ = pkg_resources.get_distribution('phenopackets').version" >> "$TEMP_DIRECTORY/phenopackets/__init__.py" | ||
for i in "${pyfiles[@]}" | ||
do | ||
echo "from .${i}_pb2 import *" >> "$TEMP_DIRECTORY/phenopackets/__init__.py" | ||
done | ||
} | ||
|
||
replaceImports(){ | ||
for i in "${pyfiles[@]}" | ||
do | ||
sed -i 's/from phenopackets.schema.v2.core/from . /g' "$TEMP_DIRECTORY_PYTHON_MODULE/${i}_pb2.py" | ||
sed -i 's/from ga4gh.vrsatile.v1/from . /g' "$TEMP_DIRECTORY_PYTHON_MODULE/${i}_pb2.py" | ||
sed -i 's/from ga4gh.vrs.v1/from . /g' "$TEMP_DIRECTORY_PYTHON_MODULE/${i}_pb2.py" | ||
done | ||
} | ||
|
||
createVirtualEnvironment(){ | ||
echo "Creating Python virtual environment at ${1}" | ||
python3 -m venv "${1}" &> /dev/null | ||
if [ ${?} = 1 ]; then | ||
echo "Setup of Python virtual environment using 'python3 -m venv' failed. Trying 'virtualenv'" | ||
virtualenv "${1}" &> /dev/null | ||
fi | ||
if [ ${?} = 1 ]; then | ||
echo "Deployment FAILED. Could not create Python virtual environment" | ||
exit 1; | ||
fi | ||
echo "Virtual environment created successfully"; | ||
} | ||
|
||
# Create python module | ||
mkdir $TEMP_DIRECTORY_PYTHON_MODULE | ||
createInitFile | ||
cp ./target/generated-sources/protobuf/python/phenopackets/schema/v2/phenopackets_pb2.py $TEMP_DIRECTORY_PYTHON_MODULE | ||
cp ./target/generated-sources/protobuf/python/phenopackets/schema/v2/core/* $TEMP_DIRECTORY_PYTHON_MODULE | ||
cp ./target/generated-sources/protobuf/python/ga4gh/vrsatile/v1/vrsatile_pb2.py $TEMP_DIRECTORY_PYTHON_MODULE | ||
cp ./target/generated-sources/protobuf/python/ga4gh/vrs/v1/vrs_pb2.py $TEMP_DIRECTORY_PYTHON_MODULE | ||
replaceImports | ||
# Create tests module | ||
mkdir $TEMP_DIRECTORY_TESTS_MODULE | ||
cp ./src/test/python/* $TEMP_DIRECTORY_TESTS_MODULE | ||
# Copy Packaging files | ||
cp requirements.txt setup.py pom.xml LICENSE README.rst $TEMP_DIRECTORY | ||
|
||
# Create Python venv in virtual directory | ||
createVirtualEnvironment $TEMP_DIRECTORY_VIRTUAL_ENV | ||
cd $TEMP_DIRECTORY || { echo "Deployment FAILED. Couldn't cd to temp directory" ; exit 1; } | ||
# shellcheck disable=SC1090 | ||
source "$TEMP_DIRECTORY_VIRTUAL_ENV/bin/activate" | ||
pip install -r "$TEMP_DIRECTORY/requirements.txt" | ||
# Dependencies for building/deploying | ||
python3 -m pip install setuptools wheel twine || { echo "Deployment FAILED. Failed to install python dependencies" ; exit 1; } | ||
# Test | ||
pip install -e . | ||
python3 setup.py test || { echo "Deployment FAILED. Unittest Failure" ; exit 1; } | ||
# Build | ||
python3 setup.py sdist bdist_wheel || { echo "Deployment FAILED. Building python package" ; exit 1; } | ||
|
||
# Deploy - Remove --repository testpypi flag for production. | ||
if [ $1 = "release-prod" ]; then | ||
python3 -m twine upload dist/* | ||
elif [ $1 = "release-test" ]; then | ||
python3 -m twine upload --repository testpypi dist/* | ||
else | ||
echo "Python Release was prepared successfully. No release argument provided, use one of [release-prod, release-test] to make the production/test release." | ||
fi | ||
|
||
|
||
|
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
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
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.wy-nav-content { | ||
max-width: 1000px !important; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{% extends "!layout.html" %} | ||
{% block extrahead %} | ||
<link href="{{ pathto("_static/style.css", True) }}" rel="stylesheet" type="text/css"> | ||
{% endblock %} |
Oops, something went wrong.