refactoring

This commit is contained in:
frankknoll
2022-11-22 17:24:43 +01:00
parent b463c5e01e
commit 36a5733a17
3 changed files with 24 additions and 60 deletions

View File

@@ -10,7 +10,13 @@
"import pandas as pd\n",
"\n",
"pd.set_option('display.max_rows', 100)\n",
"pd.set_option('display.max_columns', None)"
"pd.set_option('display.max_columns', None)\n",
"\n",
"from VAERSFileDownloader import updateVAERSFiles\n",
"from datetime import datetime\n",
"from DateProvider import DateProvider\n",
"from InternationalVaersCovid19Provider import getInternationalVaersCovid19\n",
"from BatchCodeTableHtmlUpdater import updateBatchCodeTableHtmlFile"
]
},
{
@@ -20,9 +26,7 @@
"metadata": {},
"outputs": [],
"source": [
"from datetime import datetime\n",
"\n",
"print(datetime.now().strftime(\"%d.%m.%Y, %H:%M:%S Uhr\"))"
"print(datetime.now().strftime(\"%d.%m.%Y, %H:%M:%S Uhr\"))\n"
]
},
{
@@ -32,7 +36,6 @@
"metadata": {},
"outputs": [],
"source": [
"from DateProvider import DateProvider\n",
"dateProvider = DateProvider()\n",
"print(' lastUpdated:', dateProvider.getLastUpdated())\n",
"print('lastUpdatedDataSource:', dateProvider.getLastUpdatedDataSource()) \n",
@@ -59,17 +62,7 @@
"metadata": {},
"outputs": [],
"source": [
"pwd = getWorkingDirectory()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "501f6c7b",
"metadata": {},
"outputs": [],
"source": [
"pwd"
"getWorkingDirectory()"
]
},
{
@@ -83,45 +76,11 @@
{
"cell_type": "code",
"execution_count": null,
"id": "9ccc73b3",
"id": "a793dff0",
"metadata": {},
"outputs": [],
"source": [
"# FK-TODO: das Modell erst dann laden, wenn es wirklich gebraucht wird\n",
"from VAERSFileDownloader import downloadVAERSFileAndUnzip"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "9a9e4d1e",
"metadata": {},
"outputs": [],
"source": [
"if needsUpdate:\n",
" workingDirectory = getWorkingDirectory()\n",
" downloadVAERSFileAndUnzip('2022VAERSData.zip', workingDirectory)\n",
" downloadVAERSFileAndUnzip('NonDomesticVAERSData.zip', workingDirectory)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "2f0f9b4b",
"metadata": {},
"outputs": [],
"source": [
"from BatchCodeTableHtmlUpdater import updateBatchCodeTableHtmlFile"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "62132e68",
"metadata": {},
"outputs": [],
"source": [
"from InternationalVaersCovid19Provider import getInternationalVaersCovid19"
"updateVAERSFiles(needsUpdate, getWorkingDirectory())"
]
},
{
@@ -142,7 +101,7 @@
"metadata": {},
"outputs": [],
"source": [
"updateBatchCodeTableHtmlFile(internationalVaersCovid19)"
"updateBatchCodeTableHtmlFile(internationalVaersCovid19, batchCodeTableHtmlFile=\"../docs/batchCodeTable.html\")"
]
},
{