Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Doc] Fix docstring warnings #1084

Merged
merged 8 commits into from
Dec 22, 2021
Merged

[Doc] Fix docstring warnings #1084

merged 8 commits into from
Dec 22, 2021

Conversation

jin-s13
Copy link
Collaborator

@jin-s13 jin-s13 commented Dec 17, 2021

Motivation

Fix most of the docstring warnings. Make mmpose.api look good in the doc.
Check https://mmpose--1084.org.readthedocs.build/en/1084/api.html

Modification

  1. Take care of the spelling. Use "Note:" instead of "Notes:". Use "Returns:" instead of "return:"
  2. Use "-" for each item in the list.

For example:

    Note:
        - num_bboxes: N
        - num_keypoints: K
  1. Use a "tab" (4 spaces) before a new line.
  2. Add an empty line before bullet list.
  3. Use lower case for "list" and "tuple", instead of "List" and "Tuple".
  4. Multiple lines in "Returns", should add "" at the end of each line.
  5. For "Returns", if multiple variables are returned, the format should look like this..
  Returns:
        tuple: A tuple containing multi-stage outputs.

        - list[Tensor]: multi-stage heatmaps.
        - list[Tensor]: multi-stage tags.

  1. Other Format

The example below does not look good.

Returns:
        flipped_feature_maps (list(torch.Tensor)): Flipped feature_maps.

Please consider modifying it as follows. (1) Remove the variable name (2) change () -> []

Returns:
        list[Tensor]: Flipped feature_maps.

  1. Please use "," to separate Tensor/np.ndarray shape instead of using "x"

torch.Tensor[NxCxHxW] --> torch.Tensor[N,C,H,W]

BC-breaking (Optional)

Use cases (Optional)

Checklist

Before PR:

  • I have read and followed the workflow indicated in the CONTRIBUTING.md to create this PR.
  • Pre-commit or linting tools indicated in CONTRIBUTING.md are used to fix the potential lint issues.
  • Bug fixes are covered by unit tests, the case that causes the bug should be added in the unit tests.
  • New functionalities are covered by complete unit tests. If not, please add more unit tests to ensure correctness.
  • The documentation has been modified accordingly, including docstring or example tutorials.

After PR:

  • CLA has been signed and all committers have signed the CLA in this PR.

@CLAassistant
Copy link

CLAassistant commented Dec 17, 2021

CLA assistant check
All committers have signed the CLA.

@jin-s13 jin-s13 changed the base branch from master to dev-0.22 December 17, 2021 03:18
@codecov
Copy link

codecov bot commented Dec 17, 2021

Codecov Report

❗ No coverage uploaded for pull request base (dev-0.22@c918dbe). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##             dev-0.22    #1084   +/-   ##
===========================================
  Coverage            ?   82.42%           
===========================================
  Files               ?      202           
  Lines               ?    16032           
  Branches            ?     2860           
===========================================
  Hits                ?    13215           
  Misses              ?     2095           
  Partials            ?      722           
Flag Coverage Δ
unittests 82.36% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c918dbe...ceec02b. Read the comment docs.

@ly015 ly015 changed the title Fix docstring warnings [Doc] Fix docstring warnings Dec 17, 2021
@ly015 ly015 merged commit cfd4d2e into dev-0.22 Dec 22, 2021
@jin-s13 jin-s13 deleted the fix_doc_typd branch December 27, 2021 06:35
ly015 pushed a commit that referenced this pull request Jan 4, 2022
* fix doc patch1

* fix docstring

* fix docstring

* fix dataset

* fix dataset

* fix docstring

* resolve warnings

* fix multilines
ly015 pushed a commit that referenced this pull request Jan 5, 2022
* fix doc patch1

* fix docstring

* fix docstring

* fix dataset

* fix dataset

* fix docstring

* resolve warnings

* fix multilines
shuheilocale pushed a commit to shuheilocale/mmpose that referenced this pull request May 6, 2023
* fix doc patch1

* fix docstring

* fix docstring

* fix dataset

* fix dataset

* fix docstring

* resolve warnings

* fix multilines
ajgrafton pushed a commit to ajgrafton/mmpose that referenced this pull request Mar 6, 2024
* fix doc patch1

* fix docstring

* fix docstring

* fix dataset

* fix dataset

* fix docstring

* resolve warnings

* fix multilines
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.

None yet

3 participants