removing unused code
This commit is contained in:
@@ -304,18 +304,11 @@
|
|||||||
" self.dataFrame = DataFrameFilter().filterByCovid19(dataFrame)\n",
|
" self.dataFrame = DataFrameFilter().filterByCovid19(dataFrame)\n",
|
||||||
" self.batchCodeTableByCountryFactory = BatchCodeTableByCountryFactory(dataFrame)\n",
|
" self.batchCodeTableByCountryFactory = BatchCodeTableByCountryFactory(dataFrame)\n",
|
||||||
"\n",
|
"\n",
|
||||||
" def createInternationalLotTable(self):\n",
|
|
||||||
" internationalLotTable = self._createInternationalLotTable()\n",
|
|
||||||
" return internationalLotTable.sort_values(by = 'Severe reports', ascending = False)\n",
|
|
||||||
"\n",
|
|
||||||
" def createBatchCodeTableByCountry(self, country):\n",
|
" def createBatchCodeTableByCountry(self, country):\n",
|
||||||
" return self.batchCodeTableByCountryFactory.createBatchCodeTableByCountry(country)\n",
|
" return self.batchCodeTableByCountryFactory.createBatchCodeTableByCountry(country)\n",
|
||||||
"\n",
|
"\n",
|
||||||
" def createGlobalBatchCodeTable(self):\n",
|
" def createGlobalBatchCodeTable(self):\n",
|
||||||
" return self.createBatchCodeTableByCountry(None)\n",
|
" return self.createBatchCodeTableByCountry(None)\n"
|
||||||
"\n",
|
|
||||||
" def _createInternationalLotTable(self):\n",
|
|
||||||
" return SummationTableFactory.createSummationTableHavingSevereReportsColumn(self.dataFrame.groupby(self.dataFrame['COUNTRY']))\n"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -564,43 +557,6 @@
|
|||||||
"\n",
|
"\n",
|
||||||
"class InternationalLotTableFactoryTest(unittest.TestCase):\n",
|
"class InternationalLotTableFactoryTest(unittest.TestCase):\n",
|
||||||
"\n",
|
"\n",
|
||||||
" def test_createInternationalLotTable(self):\n",
|
|
||||||
" # Given\n",
|
|
||||||
" dataFrame = TestHelper.createDataFrame(\n",
|
|
||||||
" columns = ['DIED', 'L_THREAT', 'DISABLE', 'VAX_TYPE', 'VAX_MANU', 'VAX_LOT', 'VAX_DOSE_SERIES', 'SPLTTYPE', 'HOSPITAL', 'ER_VISIT', 'COUNTRY'],\n",
|
|
||||||
" data = [ [1, 0, 0, 'COVID19', 'MODERNA', '016M20A', '2', 'GBPFIZER INC2020486806', 0, 0, 'United Kingdom'],\n",
|
|
||||||
" [1, 0, 0, 'COVID19', 'MODERNA', '030L20A', '1', 'FRMODERNATX, INC.MOD20224', 0, 0, 'France'],\n",
|
|
||||||
" [1, 1, 1, 'COVID19', 'MODERNA', '030L20B', '1', 'FRMODERNATX, INC.MOD20224', 0, 0, 'France'],\n",
|
|
||||||
" [0, 0, 0, 'COVID19', 'MODERNA', '030L20B', '1', 'dummy', 0, 0, 'Unknown Country'],\n",
|
|
||||||
" [0, 0, 0, 'COVID19', 'MODERNA', '030L20B', '1', 123, 0, 0, 'Unknown Country']],\n",
|
|
||||||
" index = [\n",
|
|
||||||
" \"1048786\",\n",
|
|
||||||
" \"1048786\",\n",
|
|
||||||
" \"4711\",\n",
|
|
||||||
" \"0815\",\n",
|
|
||||||
" \"0816\"])\n",
|
|
||||||
" dataFrame = SevereColumnAdder.addSevereColumn(dataFrame)\n",
|
|
||||||
" internationalLotTableFactory = InternationalLotTableFactory(dataFrame)\n",
|
|
||||||
" \n",
|
|
||||||
" # When\n",
|
|
||||||
" internationalLotTable = internationalLotTableFactory.createInternationalLotTable()\n",
|
|
||||||
"\n",
|
|
||||||
" # Then\n",
|
|
||||||
" assert_frame_equal(\n",
|
|
||||||
" internationalLotTable,\n",
|
|
||||||
" TestHelper.createDataFrame(\n",
|
|
||||||
" columns = ['Adverse Reaction Reports', 'Deaths', 'Disabilities', 'Life Threatening Illnesses', 'Severe reports', 'Lethality'],\n",
|
|
||||||
" data = [ [2, 2, 1, 1, 2/2 * 100, 2/2 * 100],\n",
|
|
||||||
" [1, 1, 0, 0, 1/1 * 100, 1/1 * 100],\n",
|
|
||||||
" [2, 0, 0, 0, 0/2 * 100, 0/2 * 100]],\n",
|
|
||||||
" index = pd.Index(\n",
|
|
||||||
" [\n",
|
|
||||||
" 'France',\n",
|
|
||||||
" 'United Kingdom',\n",
|
|
||||||
" 'Unknown Country'\n",
|
|
||||||
" ],\n",
|
|
||||||
" name = 'COUNTRY')))\n",
|
|
||||||
"\n",
|
|
||||||
" def test_createBatchCodeTableByCountry(self):\n",
|
" def test_createBatchCodeTableByCountry(self):\n",
|
||||||
" # Given\n",
|
" # Given\n",
|
||||||
" dataFrame = TestHelper.createDataFrame(\n",
|
" dataFrame = TestHelper.createDataFrame(\n",
|
||||||
@@ -845,14 +801,6 @@
|
|||||||
" country = 'Global',\n",
|
" country = 'Global',\n",
|
||||||
" minADRsForLethality = minADRsForLethality)\n"
|
" minADRsForLethality = minADRsForLethality)\n"
|
||||||
]
|
]
|
||||||
},
|
|
||||||
{
|
|
||||||
"cell_type": "code",
|
|
||||||
"execution_count": null,
|
|
||||||
"id": "376b9193",
|
|
||||||
"metadata": {},
|
|
||||||
"outputs": [],
|
|
||||||
"source": []
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"metadata": {
|
"metadata": {
|
||||||
|
|||||||
Reference in New Issue
Block a user