Skip to content

Commit

Permalink
revert linting
Browse files Browse the repository at this point in the history
  • Loading branch information
BryonLewis committed May 20, 2024
1 parent 2e8343f commit bae7baf
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/blank.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ jobs:
name: Lint
if: ${{ matrix.target == 'web' }}
run: yarn lint
-
name: Lint templates
if: ${{ matrix.target == 'web' }}
run: yarn lint:templates
-
name: Run tests
if: ${{ matrix.target == 'web' }}
Expand Down
3 changes: 2 additions & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"dev:cli": "tsc -w -p tsconfig.cli.json & tsc-alias -w -p tsconfig.cli.json",
"divecli": "node ./bin/platform/desktop/backend/cli.js",
"lint": "vue-cli-service lint src/ dive-common/ platform/",
"lint:templates": "eslint --ext vue src/ dive-common/ platform/",
"test": "vue-cli-service test:unit src/ dive-common/ platform/"
},
"resolutions": {
Expand Down Expand Up @@ -106,7 +107,7 @@
"eslint": "^8.55.0",
"eslint-import-resolver-typescript": "^2.2.0",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-vue": "^9.19.2",
"eslint-plugin-vue": "^9.26.0",
"express": "^4.17.1",
"ffmpeg-ffprobe-static": "^4.4.0-rc.11",
"fs-extra": "^9.0.1",
Expand Down
19 changes: 14 additions & 5 deletions server/dive_utils/serializers/viame.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,6 @@ def load_csv_as_tracks_and_attributes(
) = _parse_row_for_tracks(row)

trackId, imageFile, _, _, _ = row_info(row)

if imageMap:
# validate image ordering if the imageMap is provided
imageName, _ = os.path.splitext(os.path.basename(imageFile))
Expand Down Expand Up @@ -334,6 +333,8 @@ def load_csv_as_tracks_and_attributes(
(
'Images were provided in an unexpected order '
'and dataset contains multi-frame tracks. '
f'featureFrame: {feature.frame} maxFeatureFrame: {maxFeatureFrame}'
f'TrackId: {trackId}'
)
)

Expand All @@ -359,15 +360,18 @@ def load_csv_as_tracks_and_attributes(
continue
k = index + 1
if k < len(filteredImages):
item_difference = foundImages[k]['csvFrame'] - item['csvFrame']
if (
item['csvFrame'] + 1 != filteredImages[k]['csvFrame']
or item['frame'] + 1 != filteredImages[k]['frame']
item['csvFrame'] + item_difference != filteredImages[k]['csvFrame']
or item['frame'] + item_difference != filteredImages[k]['frame']
):
# We have misaligned video sequences so we error out
raise ValueError(
(
'A subsampling of images were used with the CSV '
'but they were not sequential'
f'foundImage: {filteredImages[k]} item: {item}'
f'item difference: {item_difference}'
)
)
frameMapper[item['csvFrame']] = index
Expand Down Expand Up @@ -422,15 +426,20 @@ def load_csv_as_tracks_and_attributes(
for index, item in enumerate(foundImages):
k = index + 1
if k < len(foundImages):
# sometimes the frame difference isn't 1
item_difference = foundImages[k]['csvFrame'] - item['csvFrame']
if (
item['csvFrame'] + 1 != foundImages[k]['csvFrame']
or item['frame'] + 1 != foundImages[k]['frame']
item['csvFrame'] + item_difference != foundImages[k]['csvFrame']
or item['frame'] + item_difference != foundImages[k]['frame']
):
# We have misaligned video sequences so we error out
raise ValueError(
(
'Images were provided in an unexpected order '
'and dataset contains multi-frame tracks.'
f'foundImage: {foundImages[k]} item: {item}'
f'itemDifference: {item_difference}'

)
)

Expand Down

0 comments on commit bae7baf

Please sign in to comment.