-
Notifications
You must be signed in to change notification settings - Fork 257
[FIX][pyoutline] Compact frame range layer #2509
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
anton-ubi
wants to merge
2
commits into
AcademySoftwareFoundation:master
Choose a base branch
from
Ubisoft-Helix-MTL:fix/compact-frame-range-layer
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| 1.30 | ||
| 1.31 |
10 changes: 10 additions & 0 deletions
10
cuebot/src/main/resources/conf/ddl/postgres/migrations/V48__increase_layer_range_size.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| -- Increase the size of layer.str_range and layer.str_cmd. | ||
| -- | ||
| -- A layer's range was VARCHAR(4000), which a fully enumerated frame list | ||
| -- (rather than a compact "start-end" range) can exceed for a job with a | ||
| -- few thousand frames, rolling back the job launch. str_cmd is widened for | ||
| -- the same reason: a command built from many joined paths can also exceed | ||
| -- 4000 characters. | ||
|
|
||
| ALTER TABLE layer ALTER COLUMN str_range TYPE text; | ||
| ALTER TABLE layer ALTER COLUMN str_cmd TYPE text; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| #!/usr/bin/env python | ||
|
|
||
| # Copyright Contributors to the OpenCue Project | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| """ | ||
| Tests for the outline.util module. | ||
| """ | ||
|
|
||
| import unittest | ||
|
|
||
| import outline.util | ||
|
|
||
|
|
||
| class CompactFrameRangeTests(unittest.TestCase): | ||
|
|
||
| """Tests for outline.util.compact_frame_range.""" | ||
|
|
||
| def test_empty(self): | ||
| self.assertEqual('', outline.util.compact_frame_range([])) | ||
|
|
||
| def test_single_frame(self): | ||
| self.assertEqual('5', outline.util.compact_frame_range([5])) | ||
|
|
||
| def test_contiguous_range(self): | ||
| self.assertEqual( | ||
| '1001-2301', outline.util.compact_frame_range(list(range(1001, 2302)))) | ||
|
|
||
| def test_non_contiguous_range(self): | ||
| self.assertEqual( | ||
| '1-3,10,20-22', outline.util.compact_frame_range([1, 2, 3, 10, 20, 21, 22])) | ||
|
|
||
| def test_out_of_order_frames_are_not_regrouped(self): | ||
| # Grouping is based on the input's position, not numeric order, so a | ||
| # descending or shuffled input is not treated as a run. | ||
| self.assertEqual('5,4,3', outline.util.compact_frame_range([5, 4, 3])) | ||
|
|
||
| def test_duplicate_frames_are_preserved(self): | ||
| self.assertEqual('1-2,1', outline.util.compact_frame_range([1, 2, 1])) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.