Finish building and return shard records.
(self)
| 170 | self.curr_records = [] |
| 171 | |
| 172 | def finish(self): |
| 173 | """Finish building and return shard records.""" |
| 174 | self.commit() |
| 175 | for idx in self.updated_shards: |
| 176 | full_path = os.path.join(self.cache_dir, self.shard_records[idx]["dataPath"]) |
| 177 | self.shard_records[idx]["md5sum"] = _calculate_md5(full_path) |
| 178 | return self.shard_records |
| 179 | |
| 180 | def _commit_internal(self, data, records): |
| 181 | data_path = f"{self.prefix}_{self.counter}.bin" |
no test coverage detected