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

Fix doc issue where parameters listed twice in description #916

Merged
merged 8 commits into from Mar 26, 2022

Conversation

lorenzncode
Copy link
Member

Fix doc issue where parameters could be listed twice in the method description

  • Remove sphinx extension sphinx_autodoc_typehints

  • Update sphinx pin to version 4.2.0

  • Show typehints in both signature and description

…scription

* Remove sphinx extension sphinx_autodoc_typehints

* Update sphinx pin to version 4.2.0

* Show typehints in both signature and description
@lorenzncode
Copy link
Member Author

To resolve #819.

@codecov
Copy link

codecov bot commented Nov 6, 2021

Codecov Report

Merging #916 (1548bb4) into master (3efb080) will not change coverage.
The diff coverage is n/a.

❗ Current head 1548bb4 differs from pull request most recent head 9b13724. Consider uploading reports for the commit 9b13724 to get more accurate results

@@           Coverage Diff           @@
##           master     #916   +/-   ##
=======================================
  Coverage   96.29%   96.29%           
=======================================
  Files          40       40           
  Lines        9364     9364           
  Branches     1101     1101           
=======================================
  Hits         9017     9017           
  Misses        204      204           
  Partials      143      143           

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

Copy link
Member

@jmwright jmwright left a comment

Choose a reason for hiding this comment

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

I think this looks fine. Thanks @lorenzncode

@adam-urbanczyk
Copy link
Member

Looks good @lorenzncode . One minor point - would it be easy to move self to the top?

tmp

@lorenzncode
Copy link
Member Author

Yes, it's easy to move self to the top. I'll update the PR shortly.

@lorenzncode
Copy link
Member Author

I see one open issue to debug - the methods with Literal in the signature are rendered with strikethrough:

image

I also clobbered the existing setup() function that adds tables.css.

@lorenzncode
Copy link
Member Author

With docutils 0.16, the result is as expected:
image

Prior result with strikethrough text was using docutils 0.17.1. HTML is <s><span class="pre">'XY'</span></s>

Perhaps related to https://docutils.sourceforge.io/HISTORY.html

Use HTML text-level tags <small>, <s>, <q>, <dfn>, <var>, <samp>, <kbd>, <i>, <b>, <u>, <mark>, and <bdi> if a unique, matching class value is found in inline and literal elements. Use <ins> and <del> if a unique matching class value is found in inline, literal, or container elements. Use <small> for generated code line numbers.

@lorenzncode
Copy link
Member Author

The html (strikethrough) issue was reported by another user as sphinx-doc/sphinx#9872. I will update this PR after sphinx 4.3.1 is released.

@adam-urbanczyk
Copy link
Member

Shall I merge or wait for 4.3.1 @lorenzncode ?

@lorenzncode
Copy link
Member Author

I'd propose to wait for sphinx 4.3.1. I expect the release soon based on comments in the GH issues and the sphinx 4.3.1 release milestone tracker. I'll watch for the release then update this PR to pin to sphinx 4.3.1.

@lorenzncode
Copy link
Member Author

Sphinx 4.3.1 is out! The docs look good to me now (other than the known docstring issues mentioned in #922 to be fixed separately).

@jmwright
Copy link
Member

jmwright commented Dec 6, 2021

Looks like there's a glibc error with Python 3.9 in Azure's Linux runs.

@adam-urbanczyk
Copy link
Member

Yup, will look into this

@lorenzncode
Copy link
Member Author

lorenzncode commented Feb 16, 2022

  • Update sphinx pin to version 4.4.0
  • Test with new autodoc_typehints_format setting; compare 'fully-qualified' vs 'short'

I'd like to complete the tasks above before this is merged.

@lorenzncode lorenzncode marked this pull request as draft February 16, 2022 01:47
@lorenzncode
Copy link
Member Author

This could be a good time for this PR as it will resolve the current Read the Docs build failures (for example see PR #1018).

@lorenzncode lorenzncode marked this pull request as ready for review March 26, 2022 02:03
@jmwright
Copy link
Member

jmwright commented Mar 26, 2022

@lorenzncode Sounds good. It has two approvals, and all the conversation items have been addressed, so I think it is ready to merge. Do you want to do the honors?

@lorenzncode lorenzncode merged commit ee90f2c into CadQuery:master Mar 26, 2022
@jmwright
Copy link
Member

Thanks for fixing this @lorenzncode

@lorenzncode lorenzncode deleted the docs-819 branch March 26, 2022 14:28
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