feat: print host name when executing workflow#3048
Conversation
WalkthroughThe changes introduce a new logging method, Changes
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 as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
|
There was a problem hiding this comment.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- snakemake/logging.py (2 hunks)
- snakemake/settings/enums.py (1 hunks)
- snakemake/workflow.py (1 hunks)
Additional context used
Path-based instructions (3)
snakemake/settings/enums.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 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.snakemake/logging.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 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.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 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.
Additional comments not posted (4)
snakemake/settings/enums.py (1)
28-28: LGTM!The addition of
HOST = 3to theQuietnessenum is consistent and logical.The code changes are approved.
snakemake/logging.py (2)
445-446: LGTM!The
host_infomethod is correctly implemented to log host-related information.The code changes are approved.
539-541: LGTM!The changes to the
text_handlermethod correctly prioritize host messages and log host information usingplatform.node().The code changes are approved.
snakemake/workflow.py (1)
1047-1048: LGTM! But verify the existence and functionality oflogger.host_info().The change is straightforward and does not affect the existing logic or control flow of the function. However, ensure that the
logger.host_info()method exists and functions correctly.The code changes are approved.
Run the following script to verify the existence and functionality of
logger.host_info():Verification successful
The
host_infomethod exists and functions correctly.The method is defined in
snakemake/logging.pyand is implemented to log information at the "host" level usingself.handler. No issues were found with its functionality.
- Location:
snakemake/logging.py, lines 445-446Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the existence and functionality of `logger.host_info()`. # Test: Search for the `host_info` method in the `logger` module. Expect: Method definition. rg --type python 'def host_info' $(fd logger.py)Length of output: 81
Script:
#!/bin/bash # Description: Verify the existence of `host_info` method in any `logger.py` file. # Find all files named `logger.py` and search for the `host_info` method definition. fd -e py 'logger.py' | xargs rg 'def host_info'Length of output: 93
Script:
#!/bin/bash # Description: Extract and review the implementation details of `host_info` method. # Extract the implementation of `host_info` method from `snakemake/logging.py`. ast-grep --lang python --pattern 'def host_info(self): $$$' snakemake/logging.pyLength of output: 198
🤖 I have created a release *beep* *boop* --- ## [8.19.0](v8.18.2...v8.19.0) (2024-08-29) ### Features * check consistency of output file mtimes (must be newer than input files) ([#3050](#3050)) ([666cf62](666cf62)) * print host name when executing workflow ([#3048](#3048)) ([b0ff787](b0ff787)) ### Bug Fixes * `mem` and `disk` inference fixes ([#3040](#3040)) ([7530794](7530794)) * avoid error accessing superclass in ioutils ([#3056](#3056)) ([a66a5f5](a66a5f5)) * disable execute after print compilation ([#3041](#3041)) ([86ed3cd](86ed3cd)) * download report assets upon package build such that reports become possible offline (cont. of [#2904](#2904)) ([#3026](#3026)) ([e8dad4b](e8dad4b)) ### Documentation * Add 'Editor integrations' section to Installation page ([#3045](#3045)) ([9a4006d](9a4006d)) * Fix typo (seesee to see) ([#3037](#3037)) ([de201fb](de201fb)) * various documentation fixes ([#3052](#3052)) ([b11460c](b11460c)) --- 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>
🤖 I have created a release *beep* *boop* --- ## [8.19.0](snakemake/snakemake@v8.18.2...v8.19.0) (2024-08-29) ### Features * check consistency of output file mtimes (must be newer than input files) ([snakemake#3050](snakemake#3050)) ([666cf62](snakemake@666cf62)) * print host name when executing workflow ([snakemake#3048](snakemake#3048)) ([b0ff787](snakemake@b0ff787)) ### Bug Fixes * `mem` and `disk` inference fixes ([snakemake#3040](snakemake#3040)) ([7530794](snakemake@7530794)) * avoid error accessing superclass in ioutils ([snakemake#3056](snakemake#3056)) ([a66a5f5](snakemake@a66a5f5)) * disable execute after print compilation ([snakemake#3041](snakemake#3041)) ([86ed3cd](snakemake@86ed3cd)) * download report assets upon package build such that reports become possible offline (cont. of [snakemake#2904](snakemake#2904)) ([snakemake#3026](snakemake#3026)) ([e8dad4b](snakemake@e8dad4b)) ### Documentation * Add 'Editor integrations' section to Installation page ([snakemake#3045](snakemake#3045)) ([9a4006d](snakemake@9a4006d)) * Fix typo (seesee to see) ([snakemake#3037](snakemake#3037)) ([de201fb](snakemake@de201fb)) * various documentation fixes ([snakemake#3052](snakemake#3052)) ([b11460c](snakemake@b11460c)) --- 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>



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
New Features
HOSToption to the Quietness settings for improved configuration flexibility.Bug Fixes
Documentation