fix: include unit test templates in setup.py#3362
Conversation
📝 WalkthroughWalkthroughThe pull request introduces several changes, including the addition of a new entry in the Changes
Possibly related PRs
📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (7)
✅ Files skipped from review due to trivial changes (2)
🧰 Additional context used📓 Path-based instructions (1)`**/*.py`: Do not try to improve formatting. Do not suggest ...
⏰ Context from checks skipped due to timeout of 90000ms (40)
🔇 Additional comments (9)
✨ Finishing Touches
🪧 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 (
|
|
Please format your code with black: |
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
setup.py(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.
setup.py
🪛 GitHub Actions: CI
setup.py
[error] 28-28: Black formatting check failed. 1 file would be reformatted. Please run 'black' to fix code style issues.
setup.py
Outdated
| "report/html_reporter/template/**/*", | ||
| "report/html_reporter/template/*", | ||
| "common/tests/testcases/**/*", | ||
| "snakemake/snakemake/unit_tests/templates/*" |
There was a problem hiding this comment.
💡 Verification agent
🧩 Analysis chain
The path structure seems duplicated - please verify it's correct.
The added line includes the path "snakemake/snakemake/unit_tests/templates/*", which contains a duplicated "snakemake" directory. Based on the existing entries, this should likely be either "unit_tests/templates/*" or just "snakemake/unit_tests/templates/*" depending on your project structure.
Additionally, the pipeline failure indicates a Black formatting issue. You'll need to run the Black formatter on this file before merging.
🏁 Script executed:
#!/bin/bash
# Check the actual directory structure to confirm if the path is correct
cd snakemake
ls -la
# See if there's a nested snakemake directory
if [ -d "snakemake" ]; then
echo "There is indeed a nested snakemake directory"
# Check if unit_tests exists in the nested directory
if [ -d "snakemake/unit_tests" ]; then
echo "And it contains unit_tests directory"
if [ -d "snakemake/unit_tests/templates" ]; then
echo "And it contains templates directory"
ls -la snakemake/unit_tests/templates
else
echo "But templates directory was not found in snakemake/unit_tests"
fi
else
echo "But unit_tests directory was not found in nested snakemake"
fi
else
echo "There is no nested snakemake directory"
# Check if unit_tests exists directly
if [ -d "unit_tests" ]; then
echo "But unit_tests directory exists at root level"
if [ -d "unit_tests/templates" ]; then
echo "And it contains templates directory"
ls -la unit_tests/templates
else
echo "But templates directory was not found in unit_tests"
fi
else
echo "And unit_tests directory was not found at root level either"
fi
fiLength of output: 4043
Action Required: Correct the Duplicate Directory & Run Black Formatter
- The verified directory structure confirms that the unit tests reside in
snakemake/unit_tests/templates/. Please update the path insetup.pyfrom
"snakemake/snakemake/unit_tests/templates/*"
to
"snakemake/unit_tests/templates/*". - Additionally, re-run the Black formatter on
setup.pyto resolve the formatting issue causing the pipeline failure.
dlaehnemann
left a comment
There was a problem hiding this comment.
We also tested the file inclusion by running the build locally and checking the resulting .tar.gz file, so this seems to work as intended.
setup.py
|
@johanneskoester could you please review? This merge requires a review from a code owner. |
|
🤖 I have created a release *beep* *boop* --- ## [8.30.0](v8.29.3...v8.30.0) (2025-03-11) ### Features * Add extra input size properties ([#2424](#2424)) ([359ae2e](359ae2e)) * shell function calls inside of the 'run' directive now use conda, container, or envmodules specifications ([#2289](#2289)) ([0193e34](0193e34)) * xonsh support for script directive ([#3310](#3310)) ([d1c369b](d1c369b)) ### Bug Fixes * include unit test templates in `setup.py` ([#3362](#3362)) ([b47252c](b47252c)) ### Documentation * clearly explain report rendering to ZIP archive ([#3357](#3357)) ([948e8fb](948e8fb)) --- 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 snakemake#3137 <!--Add a description of your PR here--> This PR forces inclusion of `snakemake/snakemake/unit_tests/templates/` when building Snakemake. /templates/` ### QC <!-- Make sure that you can tick the boxes below. --> * [ ] The PR contains a test case for the changes or the changes are already covered by an existing test case. * [x] The documentation (`docs/`) is updated to reflect the changes or this is not necessary (e.g. if the change does neither modify the language nor the behavior or functionalities of Snakemake). <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Chores** - Updated the package distribution by including additional unit test templates. - **New Features** - Introduced support for Xonsh scripts within Snakemake workflows. - Added a new YAML configuration for managing conda environments, specifying Xonsh as a dependency. - Created a new test workflow utilizing Xonsh scripts. - **Bug Fixes** - Enhanced error messaging to include support for Xonsh scripts. - **Documentation** - Added a new section in the Snakemake documentation for Xonsh integration. - **Tests** - Added a new test case for the Xonsh script functionality. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: David Laehnemann <david.laehnemann@hhu.de> Co-authored-by: Johannes Köster <johannes.koester@tu-dortmund.de>
🤖 I have created a release *beep* *boop* --- ## [8.30.0](snakemake/snakemake@v8.29.3...v8.30.0) (2025-03-11) ### Features * Add extra input size properties ([snakemake#2424](snakemake#2424)) ([359ae2e](snakemake@359ae2e)) * shell function calls inside of the 'run' directive now use conda, container, or envmodules specifications ([snakemake#2289](snakemake#2289)) ([0193e34](snakemake@0193e34)) * xonsh support for script directive ([snakemake#3310](snakemake#3310)) ([d1c369b](snakemake@d1c369b)) ### Bug Fixes * include unit test templates in `setup.py` ([snakemake#3362](snakemake#3362)) ([b47252c](snakemake@b47252c)) ### Documentation * clearly explain report rendering to ZIP archive ([snakemake#3357](snakemake#3357)) ([948e8fb](snakemake@948e8fb)) --- 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 #3137
This PR forces inclusion of
snakemake/snakemake/unit_tests/templates/when building Snakemake./templates/`
QC
docs/) is updated to reflect the changes or this is not necessary (e.g. if the change does neither modify the language nor the behavior or functionalities of Snakemake).Summary by CodeRabbit