Skip to content

Commit

Permalink
Updating pathology gx expectations
Browse files Browse the repository at this point in the history
  • Loading branch information
Beatriz Saldana committed Oct 29, 2024
1 parent 38447dd commit 7099261
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
14 changes: 7 additions & 7 deletions gx_suite_definitions/pathology.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Create Expectation Suite for Biomarkers Data"
"# Create Expectation Suite for Pathology Data"
]
},
{
Expand All @@ -43,7 +43,7 @@
"metadata": {},
"outputs": [],
"source": [
"biomarkers_data_file = syn.get(\"syn63540269\").path"
"pathology_data_file = syn.get(\"syn63644533\").path"
]
},
{
Expand All @@ -59,11 +59,11 @@
"metadata": {},
"outputs": [],
"source": [
"df = pd.read_json(biomarkers_data_file)\n",
"df = pd.read_json(pathology_data_file)\n",
"nested_columns = ['points']\n",
"df = GreatExpectationsRunner.convert_nested_columns_to_json(df, nested_columns)\n",
"validator = context.sources.pandas_default.read_dataframe(df)\n",
"validator.expectation_suite_name = \"biomarkers\""
"validator.expectation_suite_name = \"pathology\""
]
},
{
Expand Down Expand Up @@ -96,7 +96,7 @@
"validator.expect_column_values_to_be_of_type(\"model\", \"str\")\n",
"validator.expect_column_values_to_not_be_null(\"model\")\n",
"# allows all alphanumeric characters, underscores, periods, and dashes\n",
"validator.expect_column_values_to_match_regex(\"type\", \"^[A-Za-z0-9\\s\\*_.-]+$\")\n"
"validator.expect_column_values_to_match_regex(\"type\", \"^[A-Za-z0-9\\s\\(\\)\\*_.-]+$\")\n"
]
},
{
Expand All @@ -109,7 +109,7 @@
"validator.expect_column_values_to_be_of_type(\"type\", \"str\")\n",
"validator.expect_column_values_to_not_be_null(\"type\")\n",
"# allows all alphanumeric characters, underscores, periods, and dashes\n",
"validator.expect_column_values_to_match_regex(\"type\", \"^[A-Za-z0-9\\s_.-]+$\")"
"validator.expect_column_values_to_match_regex(\"type\", \"^[A-Za-z0-9\\s\\(\\)\\*_.-]+$\")"
]
},
{
Expand All @@ -122,7 +122,7 @@
"validator.expect_column_values_to_be_of_type(\"units\", \"str\")\n",
"validator.expect_column_values_to_not_be_null(\"units\")\n",
"# allows all alphanumeric characters, underscores, periods, and dashes\n",
"validator.expect_column_values_to_match_regex(\"units\", \"^[A-Za-z0-9\\/\\s\\*_.-]+$\")"
"validator.expect_column_values_to_match_regex(\"units\", \"^[A-Za-z0-9\\s\\(\\)\\#\\/\\\\%*_.-]+$\")"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"expectation_type": "expect_column_values_to_match_regex",
"kwargs": {
"column": "type",
"regex": "^[A-Za-z0-9\\s_.-]+$"
"regex": "^[A-Za-z0-9\\s\\(\\)\\*_.-]+$"
},
"meta": {}
},
Expand Down Expand Up @@ -93,7 +93,7 @@
"expectation_type": "expect_column_values_to_match_regex",
"kwargs": {
"column": "units",
"regex": "^[A-Za-z0-9\\/\\s\\*_.-]+$"
"regex": "^[A-Za-z0-9\\s\\(\\)\\#\\/\\%*_.-]+$"
},
"meta": {}
},
Expand Down Expand Up @@ -162,4 +162,4 @@
"meta": {
"great_expectations_version": "0.18.1"
}
}
}

0 comments on commit 7099261

Please sign in to comment.