mirror of
https://github.com/XuehaiPan/nvitop.git
synced 2026-05-15 14:15:55 -06:00
[PR #132] [MERGED] fix(collector): fix documentation for ResourceMetricCollector.clear() function #170
Labels
No labels
api
bug
bug
cli / tui
dependencies
documentation
documentation
documentation
duplicate
enhancement
exporter
invalid
pull-request
pynvml
question
question
upstream
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/nvitop#170
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/XuehaiPan/nvitop/pull/132
Author: @MyGodItsFull0fStars
Created: 7/22/2024
Status: ✅ Merged
Merged: 8/7/2024
Merged by: @XuehaiPan
Base:
main← Head:fix-documentation📝 Commits (5)
83a2d0bFixed documentation forResourceMetricCollector.clear()methodd62e256Added reset alias for ResourceMetricCollector clear() functionca6c30fstyle: run pre-commit hooks56a51d4Merge branch 'main' into pr/MyGodItsFull0fStars/1321214010docs(CHANGELOG): update CHANGELOG.md📊 Changes
2 files changed (+10 additions, -7 deletions)
View changed files
📝
CHANGELOG.md(+1 -0)📝
nvitop/api/collector.py(+9 -7)📄 Description
The docstrings of
ResourceMetricCollectorreferred to theclear()function asreset(), which is not existing.Therefore, I replaced each mention of
reset()withclear()in the documentation.Issue Type
Runtime Environment
3.7.2/3.9.6]460.84]nvitopversion or commit: [e.g.0.10.0/0.10.1.dev7+ga083321/main@75ae3c]python-ml-pyversion: [e.g.11.450.51]C/C.UTF-8/en_US.UTF-8]Description
Within the
ResourceMetricCollectorclass, theclear()function was not used in the documentation for the class, nor the docstring of the function itself, butreset().As the
reset()function is not existing forResourceMetricCollector, I replaced all occurrences of it in the documentation withclear()as well as changing the description of theclear()function to reflect it's name better.Motivation and Context
The motivation is, that I was looking at the documentation and tried to use the
reset()function for aResourceMetricCollectorinstance, and encountered an error.I had to look at the code to see that the function I have to use is called
clear().Testing
As I only changed the docstrings within the
ResourceMetricCollectorclass, I did not test my changes.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.