question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItĀ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use autodoc_typehints = "description" in conf.py

See original GitHub issue

šŸ“š Documentation

EDITED HERE: As a help wanted issue, please, see below comment https://github.com/pytorch/ignite/issues/1665#issuecomment-783240506 on what remains to do here. Thanks

If there are many arguments in class/function/method, it’s a little hard to read/scan all arguments (due to typehints). Although there is a Parameters section, there might be missing some arguments (rarely though). And we are duplicating type hints work in both signatures and docstring. Writing once can make less work on authors and less type hints mismatch can occur.

If we can remove type hints, it can be a little easier to read, and showing type hints only in Parameters section.

For example: Before: Screen Shot 2021-02-21 at 22 52 16 After: Screen Shot 2021-02-21 at 22 51 40

Changing to this docs style needs a little work. It needs to

  • add
autoclass_content = "both"
autodoc_typehints = "description"  # new in sphinx 3.1

those lines in conf.py

  • removing type hints in docstring
  • leaving type hints only in signatures.

Let me know what you think. cc: @vfdev-5 @sdesrozis @trsvchn

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
ydcjeffcommented, Feb 23, 2021

OK, then I will start with contrib.engines module. On VSCode, you can use \(\w+.*(\s+\w+)*\): regex for search and replace.

Modules left to do:

  • ignite.engine
  • ignite.handlers
  • ignite.metrics
  • ignite.distributed
  • ignite.utils
  • ignite.contrib.engines
  • ignite.contrib.metrics
  • ignite.contrib.handlers
1reaction
vfdev-5commented, Feb 22, 2021

Oh, I see, thanks for the clarification @ydcjeff ! I think we can proceed with that in parallel with other PRs and sync between them depending on which one is merged before.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configuration - Sphinx documentation
This file (containing Python code) is called the ā€œbuild configuration fileā€ and contains (almost) all configuration needed to customize Sphinx input and outputĀ ......
Read more >
Sphinx configuration for generating CodeChat's documentation
conf.py - Sphinx configuration for generating CodeChat's documentation¶. This file configures Sphinx, which transforms restructured text (reST) into html.
Read more >
Sphinx documentation set meta directive (description based ...
I would like to set meta description using conf.py in one global config file. There is an extension sphinxext-opengraph with option toĀ ...
Read more >
Sphinx Configuration — Sphinx-RTD-Tutorial documentation
Autodoc configuration​​ This is equivalent to adding the directory of our Python source files to PYTHONPATH.
Read more >
System for automated Quality Control (SaQC) - GitHub
Usage. SaQC is both, a command line application controlled by a text based configuration and a python module with a simple API.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found