Fix workflow warning#1120
Conversation
Pyright Type CompletenessView the full Project (full
Other symbols referenced but not exported by
Symbols without documentation:
Patch (exported symbols added or changed by this PR): no exported symbol type-completeness changes detected. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1120 +/- ##
=======================================
Coverage 90.81% 90.81%
=======================================
Files 91 91
Lines 5300 5300
Branches 673 673
=======================================
Hits 4813 4813
Misses 346 346
Partials 141 141
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
#1091 is merged to main |
|
@salexanian i just realized that the only place to test these fixes on our repo is directly on RTD. so i cleared out experimental. could you please merge in the latest main, then redirect this PR to experimental? |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 4ba1002. Configure here.
@henrydingliu , no problem. Per your suggestion, I've merged the latest |
| +++ | ||
|
|
||
| **Algorithms**: [Development](development:development), [ClarkLDF](development:clarkldf), … | ||
| **Algorithms**: {py:class}`chainladder.Development`, |
There was a problem hiding this comment.
this is now pointing to the API. the itnent is to point it to a dedication section in the user guide pages.

Summary of Changes
This PR fixes a number of documentation build warnings, including:
-broken internal references in the installation and workflow documentation,
-ambiguous MyST cross-references in the user guide,
-missing intersphinx configuration for scikit-learn references,
-several API/docstring cross-reference issues.
This branch is based on #1091 as discussed. Once #1091 is merged, I'll update this branch against the latest main so the PR contains only these changes.
Issue 1:
/home/docs/checkouts/readthedocs.org/user_builds/chainladder-python/checkouts/main/docs/getting_started/install.md:27: WARNING: 'myst' cross-reference target not found: 'contributing' [myst.xref_missing]Improper relative path. Fixed by changing
please refer to [Contributing](contributing)in line 27 ofinstall.mdtoplease refer to [Contributing](../library/contributing).Issue 2:
/home/docs/checkouts/readthedocs.org/user_builds/chainladder-python/envs/main/lib/python3.11/site-packages/chainladder/workflow/gridsearch.py:docstring of chainladder.workflow.gridsearch.GridSearch:39: WARNING: term not in glossary: 'n_jobs'This problem was due to two issues -
n_jobswas missing from theglossary.mdfile, and the lack of the Sphinx 'glossary' directive inglossary.md. I rectified this by: 1) adding theglossarydirective to theglossary.mdfile and 2) amending the docstring forn_jobsby reducing it to the first descriptive sentence in the docstring, and then moving the more detailed remainder of the docstring to theglossary.mdfile in a newn_jobsentry.Issue 3:
/home/docs/checkouts/readthedocs.org/user_builds/chainladder-python/envs/main/lib/python3.11/site-packages/chainladder/workflow/gridsearch.py:docstring of chainladder.workflow.gridsearch.Pipeline:4: WARNING: undefined label: 'pipeline_docs'This error was due to a broken reference. After finding the proper reference in the code, I modified line 164 of
gridsearch.pyto readRead more in the :ref:User Guide <workflow:pipeline>Issue 4:
/home/docs/checkouts/readthedocs.org/user_builds/chainladder-python/envs/main/lib/python3.11/site-packages/chainladder/workflow/gridsearch.py:docstring of chainladder.workflow.gridsearch.Pipeline.fit:32: WARNING: undefined label: 'metadata_routing'This error was due to an inability for the docstring to import the
metadata_routinglabel from thesklearnlibrary due to a failure to load intersphinx properly. I fixed this by adding new line 40 to_config.ymlas follows- sphinx.ext.intersphinxand by adding the new lines 50-53 as follows to the same file:Issue 5 and 6:
/home/docs/checkouts/readthedocs.org/user_builds/chainladder-python/envs/main/lib/python3.11/site-packages/chainladder/workflow/gridsearch.py:docstring of chainladder.workflow.gridsearch.Pipeline.fit_predict:34: WARNING: undefined label: 'metadata_routing' /home/docs/checkouts/readthedocs.org/user_builds/chainladder-python/envs/main/lib/python3.11/site-packages/chainladder/workflow/gridsearch.py:docstring of chainladder.workflow.gridsearch.Pipeline.predict:30: WARNING: undefined label: 'metadata_routing'Solved by the solution to Issue 4 above.
Issue 7:
/home/docs/checkouts/readthedocs.org/user_builds/chainladder-python/envs/main/lib/python3.11/site-packages/chainladder/workflow/voting.py:docstring of chainladder.workflow.voting.VotingChainladder:9: WARNING: undefined label: 'voting'Fixed by amending line 165 of
voting.pyto read:Read more in the :ref:User Guide <workflow:votingchainladder>.(the reference within the chevrons was wrong).Issue 8:
/home/docs/checkouts/readthedocs.org/user_builds/chainladder-python/checkouts/main/docs/user_guide/development.ipynb:540023: WARNING: 'myst' cross-reference target not found: 'modules/generated/chainladder.MunichAdjustment' [myst.xref_missing]Fixed by correcting path from
modules/generated/chainladder.MunichAdjustmentto../library/generated/chainladder.MunichAdjustmentindevelopment.ipynb. Also fixed reference to BerquistSherman to add a link like for Munich (housekeeping change).Issues 9-11:
/home/docs/checkouts/readthedocs.org/user_builds/chainladder-python/checkouts/main/docs/user_guide/development.ipynb:540026: WARNING: 'myst' cross-reference target not found: 'modules/generated/chainladder.MunichAdjustment' [myst.xref_missing] /home/docs/checkouts/readthedocs.org/user_builds/chainladder-python/checkouts/main/docs/user_guide/development.ipynb:540030: WARNING: 'myst' cross-reference target not found: 'modules/generated/chainladder.MunichAdjustment' [myst.xref_missing] /home/docs/checkouts/readthedocs.org/user_builds/chainladder-python/checkouts/main/docs/user_guide/development.ipynb:620011: WARNING: 'myst' cross-reference target not found: 'modules/generated/chainladder.MunichAdjustment' [myst.xref_missing]Solved by solution to issue 8 above.
Issues 12 and 13:
/home/docs/checkouts/readthedocs.org/user_builds/chainladder-python/checkouts/main/docs/user_guide/index.md:12: WARNING: more than one target found for 'myst' cross-reference triangle: could be :std:ref:Trianglesor :std:doc:Triangles[myst.xref_ambiguous] /home/docs/checkouts/readthedocs.org/user_builds/chainladder-python/checkouts/main/docs/user_guide/index.md:22: WARNING: more than one target found for 'myst' cross-reference triangle: could be :std:ref:Triangleor :std:doc:Triangle[myst.xref_ambiguous]Changed
[Triangle](triangle)to{doc}Trianglesfor the first reference, and changedClasses: TriangletoClasses: {py:class}chainladder.Triangle`.Issue 14:
/home/docs/checkouts/readthedocs.org/user_builds/chainladder-python/checkouts/main/docs/user_guide/index.md:29: WARNING: more than one target found for 'myst' cross-reference development: could be :std:doc:Developmentor :py:mod:chainladder.development[myst.xref_ambiguous]Similar change to issues 12 and 13 above.
Issues 15-19:
/home/docs/checkouts/readthedocs.org/user_builds/chainladder-python/checkouts/main/docs/user_guide/index.md:45: WARNING: more than one target found for 'myst' cross-reference tails: could be :std:doc:Tail Estimationor :py:mod:chainladder.tails[myst.xref_ambiguous] /home/docs/checkouts/readthedocs.org/user_builds/chainladder-python/checkouts/main/docs/user_guide/index.md:61: WARNING: more than one target found for 'myst' cross-reference methods: could be :std:doc:IBNR Modelsor :py:mod:chainladder.methods[myst.xref_ambiguous] /home/docs/checkouts/readthedocs.org/user_builds/chainladder-python/checkouts/main/docs/user_guide/index.md:79: WARNING: more than one target found for 'myst' cross-reference adjustments: could be :std:doc:Adjustmentsor :py:mod:chainladder.adjustments[myst.xref_ambiguous] /home/docs/checkouts/readthedocs.org/user_builds/chainladder-python/checkouts/main/docs/user_guide/index.md:97: WARNING: more than one target found for 'myst' cross-reference workflow: could be :std:doc:Workflowor :py:mod:chainladder.workflow[myst.xref_ambiguous]Similar changes to issues 12 and 13 above.
Issue 20: I also fixed the following issue:
/home/docs/checkouts/readthedocs.org/user_builds/chainladder-python/envs/main/lib/python3.11/site-packages/chainladder/core/triangle.py:docstring of chainladder.core.triangle.Triangle:97: ERROR: Unknown target name: "ultimate". looking for now-outdated files... none foundby changing a reference to
ultimate_to'ultimate_'The warnings no longer show when I perform the build using
uv run jb build ..Related GitHub Issue(s)
#1091 and #1111
Additional Context for Reviewers
uv run pytest) and documentation changes (uv run jb build docs --builder=custom --custom-builder=doctest)Note
Low Risk
Documentation and docstring-only changes with no application logic or API behavior changes.
Overview
This PR targets Sphinx/Jupyter Book build warnings rather than runtime behavior.
Docstrings in
gridsearch.pyandvoting.pynow point at the correct user-guide labels (workflow:pipeline,workflow:votingchainladder).GridSearch’sn_jobsparameter defers detail to the glossary via:term:Glossary <n_jobs>. **`Triangle`** disposal-rate docs use double-backtickultimate_`` so Sphinx does not treat it as a broken link target.Sphinx config adds
sphinx.ext.intersphinxand a scikit-learn mapping in_config.yml/conf.pyso sklearn docstring references (e.g.metadata_routing) resolve.numpydoc_show_class_membersis set consistently in generatedconf.py.User-facing docs: the install page’s Contributing link uses
../library/contributing; the user guide index replaces ambiguous MyST links with explicit{doc}/{py:class}roles;development.ipynbfixes generated API paths and adds a BerquistSherman link.glossary.mdwraps terms in{glossary}directives, adds ann_jobsentry, and fixes the package name typochanladder→chainladder.Reviewed by Cursor Bugbot for commit f2f5f89. Bugbot is set up for automated code reviews on this repo. Configure here.