ONSdigital / dp-python-tools

Simple reusable python resources for digital publishing.
MIT License
1 stars 0 forks source link

5 local directory store 1 #21

Closed Shannon95 closed 7 months ago

Shannon95 commented 7 months ago

What

Pull request for feedback on the implementation of several new methods in the LocalDirectoryStore, mainly has_lone_file_matching, save_lone_file_matching, and get_lone_matching_json_as_dict

Note: A method for retrieving file names of multiple matching files from a directory has been added in local.py named _files_that_match_pattern however this is currently unused, I feel there is potential for it but felt reluctant to change the existing implementations of methods since they made sense to me. If you see a place where this method could be used to help file matching/retrieval do point it out. - Nick

How to review

Check the methods implemented covers everything that is required.

Check the unit tests and review coverage/testing methods.

Do note the comment in line 90 of local.py as this asks about the implementation of the exception being raised if the get_file_names method should return None. Do we want this scenario to raise the error like it currently does, or to just fail silently and do nothing?

Who can review

Anyone but Nick and Shannon.