- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 928
optimized the sort_loops in module.py and also improved readability #1148
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
Conversation
| Summary by CodeRabbit
 WalkthroughRefactors sort_loops in  Changes
 Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Pre-merge checks and finishing touches❌ Failed checks (1 warning)
 ✅ Passed checks (2 passed)
 ✨ Finishing touches
 🧪 Generate unit tests (beta)
 📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
 🧰 Additional context used📓 Path-based instructions (3)**/*.py📄 CodeRabbit inference engine (AGENTS.md) 
 Files: 
 nettacker/**/*.py📄 CodeRabbit inference engine (AGENTS.md) 
 Files: 
 nettacker/core/**📄 CodeRabbit inference engine (AGENTS.md) 
 Files: 
 ⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
 🔇 Additional comments (3)
 Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment  | 
| @pUrGe12 any updates on this ? | 
| LGTM, we'll let the maintainers take a look | 
| I am testing this PR and if all good will approve/merge soon | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Davda-James thanks for the PR!
It looks good for merging unless @securestep9's testing uncovers something unexpected. @pUrGe12 thanks for reviewing as well 👍
Just FYI:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
array variable naming could be better
| @securestep9 will change the variables names to be more self explanatory. | 
Head branch was pushed to by a user without write access
0eb9331    to
    d087916      
    Compare
  
    There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
- nettacker/core/module.py(1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.py
📄 CodeRabbit inference engine (AGENTS.md)
**/*.py: Use 4-space indents in Python code
Limit lines to 99 characters (ruff/ruff-format/isort profile=black)
Module and file names should use lower_snake_case
Function and variable names should use lower_snake_case
Class names should use PascalCase
Constants should use UPPER_SNAKE_CASE
Keep functions small and add type hints where practical
Files:
- nettacker/core/module.py
nettacker/**/*.py
📄 CodeRabbit inference engine (AGENTS.md)
Add docstrings for public APIs in the nettacker package
Files:
- nettacker/core/module.py
nettacker/core/**
📄 CodeRabbit inference engine (AGENTS.md)
Place core libraries under nettacker/core/
Files:
- nettacker/core/module.py
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: Test Docker 26.1.4-1ubuntu.24.04noble image build
- GitHub Check: Test Docker 26.0.0-1ubuntu.24.04noble image build
- GitHub Check: Test Docker 27.5.0-1ubuntu.24.04noble image build
- GitHub Check: Build package
- GitHub Check: Test Docker image
🔇 Additional comments (1)
nettacker/core/module.py (1)
122-139: Excellent refactoring—the three-bucket approach improves clarity.The variable names (
steps_without_dependencies,steps_with_temp_dependencies,steps_with_normal_dependencies) are self-explanatory and address the past review feedback about better naming. The logic correctly partitions steps based on dependency types and reconstructs them in the intended order.
| @Davda-James note that your commit is not verified and was rejected by the branch protection rule. Looks like you forgot to sign it? | 
faf7a2e    to
    baca7f5      
    Compare
  
    | 
 Signed it. | 
| @securestep9 closed this one and raised a new one with single commit. | 


Proposed change
Reafactoring sort_loops in module.py, made it more readable and optimized.
no separate issue was there for it, suggestion by @pUrGe12 in PR #1146
Type of change
Checklist
make pre-commit, it didn't generate any changesmake test, all tests passed locally