File tree Expand file tree Collapse file tree 4 files changed +6
-4
lines changed Expand file tree Collapse file tree 4 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 4444DATASET_INFO_FILENAME = 'dataset_info.json'
4545LICENSE_FILENAME = 'LICENSE'
4646METADATA_FILENAME = 'metadata.json'
47+ CHECKSUMS_FILENAME = 'checksums.tsv'
4748
4849# Filepath for mapping between TFDS datasets and PapersWithCode entries.
4950PWC_FILENAME = 'tfds_to_pwc_links.json'
Original file line number Diff line number Diff line change @@ -445,7 +445,7 @@ def _checksums_path(cls) -> Optional[epath.Path]:
445445 # * To save the checksums (in DownloadManager)
446446 if not cls .code_path :
447447 return None
448- new_path = cls .code_path .parent / "checksums.tsv"
448+ new_path = cls .code_path .parent / constants . CHECKSUMS_FILENAME
449449 # Checksums of legacy datasets are located in a separate dir.
450450 legacy_path = utils .tfds_path () / "url_checksums" / f"{ cls .name } .txt"
451451 if (
Original file line number Diff line number Diff line change 1717
1818import hashlib
1919import pathlib
20+ from tensorflow_datasets .core import constants
2021from tensorflow_datasets .core import utils
2122from tensorflow_datasets .core .download import checksums
2223
2324
2425def test_checksums (tmp_path : pathlib .Path ):
25- path = tmp_path / 'checksums.tsv'
26+ path = tmp_path / constants . CHECKSUMS_FILENAME
2627 url_infos = {
2728 'http://abc.org/data' : checksums .UrlInfo (
2829 checksum = 'abcd' ,
Original file line number Diff line number Diff line change @@ -211,8 +211,8 @@ def _create_dummy_data(info: utils.DatasetInfo) -> None:
211211
212212
213213def _create_checksum (info : utils .DatasetInfo ) -> None :
214- """Adds the `checksums.tsv` file."""
215- file_path = info .path / 'checksums.tsv'
214+ """Adds the checksum file."""
215+ file_path = info .path / constants . CHECKSUMS_FILENAME
216216 content = textwrap .dedent (f"""\
217217 # { info .todo } : If your dataset downloads files, then the checksums
218218 # will be automatically added here when running
You can’t perform that action at this time.
0 commit comments