Repository navigation
Apply chained relative markers between order groups - #279
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #279 +/- ##
=======================================
Coverage 97.94% 97.94%
=======================================
Files 5 5
Lines 681 682 +1
Branches 144 144
=======================================
+ Hits 667 668 +1
Misses 4 4
Partials 10 10 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
mrbean-bremen
left a comment
Member
There was a problem hiding this comment.
Good catch, thanks! Will merge after the release notes are adapted.
| - with `--order-group-scope`, relative and dependency markers between modules | ||
| or classes are resolved in repeated passes, so a chain such as A after C, | ||
| B after A is now applied; previously only one pass was made and part of such | ||
| a chain could be ignored without a warning |
Member
There was a problem hiding this comment.
Please shorten this - no need to exactly describe the behavior before the fix; instead, add a link to the PR (as done in other entries) where the fix is described in detail.
Contributor
Author
There was a problem hiding this comment.
Thanks! I shortened the entry and added a link to the PR.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
GroupSorter.sorted_groups()repeats its passes while relative marks are left and the last pass resolved some, but it never recomputeslengthinside the loop, so it always stops after one pass.ItemList._apply_iterative()uses the same loop and does updatelength.move_item()skips a mark while the group it refers to still has a mark of its own pending, so the skipped mark can only be applied in a later pass.With
--order-group-scope=module,test_chain1.py::test_onemarkedafter="test_chain3.py::test_three"andtest_chain2.py::test_twomarkedafter="test_chain1.py::test_one", the modules run as chain2, chain3, chain1, with no warning. Classes behave the same with--order-group-scope=class, andbeforeand dependency markers are affected too.The loop now recomputes
lengthafter each pass. I added a module and a class case totests/test_order_group_scope_relative.pyand a changelog line.