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

Better docstring linker context inferface #599

Merged
merged 25 commits into from
Apr 19, 2023

Conversation

tristanlatr
Copy link
Contributor

@tristanlatr tristanlatr commented Jun 11, 2022

Related to #295, as well as #661 and #662.

This change allow us to output correct link no matter the docstring linker we use to render on what page of the documentation. Historically, the page object was always the one associated with the docstring linker's object (passed on creation), but now we make the differences in between both concepts.

I’ve also totally removed the caching system of xref links. It’s rather complex and it did not improve performance.

@codecov
Copy link

codecov bot commented Jun 11, 2022

Codecov Report

Patch coverage: 94.44% and project coverage change: -0.07 ⚠️

Comparison is base (da6d0d3) 92.47% compared to head (e7644a0) 92.40%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #599      +/-   ##
==========================================
- Coverage   92.47%   92.40%   -0.07%     
==========================================
  Files          47       47              
  Lines        8170     8060     -110     
  Branches     1948     1926      -22     
==========================================
- Hits         7555     7448     -107     
+ Misses        358      357       -1     
+ Partials      257      255       -2     
Impacted Files Coverage Δ
pydoctor/linker.py 88.13% <93.75%> (-4.41%) ⬇️
pydoctor/epydoc/markup/__init__.py 93.54% <100.00%> (ø)
pydoctor/epydoc2stan.py 94.57% <100.00%> (ø)
pydoctor/model.py 94.56% <100.00%> (ø)
pydoctor/templatewriter/pages/__init__.py 90.69% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@tristanlatr tristanlatr marked this pull request as draft June 11, 2022 20:29
@tristanlatr tristanlatr marked this pull request as ready for review November 17, 2022 22:32
@tristanlatr
Copy link
Contributor Author

This is ready to be merged.

@tristanlatr
Copy link
Contributor Author

I’ll merge this PR, need this to fix other issues.

@tristanlatr tristanlatr marked this pull request as draft November 27, 2022 22:16
@tristanlatr tristanlatr marked this pull request as ready for review January 22, 2023 23:02
@tristanlatr
Copy link
Contributor Author

@adiroiban can I have a approval for this PR since it trashes a lot of the linker code?
This code that was added for the wrong reasons and now it’s best to get rid of it.

@tristanlatr tristanlatr requested a review from a team February 13, 2023 14:37
Copy link
Member

@glyph glyph left a comment

Choose a reason for hiding this comment

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

This looks… fine, I think… but some of the docstrings and comments need some help.

pydoctor/epydoc2stan.py Outdated Show resolved Hide resolved
pydoctor/linker.py Show resolved Hide resolved
pydoctor/linker.py Outdated Show resolved Hide resolved
Copy link
Contributor Author

@tristanlatr tristanlatr left a comment

Choose a reason for hiding this comment

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

Hi @glyph, thanks a lot for your review and sorry about the poor quality of the docstrings.

pydoctor/epydoc2stan.py Outdated Show resolved Hide resolved
pydoctor/epydoc/markup/__init__.py Outdated Show resolved Hide resolved
pydoctor/linker.py Outdated Show resolved Hide resolved
pydoctor/linker.py Show resolved Hide resolved
pydoctor/linker.py Outdated Show resolved Hide resolved
pydoctor/linker.py Outdated Show resolved Hide resolved
@tristanlatr
Copy link
Contributor Author

I’ll merge this PR.

@tristanlatr
Copy link
Contributor Author

We 're good for this PR @glyph

Copy link
Member

@glyph glyph left a comment

Choose a reason for hiding this comment

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

LGTM

@tristanlatr tristanlatr merged commit c1dd0bb into master Apr 19, 2023
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.

2 participants