Skip to content

feat: add temp to default pathvars#4108

Merged
johanneskoester merged 6 commits into
snakemake:mainfrom
fgvieira:pathvars_temp
Jun 1, 2026
Merged

feat: add temp to default pathvars#4108
johanneskoester merged 6 commits into
snakemake:mainfrom
fgvieira:pathvars_temp

Conversation

@fgvieira

@fgvieira fgvieira commented Mar 16, 2026

Copy link
Copy Markdown
Contributor

QC

  • The PR contains a test case for the changes or the changes are already covered by an existing test case.
  • 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).
  • I, as a human being, have checked each line of code in this pull request

AI-assistance disclosure

I used AI assistance for:

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding

Summary by CodeRabbit

  • New Features

    • Added "stats", "reports", and "temp" as new default path variables alongside results, resources, logs, and benchmarks for use in Snakemake workflows.
  • Documentation

    • Updated docs to list the expanded set of default path variables and their mapping to output paths.

@coderabbitai

coderabbitai Bot commented Mar 16, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c31958c5-484f-4970-bb28-1a1fac1f7ca6

📥 Commits

Reviewing files that changed from the base of the PR and between 9c323ae and 75476d6.

📒 Files selected for processing (2)
  • docs/snakefiles/rules.rst
  • src/snakemake/pathvars.py
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/snakemake/pathvars.py
  • docs/snakefiles/rules.rst

📝 Walkthrough

Walkthrough

Adds three new default pathvars — stats, reports, and temp — to the pathvars system. Documentation (docs/snakefiles/rules.rst) and implementation (src/snakemake/pathvars.py) are updated to include these default mappings.

Changes

Cohort / File(s) Summary
Pathvars implementation & docs
src/snakemake/pathvars.py, docs/snakefiles/rules.rst
Adds "stats", "reports", and "temp" to the set of default pathvars; updates documentation to list the expanded set of default pathvars and their mapping to output paths.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive The description follows the required template with QC checklist items completed. However, the first unchecked box (test case) and the lack of any descriptive text about the changes raise concerns about completeness. Add a brief description of what changes are being made and why. Clarify whether test coverage is needed or explain why tests are not included in this PR.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: add temp to default pathvars' accurately describes the main change: adding 'temp' as a default pathvar. However, it incompletely represents the full scope of changes, which also add 'stats' and 'reports' to default pathvars.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@fgvieira fgvieira self-assigned this Mar 17, 2026
@fgvieira fgvieira moved this to In review in Snakemake Hackathon 2026 Mar 17, 2026
@fgvieira fgvieira added the enhancement New feature or request label Mar 17, 2026

@johanneskoester johanneskoester left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting idea! So, I was so far assuming that such a folder (if a special one is needed) would rather be the system tempdir. Maybe that should be the default instead of the local relative folder temp? Unsure though.

@fgvieira

Copy link
Copy Markdown
Contributor Author

I always have both temp folders:

  • system tempdir for rules temp files (those generated by rules - i.e. sort)
  • local tempdir for workflow temp files (those generated by the workflow - i.e. temp intermediate output files)

@johanneskoester

Copy link
Copy Markdown
Contributor

I always have both temp folders:

* system tempdir for rules temp files (those generated by rules - i.e. sort)

* local tempdir for workflow temp files (those generated by the workflow - i.e. temp intermediate output files)

That makes a lot sense! And by making it a pathvar, people can even choose to set it to a different location (e.g. a fast but small NVMe SSD or something like that).

@johanneskoester johanneskoester merged commit 917fb11 into snakemake:main Jun 1, 2026
60 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in Snakemake Hackathon 2026 Jun 1, 2026
@fgvieira fgvieira deleted the pathvars_temp branch June 1, 2026 10:50
johanneskoester pushed a commit that referenced this pull request Jun 1, 2026
🤖 I have created a release *beep* *boop*
---


##
[9.22.0](v9.21.1...v9.22.0)
(2026-06-01)


### Features

* add semantic helper functions choose_file/choose_folder/choose_tmp and
allow all semantic helper functions to be used when parsing resources
([#3820](#3820))
([d3c2386](d3c2386))
* add temp to default pathvars
([#4108](#4108))
([917fb11](917fb11))
* add workflow info to log
([#4079](#4079))
([e40e15b](e40e15b))
* support python 3.14
([#3739](#3739))
([7e3be0c](7e3be0c))


### Bug Fixes

* Adapt for dataclasses._MISSING_TYPE replaced with sentinel in Python
3.15 ([#4211](#4211))
([b7fb8df](b7fb8df))
* ensure that storage is not actually retrieved with --touch
([#4212](#4212))
([2726cae](2726cae))
* symlink to directory "has older modification time" than target
([#3782](#3782))
([#3784](#3784))
([41903d8](41903d8))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants