Skip to content

Commit

Permalink
Merge pull request #188 from uc-cdis/chore/update-vlmd-validation
Browse files Browse the repository at this point in the history
Chore/update vlmd validation
  • Loading branch information
george42-ctds authored Jun 20, 2024
2 parents ad758f0 + 4dc2dd7 commit 46262f0
Show file tree
Hide file tree
Showing 20 changed files with 921 additions and 688 deletions.
12 changes: 6 additions & 6 deletions .secrets.baseline
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"exclude": {
"files": "^.secrets.baseline$",
"files": null,
"lines": null
},
"generated_at": "2024-06-06T20:34:12Z",
"generated_at": "2024-06-17T22:02:51Z",
"plugins_used": [
{
"name": "AWSKeyDetector"
Expand Down Expand Up @@ -468,17 +468,17 @@
],
"vlmd-submission-tools/poetry.lock": [
{
"hashed_secret": "5b240644452ed40dfe194673b7db6b641971c720",
"hashed_secret": "e1df343623dcc5d44e3a7da0e09ee4b0c980b52f",
"is_verified": false,
"line_number": 1221,
"line_number": 1519,
"type": "Hex High Entropy String"
}
],
"vlmd-submission-tools/tests/test_common_utils.py": [
{
"hashed_secret": "8318df9ecda039deac9868adf1944a29a95c7114",
"is_verified": false,
"line_number": 100,
"line_number": 102,
"type": "Secret Keyword"
}
],
Expand All @@ -494,7 +494,7 @@
{
"hashed_secret": "8318df9ecda039deac9868adf1944a29a95c7114",
"is_verified": false,
"line_number": 129,
"line_number": 163,
"type": "Secret Keyword"
}
]
Expand Down
302 changes: 300 additions & 2 deletions vlmd-submission-tools/poetry.lock

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions vlmd-submission-tools/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ frictionless = "^5.12.1"
parameterized = "^0.9.0"
pytest = "^7.4.2"
pytest-cov = "^4.1.0"
healdata-utils = "^0.5.1"
requests-mock = "^1.12.1"

[tool.poetry.dev-dependencies]

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name,description,type
participant_id,Unique identifier for participant,character
race,Self-reported race,integer
,,integer
hispanic,"Are you of Hispanic, Latino, or Spanish origin?",boolean
sex_at_birth,The self-reported sex of the participant/subject at birth,
SU4,During the past 30 days how many days did you use heroin (alone or mixed with other drugs)? ] [Write 0 days if no use],integer
pulse_rate,Heart rate measured at systemic artery,number
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"title": "Example VLMD",
"description": "This is an example",
"fields": [
{
"name": "participant_id",
"description": "Unique identifier for participant",
"type": "character"
},
{
"name": "race",
"description": "Self-reported race",
"type": "integer"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name title description type
participant_id Participant Id Unique identifier for participant character
race Race Self-reported race integer
age Age What is your age? (age at enrollment) integer
hispanic "Hispanic Latino or Spanish Origin" "Are you of Hispanic Latino or Spanish origin?" boolean
sex_at_birth Sex at Birth The self-reported sex of the participant/subject at birth string
SU4 Heroin Days Used During the past 30 days how many days did you use heroin (alone or mixed with other drugs)? ] [Write 0 days if no use] integer
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module,name,title,description,type,format,
,participant_id,Participant Id,Unique identifier for participant,string,,
,race,Race,Self-reported race,integer,,
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"title": "Example VLMD",
"description": "This is an example",
"fields": [
{
"name": "participant_id",
"title": "Participant Id",
"description": "Unique identifier for participant",
"type": "string"
},
{
"name": "race",
"title": "Race",
"description": "Self-reported race",
"type": "integer"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
name title description type
participant_id Participant Id Unique identifier for participant string
race Race Self-reported race integer
8 changes: 5 additions & 3 deletions vlmd-submission-tools/tests/test_common_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,16 @@ def test_check_mds_study_id(self, mocked_post):
hostname = "mycommons.planx-pla.net"
study_id = "my_study_id"
expected_data_dictionaries = {
"my first dictionary": "guid1",
"my second dictionary": "guid2"
"data_dictionaries" : {
"my first dictionary": "guid1",
"my second dictionary": "guid2"
}
}
mock_mds_response = MagicMock(requests.Response)
mock_mds_response.status_code = 200
mock_mds_response.json.return_value = {
"_guid_type": "discovery_metadata",
"data_dictionaries": expected_data_dictionaries
"variable_level_metadata": expected_data_dictionaries
}
mocked_post.return_value = mock_mds_response

Expand Down
68 changes: 0 additions & 68 deletions vlmd-submission-tools/tests/test_mapping_utils.py

This file was deleted.

Loading

0 comments on commit 46262f0

Please sign in to comment.