Fixing negative Coordinates in polygons #1145
Conversation
| // Adding in some ingest pairs | ||
| type testPairs = [string[], MultiTrackRecord, Record<string, Attribute>]; | ||
|
|
||
| const testData: testPairs[] = fs.readJSONSync('../testutils/viame.spec.json'); | ||
| const images: Record<string, string> = {}; | ||
| const imageList = Array.from(Array(10).keys()); | ||
| imageList.shift(); //remove 0.png | ||
| // eslint-disable-next-line no-return-assign | ||
| imageList.forEach((item) => images[`${item}.png`] = ''); | ||
|
|
||
| type TestKey = string | 'annotations.csv'; | ||
| const fileSystemData: Record<string, Record<string, string>> = { }; | ||
| testData.forEach((triplet, index) => { | ||
| fileSystemData[`test${index}`] = { | ||
| ...images, | ||
| 'annotations.csv': triplet[0].join('\n'), | ||
| }; | ||
| }); |
There was a problem hiding this comment.
This section is a little hard to read. You seem to be preparing some data strictures to be used by tests, but I don't know where this information is coming from.
- What is
imageList? Where did that come from? - What is going on with
shift() - In general, what is being prepared in this section, and what does it have to match up with?
There was a problem hiding this comment.
I did this because while we had the viame serializer test with the attributes that was passing. We also had an invidiual test of attributes in attributes.spec.ts that was passing. We didn't have a test that made sure these were hooked up together and working properly. This is how we were getting pipelines that could run without having the attributes show up in the meta.json. So this is running a fuller test from loading the images/annotations.csv from a mockfs directory so it ensures that viame serializer and the attributes processor are working together and producing the desired meta.json outcome. Hopefully my newer comments cleared it up a bit.
* fixes-993 * Adding tests and other regexes * unifying testing * adding in meta field to python * Adding in meta attributes test * fix image name for tests * fixing ordering of viame.spec.json * No keyframe or interpolate defaults (#1155) * adding clarification/documentation to unit test Co-authored-by: Brandon Davis <git@subdavis.com>
fixes #993
fixes #1152
-specifiers to the RegEx for polygon. Decided it should be added to head tail points as well and did it in both desktop and python.fishLengthwas always set to-1on Node but set toNonein Python so I made it so both will set it toNone/undefinedif it equals-1meta:{}attribute that was never used. Python didn't read in or create this attribute so I removed the automatic creation from the node version. I added themeta: Optional[Dict[str, Any]]to make sure that the type specifications between the two were the same.interpolate:falseandkeyframe:true. I added both of these to the Node version so there is parity.1152 Fix (attributes were not loading properly)
common.ts-meta.attributes = processed.attributes;should fix this. It wasn't loading the attributes into the metafile so they weren't being populated in the interface.common.spec.tsto do a sort of end to end loading of folder and check the attributes. This is like above where I use theviame.spec.jsonto do this.