-
Notifications
You must be signed in to change notification settings - Fork 13
fix: consider config.yml as configuration filename #85
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
📝 WalkthroughWalkthroughThis pull request updates the deployment process by enhancing configuration file handling. The Changes
Sequence Diagram(s)sequenceDiagram
participant U as User
participant WD as WorkflowDeployer
participant FS as FileSystem
participant TR as Template Renderer
U->>WD: deploy_snakefile(tmpdir, name, config)
WD->>FS: Check if "config.yaml" exists
alt "config.yaml" exists
FS-->>WD: "config.yaml" found
else Not found
WD->>FS: Check if "config.yml" exists
alt "config.yml" exists
FS-->>WD: "config.yml" found
else Not found
WD-->>WD: Default to "config.yaml"
end
end
WD->>TR: Render template with selected config path
TR-->>WD: Rendered Snakefile
WD-->>U: Return deployment result
Tip ⚡🧪 Multi-step agentic review comment chat (experimental)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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: 0
🧹 Nitpick comments (1)
snakedeploy/deploy.py (1)
214-223: Good implementation for supporting both config file formats.The implementation correctly checks for both
config.yamlandconfig.ymlfiles, with a sensible fallback to the defaultconfig.yamlif neither is found. This approach maintains backward compatibility while adding support for the additional format.Consider adding a brief comment explaining the fallback logic - why we default to
config.yamlwhen neither file exists (likely because a dummy config.yaml will be created indeploy_config).
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
snakedeploy/deploy.py(2 hunks)snakedeploy/templates/use_module.smk.jinja(1 hunks)tests/test_client.sh(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`**/*.py`: Do not try to improve formatting. Do not suggest ...
**/*.py: Do not try to improve formatting.
Do not suggest type annotations for functions that are defined inside of functions or methods.
Do not suggest type annotation of theselfargument of methods.
Do not suggest type annotation of theclsargument of classmethods.
Do not suggest return type annotation if a function or method does not contain areturnstatement.
snakedeploy/deploy.py
🔇 Additional comments (4)
snakedeploy/templates/use_module.smk.jinja (1)
7-7: Good change that enhances configuration flexibility.Replacing the hardcoded configuration path with a dynamic template variable allows the template to support both
config.yamlandconfig.ymlfile extensions. This is a clean way to implement the feature without duplicating code.tests/test_client.sh (2)
56-57: Good test to verify backward compatibility.This test ensures that the fix for issue #80 doesn't affect previous functionality by checking that
config.yamlis still correctly handled in the generated Snakefile.
59-64: Excellent comprehensive test for the new feature.This test effectively validates the fix for issue #80 by:
- Deploying a repository known to use
config.yml- Verifying that the generated Snakefile correctly references
config.ymlGood choice of repository to test with, and the test is clear and focused.
snakedeploy/deploy.py (1)
233-233: LGTM - correctly passes the dynamic config path to the template.This change properly integrates with the Jinja template modification, ensuring the determined configuration path is used when rendering the Snakefile.
|
Thanks a lot! |
🤖 I have created a release *beep* *boop* --- ## [0.11.0](v0.10.4...v0.11.0) (2025-03-14) ### Features * add profile directory and license file to deployment ([#75](#75)) ([f52f7ef](f52f7ef)) ### Bug Fixes * consider config.yml as configuration filename ([#85](#85)) ([6a8fd0d](6a8fd0d)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
fixes #80
Summary by CodeRabbit
New Features
Tests