refactoring
This commit is contained in:
@@ -9,9 +9,9 @@ class HistogramDescriptionPersister:
|
|||||||
self.directory = directory
|
self.directory = directory
|
||||||
|
|
||||||
def saveHistogramDescriptionsForBatchcodes(self, batchcodes, dictByBatchcodeTable):
|
def saveHistogramDescriptionsForBatchcodes(self, batchcodes, dictByBatchcodeTable):
|
||||||
for batchcode in batchcodes:
|
for count, batchcode in enumerate(batchcodes, start = 1):
|
||||||
histogramDescription = self._getHistogramDescriptionForBatchcode(batchcode, dictByBatchcodeTable)
|
histogramDescription = self._getHistogramDescriptionForBatchcode(batchcode, dictByBatchcodeTable)
|
||||||
print('saving', batchcode)
|
print(f'{count}/{len(batchcodes)}: saving {batchcode}')
|
||||||
IOUtils.saveDictAsJson(
|
IOUtils.saveDictAsJson(
|
||||||
histogramDescription,
|
histogramDescription,
|
||||||
f'{self.directory}/{batchcode}.json')
|
f'{self.directory}/{batchcode}.json')
|
||||||
|
|||||||
@@ -192,16 +192,6 @@
|
|||||||
"histogramDescriptionPersister.saveHistogramDescriptionsForBatchcodes(batchcodes[:100], dictByBatchcodeTable)"
|
"histogramDescriptionPersister.saveHistogramDescriptionsForBatchcodes(batchcodes[:100], dictByBatchcodeTable)"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"cell_type": "code",
|
|
||||||
"execution_count": null,
|
|
||||||
"id": "ab4ccc60",
|
|
||||||
"metadata": {},
|
|
||||||
"outputs": [],
|
|
||||||
"source": [
|
|
||||||
"batchcodes[:10]"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": null,
|
"execution_count": null,
|
||||||
|
|||||||
Reference in New Issue
Block a user