-
Notifications
You must be signed in to change notification settings - Fork 0
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 #5 from HDRUK/add/GWDM/1.0
Add/gwdm/1.0
- Loading branch information
Showing
34 changed files
with
2,498 additions
and
2 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,26 @@ | ||
name: Pytest | ||
|
||
on: [push] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Install schema module | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install setuptools | ||
python -m pip install -e . | ||
- name: Run pytest | ||
run: | | ||
cd hdr_schemata/tests/ | ||
pytest |
Empty 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,9 @@ | ||
from typing import Optional | ||
from pydantic import RootModel,constr | ||
|
||
#note: contructed as a string of max_length=100 | ||
# in the future we may want to limit this with Enums | ||
class DatasetType(RootModel): | ||
root: Optional[constr(min_length=2, max_length=100)] | ||
|
||
|
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,7 @@ | ||
from typing import Optional | ||
from pydantic import RootModel,constr | ||
|
||
class LongAbstractText(RootModel): | ||
root: Optional[constr(min_length=5, max_length=5000)] | ||
|
||
|
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,7 @@ | ||
from typing import Optional | ||
from pydantic import RootModel,constr | ||
|
||
class ShortTitle(RootModel): | ||
root: Optional[constr(min_length=2, max_length=100)] | ||
|
||
|
6 changes: 6 additions & 0 deletions
6
hdr_schemata/definitions/HDRUK/TwoHundredFiftyFiveCharacters.py
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,6 @@ | ||
from pydantic import RootModel, constr | ||
|
||
class TwoHundredFiftyFiveCharacters(RootModel): | ||
root: constr(min_length=2, max_length=255) | ||
|
||
|
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,126 @@ | ||
{ | ||
"required": { | ||
"gatewayId": "1234", | ||
"gatewayPid": "5124f2", | ||
"issued": "2020-08-05T14:35:59Z", | ||
"modified": "2021-01-28T14:15:46Z", | ||
"revisions": [ | ||
{ | ||
"version": "1.0.0", | ||
"url": "https://d5faf9c6-6c34-46d7-93c4-7706a5436ed9" | ||
}, | ||
{ | ||
"version": "2.0.0", | ||
"url": "https://a7ddefbd-31d9-4703-a738-256e4689f76a" | ||
}, | ||
{ | ||
"version": "0.0.1", | ||
"url": "https://9e798632-442a-427b-8d0e-456f754d28dc" | ||
}, | ||
{ | ||
"version": "2.1.1", | ||
"url": "https://a7ddefbd-31d9-4703-a738-256e4689f76a" | ||
} | ||
] | ||
}, | ||
"summary": { | ||
"abstract": "Publications that mention HDR-UK (or any variant thereof) in Acknowledgements or Author Affiliations", | ||
"contactPoint": "[email protected]", | ||
"keywords": "Preprints,Papers,HDR UK", | ||
"controlledKeywords": "Papers", | ||
"datasetType": "list of papers", | ||
"description": "Publications that mention HDR-UK (or any variant thereof) in Acknowledgements or Author Affiliations\n\nThis will include:\n- Papers\n- COVID-19 Papers\n- COVID-19 Preprint", | ||
"doiName": "10.1093/ije/dyx196", | ||
"shortTitle": "HDR UK Papers & Preprints", | ||
"title": "Publications that mention HDR-UK (or any variant thereof) in Acknowledgements or Author Affiliations", | ||
"publisher": { | ||
"publisherName": "HEALTH DATA RESEARCH UK" | ||
} | ||
}, | ||
"coverage": { | ||
"pathway": "NOT APPLICABLE", | ||
"physicalSampleAvailability": "NOT AVAILABLE", | ||
"spatial": "https://www.geonames.org/countries/GB/united-kingdom.html", | ||
"followup": "UNKNOWN", | ||
"typicalAgeRange": "0-0" | ||
}, | ||
"provenance": { | ||
"origin": { | ||
"purpose": "OTHER", | ||
"source": "MACHINE GENERATED", | ||
"collectionSituation": "OTHER" | ||
}, | ||
"temporal": { | ||
"endDate": "2022-04-30", | ||
"startDate": "2020-03-31", | ||
"timeLag": "NOT APPLICABLE", | ||
"accrualPeriodicity": "DAILY", | ||
"distributionReleaseDate": "2020-11-27" | ||
} | ||
}, | ||
"accessibility": { | ||
"access": { | ||
"deliveryLeadTime": "OTHER", | ||
"jurisdiction": "GB-ENG", | ||
"dataController": "HDR UK", | ||
"dataProcessor": "HDR UK", | ||
"accessRights": "https://raw.githubusercontent.com/HDRUK/papers/master/LICENSE", | ||
"accessService": "https://github.com/HDRUK/papers", | ||
"accessRequestCost": "Free" | ||
}, | ||
"usage": { | ||
"dataUseLimitation": "GENERAL RESEARCH USE", | ||
"dataUseRequirement": "RETURN TO DATABASE OR RESOURCE", | ||
"resourceCreator": "HDR UK Science Team" | ||
}, | ||
"formatAndStandards": { | ||
"vocabularyEncodingSchemes": "OTHER", | ||
"conformsTo": "OTHER", | ||
"languages": "en", | ||
"formats": "CSV,JSON" | ||
} | ||
}, | ||
"linkage": { | ||
"isGeneratedUsing": "something", | ||
"dataUses": "dunno", | ||
"isReferenceIn": "10.5281/zenodo.326615", | ||
"tools": "https://github.com/HDRUK/papers", | ||
"datasetLinkage": { | ||
"isDerivedFrom": "https://web.www.healthdatagateway.org/dataset/fd8d0743-344a-4758-bb97-f8ad84a37357", | ||
"isPartOf": "NOT APPLICABLE", | ||
"isMemberOf": "blah", | ||
"linkedDatasets": "https://web.www.healthdatagateway.org/dataset/fd8d0743-344a-4758-bb97-f8ad84a37357" | ||
}, | ||
"investigations": "https://github.com/HDRUK/papers" | ||
}, | ||
"observations": [ | ||
{ | ||
"observedNode": "FINDINGS", | ||
"measuredValue": 575, | ||
"observationDate": "2020-11-27", | ||
"measuredProperty": "Count", | ||
"disambiguatingDescription": "Number of papers with affiliation and/or acknowledgement to HDR UK" | ||
} | ||
], | ||
"structuralMetadata": [ | ||
{ | ||
"name": "table1", | ||
"description": "this is table 1", | ||
"columns": [ | ||
{ | ||
"name": "column1", | ||
"description": "this is column1", | ||
"dataType": "String", | ||
"sensitive": false, | ||
"values": [ | ||
{ | ||
"name": "value", | ||
"description": "this is value1", | ||
"frequency":50 | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |
File renamed without changes.
Oops, something went wrong.