docs: Fix typos in basic API example#3277
Conversation
📝 WalkthroughWalkthroughThe changes involve updating the import statements in the Snakemake API documentation file. The previous single import for Changes
Suggested Reviewers
Note: No sequence diagram is generated for this change as it appears to be a simple import statement modification without significant changes to the control flow or functionality. Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 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.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
apidocs/api_reference/snakemake_api.rst(1 hunks)
🔇 Additional comments (1)
apidocs/api_reference/snakemake_api.rst (1)
17-24: LGTM! Import statements are now complete and well-organized.The imports now correctly include all the necessary classes used in the example, making the documentation more accurate and functional.
| with SnakemakeApi( | ||
| OutputSettings( | ||
| verbose=False, | ||
| show_failed_logs=True, | ||
| ), | ||
| ) as snakemake_api: | ||
| workflow_api = snakemake_api.workflow( | ||
| storage_settings=settings.StorageSettings(), | ||
| resource_settings=settings.ResourceSettings(), | ||
| storage_settings=StorageSettings(), | ||
| resource_settings=ResourceSettings(), |
There was a problem hiding this comment.
💡 Codebase verification
Documentation example needs updates to match the actual API implementation
The example has two inconsistencies with the actual API:
- The
resource_settingsparameter is required in theworkflow()method, not optional - The method also accepts optional
config_settingsandworkflow_settingsparameters that should be documented
🔗 Analysis chain
LGTM! API usage example is now accurate and properly formatted.
The example now correctly demonstrates how to initialize and use the settings classes with the Snakemake API.
Let's verify that this matches the actual API implementation:
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify that the API usage example matches the actual implementation
# by checking the class definitions and their parameters
# Check the API class and settings imports
ast-grep --pattern 'from snakemake.api import (OutputSettings, ResourceSettings, SnakemakeApi, StorageSettings)'
# Check the class definitions and their parameters
ast-grep --pattern 'class OutputSettings'
ast-grep --pattern 'class ResourceSettings'
ast-grep --pattern 'class StorageSettings'
# Check the SnakemakeApi class constructor
ast-grep --pattern 'class SnakemakeApi:
$$$
def __init__($$$):
$$$'
Length of output: 327
Script:
#!/bin/bash
# First, find Python files containing these class names
echo "=== Searching for API-related files ==="
rg -l "class (SnakemakeApi|OutputSettings|ResourceSettings|StorageSettings)" --type py
echo -e "\n=== Checking SnakemakeApi class definition ==="
rg "class SnakemakeApi" -A 10 --type py
echo -e "\n=== Checking Settings classes definitions ==="
rg "class (OutputSettings|ResourceSettings|StorageSettings)" -A 5 --type py
echo -e "\n=== Checking workflow method ==="
rg "def workflow" -A 5 --type py
Length of output: 3405
|
Thanks! |
🤖 I have created a release *beep* *boop* --- ## [8.28.0](v8.27.1...v8.28.0) (2025-02-12) ### Features * do not fail if --cache is active but no SNAKEMAKE_OUTPUT_CACHE env var is defined. Instead, print a warning that explains the options. ([#3270](#3270)) ([9610f7c](9610f7c)) ### Bug Fixes * do not use outdated metadata for rerun triggers (only warn about it) ([#3259](#3259)) ([d766a48](d766a48)) * ensure that exceptions print storage queries instead of local copies of remote files ([#3258](#3258)) ([e5d8ec1](e5d8ec1)) * fix error message of evaluate helper function ([#3282](#3282)) ([9483a64](9483a64)) * Revert cleaning of env vars in apptainer ([#3285](#3285)) ([e79a51b](e79a51b)) ### Performance Improvements * compare checksums of input files <= 1MB (before (10KB) ([#3267](#3267)) ([ba017bb](ba017bb)) * query updated input files in parallel ([#3266](#3266)) ([bc4fcee](bc4fcee)) ### Documentation * Adds instructions for using syntax highlighting with lazy.nvim ([#3246](#3246)) ([7a75043](7a75043)) * Fix typos in basic API example ([#3277](#3277)) ([8782219](8782219)) --- 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>
This is just a small error in the API docs updated such that it now runs properly. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Documentation** - Updated Snakemake API documentation import statements - Refined references to API settings in documentation <!-- end of auto-generated comment: release notes by coderabbit.ai -->
🤖 I have created a release *beep* *boop* --- ## [8.28.0](snakemake/snakemake@v8.27.1...v8.28.0) (2025-02-12) ### Features * do not fail if --cache is active but no SNAKEMAKE_OUTPUT_CACHE env var is defined. Instead, print a warning that explains the options. ([snakemake#3270](snakemake#3270)) ([9610f7c](snakemake@9610f7c)) ### Bug Fixes * do not use outdated metadata for rerun triggers (only warn about it) ([snakemake#3259](snakemake#3259)) ([d766a48](snakemake@d766a48)) * ensure that exceptions print storage queries instead of local copies of remote files ([snakemake#3258](snakemake#3258)) ([e5d8ec1](snakemake@e5d8ec1)) * fix error message of evaluate helper function ([snakemake#3282](snakemake#3282)) ([9483a64](snakemake@9483a64)) * Revert cleaning of env vars in apptainer ([snakemake#3285](snakemake#3285)) ([e79a51b](snakemake@e79a51b)) ### Performance Improvements * compare checksums of input files <= 1MB (before (10KB) ([snakemake#3267](snakemake#3267)) ([ba017bb](snakemake@ba017bb)) * query updated input files in parallel ([snakemake#3266](snakemake#3266)) ([bc4fcee](snakemake@bc4fcee)) ### Documentation * Adds instructions for using syntax highlighting with lazy.nvim ([snakemake#3246](snakemake#3246)) ([7a75043](snakemake@7a75043)) * Fix typos in basic API example ([snakemake#3277](snakemake#3277)) ([8782219](snakemake@8782219)) --- 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>



This is just a small error in the API docs updated such that it now runs properly.
Summary by CodeRabbit