Skip to content

improve docstrings#266

Merged
CunliangGeng merged 11 commits into
devfrom
update_docs_docstrings
Jul 12, 2024
Merged

improve docstrings#266
CunliangGeng merged 11 commits into
devfrom
update_docs_docstrings

Conversation

@CunliangGeng

@CunliangGeng CunliangGeng commented Jul 10, 2024

Copy link
Copy Markdown
Member

Quite many small changes to the docstrings and docs to e.g.

  • add code examples
  • add link to specific function/class
  • add more explanation
  • display API doc better
    ...

CunliangGeng commented Jul 10, 2024

Copy link
Copy Markdown
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @CunliangGeng and the rest of your teammates on Graphite Graphite

@CunliangGeng CunliangGeng self-assigned this Jul 10, 2024
@CunliangGeng CunliangGeng requested a review from gcroci2 July 10, 2024 16:13
@CunliangGeng CunliangGeng marked this pull request as ready for review July 10, 2024 16:13
Base automatically changed from fix_tabular_file_header_detection to dev July 11, 2024 12:37
@CunliangGeng CunliangGeng force-pushed the update_docs_docstrings branch from b3fa22d to 6180b1a Compare July 11, 2024 12:41
@CunliangGeng CunliangGeng force-pushed the update_docs_docstrings branch from 6180b1a to 7409393 Compare July 11, 2024 14:26
Comment thread src/nplinker/arranger.py

This class is used to arrange the datasets required by NPLinker according to the
configuration. The datasets include MIBiG, GNPS, antiSMASH, and BiG-SCAPE.
??? info "Concept and Diagram"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a syntax that mkdocs recognizes and links to "Concept and Diagram"?

@CunliangGeng CunliangGeng Jul 12, 2024

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, that syntax is not for link but for creating a info block (or callout), the effect looks like (you could see that on doc website)
image

Comment thread src/nplinker/loader.py
>>> loader = DatasetLoader(config)
>>> loader.load()

See Also:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
See Also:
See also:

@CunliangGeng CunliangGeng Jul 12, 2024

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ruff requires that all section headers in a docstring should be capitalized and will automatically change also to Also. So let's use See Also:.

@gcroci2

gcroci2 commented Jul 11, 2024

Copy link
Copy Markdown
Contributor

Before merging, fix the trailing whitespace that makes format checking fail (src/nplinker/schemas/__init__.py:61:79: W291 Trailing whitespace) @CunliangGeng

CunliangGeng commented Jul 12, 2024

Copy link
Copy Markdown
Member Author

Merge activity

@CunliangGeng CunliangGeng merged commit e7efc8e into dev Jul 12, 2024
@CunliangGeng CunliangGeng deleted the update_docs_docstrings branch July 12, 2024 08:50
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants