docs: improve documentation for utils and pipeline modules#704
docs: improve documentation for utils and pipeline modules#704Kaibalya-Mohanty wants to merge 9 commits into
Conversation
Signed-off-by: KAIBALYA MOHANTY <168870673+Kaibalya-Mohanty@users.noreply.github.com>
Signed-off-by: KAIBALYA MOHANTY <168870673+Kaibalya-Mohanty@users.noreply.github.com>
Signed-off-by: KAIBALYA MOHANTY <168870673+Kaibalya-Mohanty@users.noreply.github.com>
Signed-off-by: KAIBALYA MOHANTY <168870673+Kaibalya-Mohanty@users.noreply.github.com>
|
@Kaibalya-Mohanty Please do only DocString changes in this PR. |
jesuino
left a comment
There was a problem hiding this comment.
Hello @Kaibalya-Mohanty
Thanks for your first contribution!
The documentation changes seems good and they are welcome! I notice that you possibly accidentally modified a function code. Would you please confirm if it was your goal to modify that or was it modified accidentally?
Thanks!
| """Remove ANSI color sequences from text.""" | ||
| ansi_color_escape = re.compile(r"\x1B\[[0-9;]*m") | ||
| return ansi_color_escape.sub("", text) | ||
| def remove_ansi_sequences(text: str) -> str: |
There was a problem hiding this comment.
I wonder if this change was expected. The function was renamed, but the reference to it in jputils.py was not updated. I would also not change the function implementation because the goal of your PR was to improve the documentation.
There was a problem hiding this comment.
Thank you for the review. The function rename and implementation changes were unintentional. I have reverted the code changes and kept only the documentation improvements.
Reverted unintended function renaming and implementation changes. Kept only the docstring improvements for remove_ansi_color_sequences. Signed-off-by: KAIBALYA MOHANTY <168870673+Kaibalya-Mohanty@users.noreply.github.com>
ederign
left a comment
There was a problem hiding this comment.
@Kaibalya-Mohanty you are still making some code changes, can you please take a look? We will soon have more issues as well, check our issues backlog! Maybe you can find something more fun to work with!
|
Hi @Bagumeow, thanks for the contribution! The CI failures are caused by this PR. |
Signed-off-by: KAIBALYA MOHANTY <168870673+Kaibalya-Mohanty@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Signed-off-by: KAIBALYA MOHANTY <168870673+Kaibalya-Mohanty@users.noreply.github.com>
Reverted broader ANSI regex, removed isinstance check, removed early-return guard in shorten_long_string, and removed added log.debug call in rm_r. Signed-off-by: KAIBALYA MOHANTY <168870673+Kaibalya-Mohanty@users.noreply.github.com>
|
Hi, I've addressed both issues raised in the review:
Please let me know if there's anything else to address. Thanks! |
ederign
left a comment
There was a problem hiding this comment.
@Kaibalya-Mohanty those doc changes don't bring much value and we are in the third round of review and you still keep the behaviour changes.
| # the exception handler handle it (i.e., check ignore_missing etc.) | ||
| raise OSError(errno.ENOENT, "No such file or directory", path) | ||
| except OSError as e: | ||
| log.debug("Error while removing path: %s", path) |
| Text with ANSI escape sequences removed. | ||
| """ | ||
|
|
||
| ansi_escape = re.compile( |
| str_input = str(obj) | ||
| return str_input[:chars] + " ..... " + str_input[len(str_input) - chars :] | ||
|
|
||
| return str_input[:chars] + " ..... " + str_input[-chars:] |
There was a problem hiding this comment.
These are NOT equivalent when chars=0:
Documentation Improvements
Improved docstrings for several utility functions:
add_stepmethod docstringThese changes aim to improve clarity and onboarding for new contributors.
Looking forward to feedback!