metadata_dictionary: Deduplicate extension-based file detection
Deduplicate extension-based file detection using SingleFileIntrinsicMapping.
There were some instances where it was missing and some where it wasn't inherited properly.
Furthermore, updated detect_metadata_files
to support regex in filename
.
Merge request reports
Activity
132 132 """Base class for all intrinsic metadata mappings that use a single file as input.""" 133 133 134 134 @property 135 def filename(self): 135 def filename(self) -> bytes: 136 136 """The .json file to extract metadata from.""" 137 137 raise NotImplementedError(f"{self.__class__.__name__}.filename") 138 138 139 139 @classmethod 140 140 def detect_metadata_files(cls, file_entries: List[DirectoryLsEntry]) -> List[Sha1]: 141 for entry in file_entries: 142 if entry["name"].lower() == cls.filename: 143 return [entry["sha1"]] 141 filename: bytes = cls.filename # type: ignore changed this line in version 2 of the diff
- Resolved by Kumar Shivendu
Jenkins job DCIDX/gitlab-builds #11 succeeded .
See Console Output and Coverage Report for more details.@vlorentz requesting your review on this :)
- Resolved by Kumar Shivendu
added 1 commit
- 7df846a9 - metadata_dictionary: Deduplicate extension-based file detection
Jenkins job DCIDX/gitlab-builds #18 failed .
See Console Output and Coverage Report for more details.- Resolved by Kumar Shivendu
added 1 commit
- 8138804f - metadata_dictionary: Declare filename as an attribute to fix mypy failure
Jenkins job DCIDX/gitlab-builds #19 failed .
See Console Output and Coverage Report for more details.added 4 commits
-
8138804f...0cc2a326 - 2 commits from branch
swh/devel:master
- 57b79680 - metadata_dictionary: Deduplicate extension-based file detection
- 3007c898 - metadata_dictionary: Declare filename as an attribute to fix mypy failure
-
8138804f...0cc2a326 - 2 commits from branch
Jenkins job DCIDX/gitlab-builds #20 succeeded .
See Console Output and Coverage Report for more details.mentioned in merge request !482