Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
[doc] Improved doc string for logging.py function | pywikibot/core | master | +51 -5 | |
Re-added the warning() documentation | pywikibot/core | master | +13 -2 |
Details
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Invalid | None | T223529 Pywikibot good first bugs (tracking) | |||
Resolved | Xqt | T199933 Pywikibot documentation newcomer tasks | |||
Resolved | Xqt | T184115 Pywikibot: Add missing docstring params | |||
Resolved | Homeboy_445 | T85271 document pywikibot.error and pywikibot.exception |
Event Timeline
By "document" what do you mean ? Where should this be documented ? What sort of information additionally should be added ?
I clearly should have written a better bug report, because I can't reproduce the exact point ;-)
This is about the functions 'error' and 'exception' in https://github.com/wikimedia/pywikibot-core/blob/master/pywikibot/logging.py.
def output documents the meaning of the various parameters, but all of the other logging functions (def error, but also e.g. def warning, which was not mentioned in the bug title) are missing the extended documentation. That documentation should be added.
I am on it @valhallasw . I have documented the warning( ). Soon will take up the rest non-documented functions.
Thanks for reporting.
Hello, you made a pull request to GitHub repository mirror. Please see my comment there to make a correct pull request on Gerrit repository
I've pushed the changes here: https://gerrit.wikimedia.org/r/c/pywikibot/core/+/486715
@valhallasw Sorry for the great delay, I have pushed the code . Would be great if you suggest any changes.
There are multiple errors you should fix. I and @valhallasw gave you ideas what to fix there. Also there are errors reported by jenkins bot. We are waiting for your fixes :)
Change 486715 had a related patch set uploaded (by Xqt; owner: Kaushik Reddy):
[pywikibot/core@master] Re-added the warning() documentation
Change 486715 merged by jenkins-bot:
[pywikibot/core@master] Re-added the warning() documentation
Your commit was briefly edited and merged, thank you for your struggle with Gerrit and see you later!
@Urstrulykkr: Thanks for your patch. All Gerrit patches merged, can this task be closed as resolved (you can do that via Add Action... → Change Status in the dropdown menu) or is there more work to do?
Hi guys,
That's so good to hear.
I think I will close it. Thanks for the update :)
Best,
Kaushik.
In that case I am resetting the assignee of this task as it seems that @Urstrulykkr does not plan to work on these parts (please correct me if I am wrong!).
I would like to work on this task. So, would somebody guide me on how to proceed with solving this?
@Homeboy_445: pywikibot.logging has several output methods: output(), stdout(), warning(), error(), log(), critical(), debug() and also exception(). The doc strings might be improved, particulary the difference of error() and exception(). All functions are similar to the logging buildins: https://docs.python.org/3/library/logging.html?highlight=exception#logging.exception
@Xqt So do I have to enhance the documentation of pywikibot.logging particularly the error and the exception functions and their description is the same as the python docs and What do you mean by the difference between error() and exception() do I explicitly have to provide the actual difference between the error and exception or something else?
I think expanding the doc strings in logging.stdout, error, log, critical, debug and exception will solve it. Use logging.warning as a sample. Take care that logging.exception is different from the othes. In addition also be inspired from similar functions in https://docs.python.org/3/library/logging.html
@Xqt I'm done with the task but stuck with a problem. I accidentally pushed my changes to the last branch I created for the previous issue I've worked upon. So, What should I do now?
Can't see any changes at your last patch https://gerrit.wikimedia.org/r/c/pywikibot/core/+/638097
So try the following steps:
- create a new patch at your current accidentally pushed patch
- rebase it onto master
- push it to gerrit repository
- switch/checkout to your current accidentally pushed
- fetch the old patch from gerrit repository
- cherry-pick FETCH_HEAD
- make the needed changes
- commit it and push it to gerrit
@Xqt: Well, I have resolved the issue, fortunately. Please check if the made changes have met your expectations or not. Thank you!
Change 640171 had a related patch set uploaded (by Xqt; owner: Homeboy 445):
[pywikibot/core@master] [doc] Improved doc string for logging.py function
Change 640171 merged by Xqt:
[pywikibot/core@master] [doc] Improved doc string for logging.py function