-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from ga4gh/develop
Merge branch 'develop'
- Loading branch information
Showing
8 changed files
with
221 additions
and
405 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
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,9 +1,30 @@ | ||
language: python | ||
python: | ||
- 2.7 | ||
branches: | ||
only: | ||
- master | ||
- develop | ||
language: java | ||
dist: trusty | ||
sudo: false | ||
jdk: | ||
- oraclejdk8 | ||
env: | ||
- GH_URL=https://raw.githubusercontent.com VALIDATOR_URL=http://localhost:8080/validator/debug?url FILE_TO_VALIDATE=consent_code.yaml URL_TO_VALIDATE=$GH_URL/${TRAVIS_PULL_REQUEST_SLUG:-$TRAVIS_REPO_SLUG}/${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH}/$FILE_TO_VALIDATE | ||
before_install: | ||
# This setup will not be needed once the online version of validator-badge supports OAS 3.0. Until then we'll need to set up a local version. | ||
|
||
# build and start validator-badge | ||
- git clone --branch=v2.0.0 https://github.com/swagger-api/validator-badge.git | ||
- cd validator-badge | ||
- mvn package -q -DskipTests=true -Dmaven.javadoc.skip=true -B -V jetty:run & | ||
- cd .. | ||
- sleep 60 | ||
script: | ||
- nosetests -v $VIRTUAL_ENV/src/avro-schema-test-base | ||
# validate | ||
- echo "Validating $URL_TO_VALIDATE:" | ||
- VALIDATION_OUTPUT=`curl -sS "$VALIDATOR_URL=$URL_TO_VALIDATE"` | ||
|
||
# print validation errors | ||
- echo $VALIDATION_OUTPUT | ||
|
||
# check if the validation output ignoring warnings is an empty array | ||
- VALIDATION_ERROR_COUNT=`echo "$VALIDATION_OUTPUT" |jq -c '.schemaValidationMessages // [] | map(select(.level != "warning"))' |jq length` | ||
- test "$VALIDATION_ERROR_COUNT" == 0 | ||
notifications: | ||
slack: | ||
secure: CC5cismvKIZLHwwuPdBfJTlPddCpPzMyF2IQIZHCuDAkPNMWqmWU0osHn8V2cD/sReFBeOfJaj19gj2bzHbhBrKkttuSMMzLoR5LbXTfdviuJOzWP1g5kUg4Tm8jGdq+GdgxfpB1lL7gLD2TlD1Oa6HKMrF6s9PBUjJE6dZnli7ZE7aSOmAmoJ+JZP99Q3tcJiErrSP89Yp+G8/kv+IL6EYhoXRtgCYMoh45ECqx1hOopwjGVCjqrMYbJu0yEtKRtU9G2QV5zSqEaPNgOqrkz5yNNd7VWGks/AmcgsCPLvMRd7ruH5myfylqtDDznoXvmMyPUdQyZXngmN1VCuOWeHyd7BginvrQNiDJANbwwD+Xj4akX86rP0N/k7Q9osNEQU2138zG14S18yeN2E0vfTKxzVcJuIb660ujReycdKAr7NnKdXJZITtaJW91o2unh6Fu2Hs0jMW4DN5mhQWr/eGtVXagqDhjDiWM+VU96sJO/ZPrljiSaeFpUR5fNO3ZoYz8S1H5I9uZAmsN5aqTvMboCxd3m3n2bn5gy3u47j5jaLnOWFhktNiKg3M4WPupENfr827Lbq+xQeEJCqbcOVjxIRsJ72Q9esxQaIbYAbcDzppkFlesqFyVPiZSD/lmUKrk8y/I1zYn8lX7T19B3niUIH/7xJUmdnBVWnvWZe4= |
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 |
---|---|---|
@@ -1,19 +1,11 @@ | ||
# Consent Code Schemas [![Build Status](https://travis-ci.org/ga4gh/ga4gh-consent-policy.svg?branch=develop)](https://travis-ci.org/ga4gh/ga4gh-consent-policy) [![GitHub license](https://img.shields.io/badge/license-Apache%202-blue.svg)](https://raw.githubusercontent.com/ga4gh/ga4gh-consent-policy/develop/LICENSE) | ||
# Consent Code Schemas [![](https://travis-ci.org/ga4gh/ga4gh-consent-policy.svg?branch=develop)](https://travis-ci.org/ga4gh/ga4gh-consent-policy) [![](https://img.shields.io/badge/license-Apache%202-blue.svg)](https://raw.githubusercontent.com/ga4gh/ga4gh-consent-policy/develop/LICENSE) [![](https://raw.githubusercontent.com/ZenHubIO/support/master/zenhub-badge.png)](https://zenhub.com) | ||
|
||
Data model for the data use conditions based on consent codes as introduced in [Consent Codes: Upholding Standard Data Use Conditions](http://journals.plos.org/plosgenetics/article?id=10.1371/journal.pgen.1005772). | ||
|
||
## How to contribute | ||
|
||
Guidelines for contributing to this repository are listed in the [CONTRIBUTING.md](CONTRIBUTING.md) document. | ||
|
||
## How to build | ||
|
||
Prerequisites: Maven 3+, Java 1.6+. | ||
|
||
To generate Java code, run `mvn package` and check the output in the `target` directory. | ||
|
||
## How to test | ||
|
||
Prerequisites: Python 2.7 (incl. Pip 7+). | ||
|
||
Install dependencies with `pip install -r requirements.txt`. To run the test suite, use `nosetests -v`. | ||
Use [Swagger Validator Badge](https://github.com/swagger-api/validator-badge) to validate the YAML file. |
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,183 @@ | ||
openapi: 3.0.0 | ||
servers: [] | ||
info: | ||
version: "1.1.0" | ||
title: Consent Codes | ||
description: | | ||
Data use conditions based on consent codes have been divided into data use categories and requirements. Requirements are conditions that would require some form of additional agreement on the part of the data provider or data user or additional criteria in order for the data to be reused. Data use categories were further divided into primary and secondary categories. Each resource should fall into only one primary category, whereas a number of secondary categories and requirements may also be applied. | ||
Primary data use categories: | ||
<table> | ||
<tr> | ||
<th>Abbreviation</th> | ||
<th>Name</th> | ||
<th>Description</th> | ||
</tr> | ||
<tr> | ||
<td>NRES</td> | ||
<td>no restrictions</td> | ||
<td>No restrictions on data use.</td> | ||
</tr> | ||
<tr> | ||
<td>GRU(CC)</td> | ||
<td>general research use and clinical care</td> | ||
<td>For health/medical/biomedical purposes and other biological research, including the study of population origins or ancestry.</td> | ||
</tr> | ||
<tr> | ||
<td>HMB(CC)</td> | ||
<td>health/medical/biomedical research and clinical care</td> | ||
<td>Use of the data is limited to health/medical/biomedical purposes, does not include the study of population origins or ancestry.</td> | ||
</tr> | ||
<tr> | ||
<td>DS-[XX](CC)</td> | ||
<td>disease-specific research and clinical care</td> | ||
<td>Use of the data | ||
must be related to [disease].</td> | ||
</tr> | ||
<tr> | ||
<td>POA</td> | ||
<td>population origins/ancestry research</td> | ||
<td>Use of the data is limited to | ||
the study of population origins or ancestry.</td> | ||
</tr> | ||
</table> | ||
<br/> | ||
Secondary data use categories: | ||
<table> | ||
<tr> | ||
<th>Abbreviation</th> | ||
<th>Name</th> | ||
<th>Description</th> | ||
</tr> | ||
<tr> | ||
<td>RS-[XX]</td> | ||
<td>other research-specific restrictions</td> | ||
<td>Use of the data is limited to studies of [research type] (e.g., pediatric research).</td> | ||
</tr> | ||
<tr> | ||
<td>RUO</td> | ||
<td>research use only</td> | ||
<td>Use of data is limited to research purposes (e.g., does not include its use in clinical care).</td> | ||
</tr> | ||
<tr> | ||
<td>NMDS</td> | ||
<td>no “general methods” research</td> | ||
<td>Use of the data includes methods development research (e.g., development of software or algorithms) ONLY within the bounds of other data use limitations.</td> | ||
</tr> | ||
<tr> | ||
<td>GSO</td> | ||
<td>genetic studies only</td> | ||
<td>Use of the data is limited to genetic studies only (i.e., no research using only the phenotype data).</td> | ||
</tr> | ||
</table> | ||
<br/> | ||
Data use requirements: | ||
<table> | ||
<tr> | ||
<th>Abbreviation</th> | ||
<th>Name</th> | ||
<th>Description</th> | ||
</tr> | ||
<tr> | ||
<td>NPU</td> | ||
<td>not-for-profit use only</td> | ||
<td>Use of the data is limited to not-for-profit organizations.</td> | ||
</tr> | ||
<tr> | ||
<td>PUB</td> | ||
<td>publication required</td> | ||
<td>Requestor agrees to make results of studies using the data available to the larger scientific community.</td> | ||
</tr> | ||
<tr> | ||
<td>COL-[XX]</td> | ||
<td>collaboration required</td> | ||
<td>Requestor must agree to collaboration with the primary study investigator(s).</td> | ||
</tr> | ||
<tr> | ||
<td>RTN</td> | ||
<td>return data to database/resource</td> | ||
<td>Requestor must return derived/enriched data to the database/resource.</td> | ||
</tr> | ||
<tr> | ||
<td>IRB</td> | ||
<td>ethics approval required</td> | ||
<td>Requestor must provide documentation of local IRB/REC approval.</td> | ||
</tr> | ||
<tr> | ||
<td>GS-[XX]</td> | ||
<td>geographical restrictions</td> | ||
<td>Use of the data is limited to within [geographic region].</td> | ||
</tr> | ||
<tr> | ||
<td>MOR-[XX]</td> | ||
<td>publication moratorium/embargo</td> | ||
<td>Requestor agrees not to publish results of studies until [date].</td> | ||
</tr> | ||
<tr> | ||
<td>TS-[XX]</td> | ||
<td>time limits on use</td> | ||
<td>Use of data is approved for [x months].</td> | ||
</tr> | ||
<tr> | ||
<td>US</td> | ||
<td>user-specific restrictions</td> | ||
<td>Use of data is limited to use by approved users.</td> | ||
</tr> | ||
<tr> | ||
<td>PS</td> | ||
<td>project-specific restrictions</td> | ||
<td>Use of data is limited to use within an approved project.</td> | ||
</tr> | ||
<tr> | ||
<td>IS</td> | ||
<td>institution-specific restrictions</td> | ||
<td>Use of data is limited to use within an approved institution.</td> | ||
</tr> | ||
</table> | ||
contact: | ||
email: [email protected] | ||
license: | ||
name: Apache 2.0 | ||
url: 'http://www.apache.org/licenses/LICENSE-2.0.html' | ||
externalDocs: | ||
description: 'Consent Codes: Upholding Standard Data Use Conditions' | ||
url: 'http://journals.plos.org/plosgenetics/article?id=10.1371/journal.pgen.1005772' | ||
paths: {} | ||
components: | ||
schemas: | ||
ConsentCodeDataUse: | ||
type: object | ||
required: | ||
- primaryCategory | ||
- version | ||
properties: | ||
primaryCategory: | ||
$ref: '#/components/schemas/ConsentCodeDataUseCondition' | ||
secondaryCategories: | ||
type: array | ||
items: | ||
$ref: '#/components/schemas/ConsentCodeDataUseCondition' | ||
requirements: | ||
type: array | ||
items: | ||
$ref: '#/components/schemas/ConsentCodeDataUseCondition' | ||
version: | ||
type: string | ||
description: Version of the data use specification. | ||
example: 0.1 | ||
description: Data use of a resource based on consent codes. | ||
ConsentCodeDataUseCondition: | ||
type: object | ||
required: | ||
- code | ||
properties: | ||
code: | ||
type: string | ||
description: Consent code abbreviation. | ||
example: NRES | ||
description: | ||
type: string | ||
description: Description of the condition. | ||
description: Data use condition. |
Oops, something went wrong.