darwin-py icon indicating copy to clipboard operation
darwin-py copied to clipboard

[DAR-1679][External] Made darwin-py ignore the .v7/metadata.json properties manifest when reading JSON annotation files

Open JBWilkie opened this issue 10 months ago • 2 comments

Problem

In a previous bug fix (DAR-1609) it was discovered that pulling a dataset release does not include the properties metadata file if one needs to be downloaded. This was fixed in that ticket. However, there are several functions in darwin-py that assume every JSON file in the annotations directory is annotation file. If there's a properties metadata file, this is no longer true, and this issues

Solution

  • 1: Identified everywhere where darwin-py reads annotation files from the annotations directory
  • 2: Ensure we ignore the .v7/metadata.json properties manifest in each case

Changelog

Made darwin-py ignore the .v7/metadata.json properties manifest when reading JSON annotation files

JBWilkie avatar Apr 22 '24 11:04 JBWilkie

Since we're doing the same glob() statement repeatedly with logic to avoid /.v7/ in filepaths, I can abstract this into a function and then add a unit test if it's deemed worthwhile

JBWilkie avatar Apr 22 '24 12:04 JBWilkie