Skip to content

docs: update doc-environment.yml file and Documentation Setup documentation#3058

Merged
johanneskoester merged 3 commits intosnakemake:mainfrom
vandalt:doc-environment-yml
Sep 4, 2024
Merged

docs: update doc-environment.yml file and Documentation Setup documentation#3058
johanneskoester merged 3 commits intosnakemake:mainfrom
vandalt:doc-environment-yml

Conversation

@vandalt
Copy link
Copy Markdown
Contributor

@vandalt vandalt commented Aug 29, 2024

This PR fixes #3054 by updating the doc-environment.yml file:

  • Add sphinxawesome-theme, snakemake-interface-common >=1.17.0, snakemake-interface-executor-plugins >=9.1.0, snakemake-interface-storage-plugins >=3.2.3 dependencies
  • Replace ratelimiter by throttler
  • Update required Python version from 3.7 to 3.11

Another option which I mentioned in #3054 would be to merge the test-environment.yml and doc-environment.yml. Let me know if you would prefer this.

QC

  • The PR contains a test case for the changes or the changes are already covered by an existing test case. (N.A.)
  • 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).

Summary by CodeRabbit

  • New Features

    • Updated Python version requirement to 3.11 for improved functionality.
    • Added new dependencies to enhance environment capabilities.
    • Introduced improved documentation styling options with sphinxawesome-theme.
    • Added instructions for installing the development version of Snakemake in the contributing guide.
  • Bug Fixes

    • Corrected hyperlink references in documentation for clarity and accuracy.
  • Documentation

    • Enhanced clarity and precision in descriptions related to modular workflows.
    • Updated terminology throughout documentation for consistency.
    • Improved navigation and accessibility of documentation links.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Aug 29, 2024

Walkthrough

The changes involve updates to the doc-environment.yml file to raise the Python version requirement from 3.7 to 3.11, replace the ratelimiter dependency with throttler, and add new dependencies related to Snakemake. Additionally, a minor addition was made to the contributing.rst documentation to clarify the installation of the development version of Snakemake.

Changes

File(s) Change Summary
doc-environment.yml Updated Python version requirement to 3.11, replaced ratelimiter with throttler, added new dependencies (snakemake-interface-common >=1.17.0, snakemake-interface-executor-plugins >=9.1.0, snakemake-interface-storage-plugins >=3.2.3, sphinxawesome-theme).
docs/project_info/contributing.rst Added instructions for installing the development version of Snakemake.

Assessment against linked issues

Objective Addressed Explanation
Update doc-environment.yml to enforce python >= 3.11 (3054)
Replace ratelimiter with throttler in doc-environment.yml (3054)
Add sphinxawesome-theme to doc-environment.yml (3054)
Consider merging test-environment and doc-environment (3054) No merging of environments was implemented.

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?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a 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

Outside diff range, codebase verification and nitpick comments (1)
doc-environment.yml (1)

4-4: Potential Compatibility Issue with Python Version Requirement

The codebase contains references to Python >=3.12 in snakemake/parser.py, which might require features not available in Python 3.11. This could lead to compatibility issues if the environment is set to >=3.11. Please review the dependencies and ensure that the specified Python version aligns with the code requirements.

  • snakemake/parser.py: References to Python >=3.12 could indicate a need for features from this version.
  • snakemake/linting/snakefiles.py: Contains a reference to Python >=3.6, which is not conflicting but worth noting.

Please verify and adjust the Python version requirement as necessary to ensure compatibility across the codebase.

Analysis chain

LGTM! But verify compatibility with the rest of the codebase.

Updating the Python version requirement to >=3.11 ensures compatibility with newer features and improvements in the language. However, ensure that the rest of the codebase is compatible with this version.

The code changes are approved.

Run the following script to verify the compatibility of the new Python version with the rest of the codebase:

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify compatibility of the new Python version with the rest of the codebase.

# Test: Search for Python version requirements in the codebase. Expect: Only occurrences of the new version.
rg --type yaml 'python >=3.11'

Length of output: 109


Script:

#!/bin/bash
# Description: Search for any Python version specifications in the codebase to ensure there are no conflicts.

# Test: Search for any Python version specifications in YAML files.
rg --type yaml 'python >='

# Test: Search for any Python version specifications in other common configuration files.
rg 'python >='

Length of output: 504

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between f955478 and 15d0b45.

Files selected for processing (17)
  • doc-environment.yml (1 hunks)
  • docs/conf.py (1 hunks)
  • docs/executing/caching.rst (1 hunks)
  • docs/executing/cli.rst (1 hunks)
  • docs/getting_started/migration.rst (3 hunks)
  • docs/project_info/contributing.rst (1 hunks)
  • docs/project_info/faq.rst (6 hunks)
  • docs/snakefiles/best_practices.rst (1 hunks)
  • docs/snakefiles/configuration.rst (2 hunks)
  • docs/snakefiles/foreign_wms.rst (1 hunks)
  • docs/snakefiles/modularization.rst (2 hunks)
  • docs/snakefiles/reporting.rst (3 hunks)
  • docs/snakefiles/rules.rst (6 hunks)
  • docs/snakefiles/utils.rst (1 hunks)
  • docs/tutorial/additional_features.rst (2 hunks)
  • docs/tutorial/basics.rst (2 hunks)
  • docs/tutorial/setup.rst (5 hunks)
Files skipped from review due to trivial changes (16)
  • docs/conf.py
  • docs/executing/caching.rst
  • docs/executing/cli.rst
  • docs/getting_started/migration.rst
  • docs/project_info/contributing.rst
  • docs/project_info/faq.rst
  • docs/snakefiles/best_practices.rst
  • docs/snakefiles/configuration.rst
  • docs/snakefiles/foreign_wms.rst
  • docs/snakefiles/modularization.rst
  • docs/snakefiles/reporting.rst
  • docs/snakefiles/rules.rst
  • docs/snakefiles/utils.rst
  • docs/tutorial/additional_features.rst
  • docs/tutorial/basics.rst
  • docs/tutorial/setup.rst
Additional comments not posted (5)
doc-environment.yml (5)

19-19: LGTM!

Adding snakemake-interface-common with version >=1.17.0 enhances the environment's capabilities, likely to support more advanced features or integrations related to Snakemake.

The code changes are approved.


20-20: LGTM!

Adding snakemake-interface-executor-plugins with version >=9.1.0 enhances the environment's capabilities, likely to support more advanced features or integrations related to Snakemake.

The code changes are approved.


21-21: LGTM!

Adding snakemake-interface-storage-plugins with version >=3.2.3 enhances the environment's capabilities, likely to support more advanced features or integrations related to Snakemake.

The code changes are approved.


24-24: LGTM!

Adding sphinxawesome-theme enhances the documentation styling options available within the environment.

The code changes are approved.


11-11: LGTM! But verify the integration and testing of the new dependency.

Replacing ratelimiter with throttler suggests a change in the approach to rate limiting within the environment. Ensure that the new dependency is correctly integrated and tested.

The code changes are approved.

Run the following script to verify the integration and testing of the new dependency:

@vandalt vandalt force-pushed the doc-environment-yml branch from 787025a to 15d0b45 Compare August 29, 2024 17:54
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Caution

Inline review comments failed to post

Actionable comments posted: 3

Outside diff range, codebase verification and nitpick comments (1)
snakemake/dag.py (1)

720-750: LGTM! Consider adding comments for clarity.

The check_output_mtime method is well-implemented and enhances the reliability of the workflow by addressing potential clock skew issues. Consider adding comments to explain the purpose of each step for better readability.

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 15d0b45 and 787025a.

Files ignored due to path filters (4)
  • CHANGELOG.md is excluded by !CHANGELOG.md
  • tests/test_inferred_resources_mib/expected-results/test1.out is excluded by !**/*.out
  • tests/test_inferred_resources_mib/expected-results/test2.out is excluded by !**/*.out
  • tests/test_inferred_resources_mib/expected-results/test3.out is excluded by !**/*.out
Files selected for processing (20)
  • .gitignore (1 hunks)
  • docs/getting_started/installation.rst (2 hunks)
  • docs/snakefiles/rules.rst (7 hunks)
  • setup.cfg (2 hunks)
  • setup.py (1 hunks)
  • snakemake/init.py (1 hunks)
  • snakemake/api.py (2 hunks)
  • snakemake/assets/init.py (1 hunks)
  • snakemake/common/init.py (3 hunks)
  • snakemake/dag.py (5 hunks)
  • snakemake/io.py (2 hunks)
  • snakemake/ioutils.py (1 hunks)
  • snakemake/parser.py (2 hunks)
  • snakemake/persistence.py (1 hunks)
  • snakemake/report/html_reporter/data/packages.py (3 hunks)
  • snakemake/report/html_reporter/template/index.html.jinja2 (2 hunks)
  • snakemake/resources.py (2 hunks)
  • snakemake/rules.py (1 hunks)
  • snakemake/workflow.py (36 hunks)
  • tests/test_inferred_resources_mib/Snakefile (1 hunks)
Files skipped from review due to trivial changes (6)
  • .gitignore
  • docs/getting_started/installation.rst
  • docs/snakefiles/rules.rst
  • snakemake/common/init.py
  • snakemake/io.py
  • snakemake/ioutils.py
Additional context used
Path-based instructions (11)
snakemake/__init__.py (1)

Pattern **/*.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 the self argument of methods.
Do not suggest type annotation of the cls argument of classmethods.
Do not suggest return type annotation if a function or method does not contain a return statement.

setup.py (1)

Pattern **/*.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 the self argument of methods.
Do not suggest type annotation of the cls argument of classmethods.
Do not suggest return type annotation if a function or method does not contain a return statement.

snakemake/report/html_reporter/data/packages.py (1)

Pattern **/*.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 the self argument of methods.
Do not suggest type annotation of the cls argument of classmethods.
Do not suggest return type annotation if a function or method does not contain a return statement.

snakemake/assets/__init__.py (1)

Pattern **/*.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 the self argument of methods.
Do not suggest type annotation of the cls argument of classmethods.
Do not suggest return type annotation if a function or method does not contain a return statement.

snakemake/persistence.py (1)

Pattern **/*.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 the self argument of methods.
Do not suggest type annotation of the cls argument of classmethods.
Do not suggest return type annotation if a function or method does not contain a return statement.

snakemake/resources.py (1)

Pattern **/*.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 the self argument of methods.
Do not suggest type annotation of the cls argument of classmethods.
Do not suggest return type annotation if a function or method does not contain a return statement.

snakemake/api.py (1)

Pattern **/*.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 the self argument of methods.
Do not suggest type annotation of the cls argument of classmethods.
Do not suggest return type annotation if a function or method does not contain a return statement.

snakemake/parser.py (1)

Pattern **/*.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 the self argument of methods.
Do not suggest type annotation of the cls argument of classmethods.
Do not suggest return type annotation if a function or method does not contain a return statement.

snakemake/rules.py (1)

Pattern **/*.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 the self argument of methods.
Do not suggest type annotation of the cls argument of classmethods.
Do not suggest return type annotation if a function or method does not contain a return statement.

snakemake/workflow.py (1)

Pattern **/*.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 the self argument of methods.
Do not suggest type annotation of the cls argument of classmethods.
Do not suggest return type annotation if a function or method does not contain a return statement.

snakemake/dag.py (1)

Pattern **/*.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 the self argument of methods.
Do not suggest type annotation of the cls argument of classmethods.
Do not suggest return type annotation if a function or method does not contain a return statement.

Ruff
snakemake/report/html_reporter/data/packages.py

89-89: Within an except clause, raise exceptions with raise ... from err or raise ... from None to distinguish them from errors in exception handling

(B904)

snakemake/assets/__init__.py

27-27: Within an except clause, raise exceptions with raise ... from err or raise ... from None to distinguish them from errors in exception handling

(B904)

snakemake/rules.py

1041-1041: Use key not in dict instead of key not in dict.keys()

Remove .keys()

(SIM118)

Additional comments not posted (42)
snakemake/__init__.py (3)

8-8: LGTM!

The import statement for get_versions is correct and necessary for version retrieval.


10-11: LGTM!

The version retrieval using get_versions and subsequent deletion of the function enhances encapsulation and cleans up the namespace.


13-14: LGTM!

The declaration of PIP_DEPLOYMENTS_PATH and its addition to sys.path are correct and necessary for the deployment structure.

tests/test_inferred_resources_mib/Snakefile (3)

1-8: LGTM!

Rule a is correctly defined with the specified output, resources, and shell command.


11-18: LGTM!

Rule b is correctly defined with the specified output, resources, and shell command.


21-28: LGTM!

Rule c is correctly defined with the specified output, resources, and shell command.

setup.py (5)

2-2: LGTM!

The import statement for Path is correct and necessary for path handling.


11-12: LGTM!

The declaration of source_dir using Path(__file__).parent and its addition to sys.path improves the clarity and reliability of path handling.


18-18: LGTM!

The import statement for Assets is correct and necessary for asset handling.


20-21: LGTM!

The call to Assets.deploy() enhances the setup process by automatically handling asset deployment.


27-27: LGTM!

The addition of package_data in the setup() function ensures that necessary data files are bundled with the package, improving its completeness and functionality.

setup.cfg (2)

32-32: LGTM!

Setting include_package_data to True ensures that non-code files are included when the package is built, which can be beneficial for including necessary resources.


53-53: LGTM!

Removing the trailing space in the smart-open dependency line improves the consistency of the formatting without impacting functionality.

snakemake/report/html_reporter/data/packages.py (3)

4-5: LGTM!

The import statements for AssetDownloadError, Assets, and WorkflowError are necessary for the updated error handling and resource fetching logic.


16-54: LGTM!

The get_packages function has been updated to use license_path and source_path, improving the clarity and reliability of resource references.


74-89: LGTM!

The Package class constructor has been updated to use license_path and source_path, and includes error handling via AssetDownloadError, improving the robustness of the package initialization process.

Tools
Ruff

89-89: Within an except clause, raise exceptions with raise ... from err or raise ... from None to distinguish them from errors in exception handling

(B904)

snakemake/report/html_reporter/template/index.html.jinja2 (4)

12-12: LGTM!

Replacing the get_resource_as_string filter with direct access to the source attribute of the packages dictionary enhances the clarity and possibly the performance of resource loading.


34-35: LGTM!

Replacing the get_resource_as_string filter with direct access to the sources attribute of the packages dictionary enhances the clarity and possibly the performance of resource loading.


36-36: LGTM!

Replacing the get_resource_as_string filter with direct access to the source attribute of the packages dictionary enhances the clarity and possibly the performance of resource loading.


37-39: LGTM!

Replacing the get_resource_as_string filter with direct access to the source attribute of the packages dictionary enhances the clarity and possibly the performance of resource loading.

snakemake/assets/__init__.py (4)

10-11: LGTM!

The custom exception class AssetDownloadError is correctly implemented.


104-113: LGTM!

The method deploy is correctly implemented.


116-125: LGTM!

The method get_content is correctly implemented.


128-132: LGTM!

The method base_path is correctly implemented.

snakemake/persistence.py (1)

44-44: LGTM!

The modification to the __init__ method is correctly implemented and enhances the flexibility of the path parameter.

snakemake/resources.py (1)

645-645: LGTM!

The modification to the infer_resources function is correctly implemented and ensures that the computed resource size is always rounded up to the nearest whole number.

snakemake/parser.py (2)

73-74: LGTM!

The type hint for the token parameter improves type safety and clarity.

The code changes are approved.


1299-1315: LGTM!

The type hints improve the readability of the function's interface and provide better context for users regarding the expected types of these parameters. The use of the |= operator simplifies the code and enhances its readability.

The code changes are approved.

snakemake/rules.py (1)

1032-1045: LGTM!

The code changes are approved. The logic for inferring additional resources is correctly implemented and improves the maintainability of the code.

Tools
Ruff

1041-1041: Use key not in dict instead of key not in dict.keys()

Remove .keys()

(SIM118)

snakemake/workflow.py (12)

20-20: LGTM!

The addition of Iterable to the import statement is appropriate for type hinting purposes.


152-152: LGTM!

The change enhances flexibility by allowing both string and Path types for the working directory.


162-162: LGTM!

Explicitly declaring the type of global_resources improves clarity regarding its expected structure.


253-253: LGTM!

The assertion ensures that storage_settings is not None before accessing its attributes, preventing potential runtime errors.


274-274: LGTM!

The assertion ensures that storage_settings is not None before proceeding with the method, preventing potential runtime errors.


385-385: LGTM!

The assertion ensures that execution_settings is not None before accessing its attributes, preventing potential runtime errors.


471-471: LGTM!

The assertion ensures that dag_settings is not None before accessing its attributes, preventing potential runtime errors.


476-476: LGTM!

The assertion ensures that deployment_settings is not None before accessing its attributes, preventing potential runtime errors.


675-675: LGTM!

The change enhances flexibility by allowing both string and Path types for the shadow prefix.


694-694: LGTM!

The assertion ensures that dag_settings is not None before accessing its attributes, preventing potential runtime errors.


795-795: LGTM!

The assertion ensures that deployment_settings is not None before accessing its attributes, preventing potential runtime errors.


1084-1089: LGTM!

The assertions ensure that critical settings are not None before proceeding with the method, preventing potential runtime errors.

snakemake/dag.py (1)

Line range hint 699-719: LGTM!

The changes to the check_and_touch_output method improve robustness by ensuring output files are newer than the newest input file, addressing potential clock skew issues.

Comments failed to post (3)
snakemake/assets/__init__.py (1)

19-32: Improve exception handling.

Use raise ... from err in the except clause to distinguish exceptions from errors in exception handling.

Apply this diff to improve exception handling:

-        except urllib.error.URLError as e:
-            raise AssetDownloadError(f"Failed to download asset {self.url}: {e}")
+        except urllib.error.URLError as e:
+            raise AssetDownloadError(f"Failed to download asset {self.url}: {e}") from e
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

    def get_content(self) -> bytes:
        """Get and validate asset content."""

        req = urllib.request.Request(self.url, headers={"User-Agent": "snakemake"})
        try:
            resp = urllib.request.urlopen(req)
            content = resp.read()
        except urllib.error.URLError as e:
            raise AssetDownloadError(f"Failed to download asset {self.url}: {e}") from e
        if self.sha256 != hashlib.sha256(content).hexdigest():
            raise AssetDownloadError(
                f"Checksum mismatch when downloading asset {self.url}"
            )
        return content
Tools
Ruff

27-27: Within an except clause, raise exceptions with raise ... from err or raise ... from None to distinguish them from errors in exception handling

(B904)

snakemake/api.py (1)

290-295: Add a docstring to the _no_dag method.

The _no_dag method is correctly implemented as a decorator. However, it lacks a docstring explaining its purpose and usage.

Apply this diff to add a docstring to the _no_dag method:

def _no_dag(method):
+    """
+    Decorator to enforce specific behavior when a DAG is not present.
+    Sets `self.resource_settings.cores` to 1 before executing the wrapped method.
+    """
    def _handle_no_dag(self: "WorkflowApi", *args, **kwargs):
        self.resource_settings.cores = 1
        return method(self, *args, **kwargs)

    return _handle_no_dag
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

def _no_dag(method):
    """
    Decorator to enforce specific behavior when a DAG is not present.
    Sets `self.resource_settings.cores` to 1 before executing the wrapped method.
    """
    def _handle_no_dag(self: "WorkflowApi", *args, **kwargs):
        self.resource_settings.cores = 1
        return method(self, *args, **kwargs)

    return _handle_no_dag
snakemake/rules.py (1)

1041-1041: Simplify dictionary key check.

Use key not in dict instead of key not in dict.keys() for better readability and performance.

Apply this diff to fix the issue:

- and mib_item not in self.resources.keys()
+ and mib_item not in self.resources
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

                            and mib_item not in self.resources
Tools
Ruff

1041-1041: Use key not in dict instead of key not in dict.keys()

Remove .keys()

(SIM118)

@vandalt vandalt changed the base branch from main to modules August 29, 2024 17:55
@vandalt vandalt changed the base branch from modules to main August 29, 2024 17:55
@vandalt vandalt force-pushed the doc-environment-yml branch from 15d0b45 to 25f1ac9 Compare August 29, 2024 18:02
@vandalt
Copy link
Copy Markdown
Contributor Author

vandalt commented Aug 29, 2024

Sorry for messing around with commits/force push. I had included squashed commits from #3052 in this commit. I think now they should be removed but let me know if there are things I should clean up

Required to build the "All options" part of the CLI documentation
@vandalt vandalt changed the title Update doc-environment.yml file Update doc-environment.yml file and Documentation Setup documentation Aug 29, 2024
@sonarqubecloud
Copy link
Copy Markdown

@vandalt
Copy link
Copy Markdown
Contributor Author

vandalt commented Aug 29, 2024

I just realized that without installing snakemake, the "All options" of the CLI page would not build.
I added instructions on how to install the local snakemake version in the Documentation Setup section.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a 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

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 787025a and e602e47.

Files selected for processing (2)
  • doc-environment.yml (1 hunks)
  • docs/project_info/contributing.rst (1 hunks)
Additional comments not posted (7)
doc-environment.yml (6)

19-19: LGTM! But verify the integration and testing of the new dependency.

Adding the snakemake-interface-common >=1.17.0 dependency enhances the environment's capabilities. Ensure that the new dependency is correctly integrated and tested.

The code changes are approved.

Run the following script to verify the integration and testing of the new dependency:


20-20: LGTM! But verify the integration and testing of the new dependency.

Adding the snakemake-interface-executor-plugins >=9.1.0 dependency enhances the environment's capabilities. Ensure that the new dependency is correctly integrated and tested.

The code changes are approved.

Run the following script to verify the integration and testing of the new dependency:


4-4: LGTM! But verify compatibility with the rest of the codebase.

Updating the Python version requirement to >=3.11 ensures compatibility with newer features and improvements in the language. However, ensure that the rest of the codebase is compatible with Python 3.11.

The code changes are approved.

Run the following script to verify the compatibility of the new Python version with the rest of the codebase:

Verification successful

No Python 3.11 specific features found in the codebase.

The search did not reveal any Python 3.11 specific features or syntax, suggesting compatibility with Python 3.11. However, consider manually verifying other aspects of compatibility if necessary.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the compatibility of the new Python version with the rest of the codebase.

# Test: Check for any syntax errors or deprecated features in the codebase.
python3.11 -m compileall .

Length of output: 106


Script:

#!/bin/bash
# Description: Search for Python 3.11 specific features or syntax in the codebase.

# Using ripgrep to search for Python 3.11 specific syntax or features.
rg --include '*.py' 'match case|pattern matching|PEP 634|PEP 635|PEP 636' .

Length of output: 519


Script:

#!/bin/bash
# Description: Search for Python 3.11 specific features or syntax in the codebase.

# Using ripgrep to search for Python 3.11 specific syntax or features in Python files.
rg -t py 'match case|pattern matching|PEP 634|PEP 635|PEP 636' .

Length of output: 66


11-11: LGTM! But verify the integration and testing of the new dependency.

Replacing ratelimiter with throttler suggests a change in the approach to rate limiting within the environment. Ensure that the new dependency is correctly integrated and tested.

The code changes are approved.

Run the following script to verify the integration and testing of the new dependency:


24-24: LGTM! But verify the integration and testing of the new dependency.

Adding the sphinxawesome-theme dependency enhances the documentation styling options available within the environment. Ensure that the new dependency is correctly integrated and tested.

The code changes are approved.

Run the following script to verify the integration and testing of the new dependency:


21-21: LGTM! But verify the integration and testing of the new dependency.

Adding the snakemake-interface-storage-plugins >=3.2.3 dependency enhances the environment's capabilities. Ensure that the new dependency is correctly integrated and tested.

The code changes are approved.

Run the following script to verify the integration and testing of the new dependency:

docs/project_info/contributing.rst (1)

189-194: LGTM!

Adding instructions for installing the development version of Snakemake enhances the clarity of the setup process for contributors.

The code changes are approved.

@johanneskoester johanneskoester changed the title Update doc-environment.yml file and Documentation Setup documentation docs: update doc-environment.yml file and Documentation Setup documentation Sep 4, 2024
@johanneskoester
Copy link
Copy Markdown
Contributor

Thanks a lot! No problem with the commits, we always squash merge.

@johanneskoester johanneskoester merged commit a540a2e into snakemake:main Sep 4, 2024
@vandalt vandalt deleted the doc-environment-yml branch September 4, 2024 10:03
johanneskoester added a commit that referenced this pull request Sep 4, 2024
🤖 I have created a release *beep* *boop*
---


##
[8.19.1](v8.19.0...v8.19.1)
(2024-09-04)


### Bug Fixes

* fix issues with misinterpretation of max-jobs-per-timespan and
max-jobs-per-seconds
([#3067](#3067))
([d82453b](d82453b))
* pip deployment path
([#3062](#3062))
([bf9305b](bf9305b))
* return empty set if rate limiter at max
([#3060](#3060))
([4e59963](4e59963))
* use wrapt_timeout_decorator, instead of stopit
([#2938](#2938))
([3b64e41](3b64e41))
* Wrong linenumbers reported when linting
([#2985](#2985))
([3a8bd36](3a8bd36))


### Documentation

* update `doc-environment.yml` file and Documentation Setup
documentation
([#3058](#3058))
([a540a2e](a540a2e))

---
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>
Co-authored-by: Johannes Köster <johannes.koester@tu-dortmund.de>
@coderabbitai coderabbitai bot mentioned this pull request Nov 4, 2024
2 tasks
@coderabbitai coderabbitai bot mentioned this pull request Mar 9, 2025
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

doc-environment.yml file seems outdated

2 participants