Skip to content

docs: add tail estimator doctest examples#801

Open
EKtheSage wants to merge 3 commits into
casact:mainfrom
EKtheSage:docs/704-tail-examples
Open

docs: add tail estimator doctest examples#801
EKtheSage wants to merge 3 commits into
casact:mainfrom
EKtheSage:docs/704-tail-examples

Conversation

@EKtheSage
Copy link
Copy Markdown
Contributor

@EKtheSage EKtheSage commented May 16, 2026

Summary: Add Sphinx doctest examples for TailBondy, TailClark, and TailCurve docs. Split from the larger #792 work and intentionally excludes .github/workflows/sync-main-to-docs.yml. Refs #704


Note

Low Risk
Low risk documentation-only change; the main risk is brittle doctest expectations if sample data or numeric outputs change.

Overview
Adds Sphinx doctest Examples sections to the TailBondy, TailClark, and TailCurve docstrings, showing how changing key parameters (e.g., earliest_age, growth, curve) affects the fitted tail/LDF outputs.

These examples include testsetup, testcode, and expected testoutput blocks so the documentation can be validated as executable examples.

Reviewed by Cursor Bugbot for commit 9df7c01. Bugbot is set up for automated code reviews on this repo. Configure here.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.23%. Comparing base (72b270c) to head (9df7c01).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #801   +/-   ##
=======================================
  Coverage   86.23%   86.23%           
=======================================
  Files          86       86           
  Lines        4947     4947           
  Branches      643      643           
=======================================
  Hits         4266     4266           
  Misses        484      484           
  Partials      197      197           
Flag Coverage Δ
unittests 86.23% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@EKtheSage EKtheSage force-pushed the docs/704-tail-examples branch from bf1dd34 to 9df7c01 Compare May 17, 2026 04:20

Examples
--------
Start the Bondy fit later when earlier link ratios are too volatile for the
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

this is an instructive example. please elaborate


.. testoutput::

0.5
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

are these two results too close to demonstrate the theoretical knowledge offer by the setup of the example?

--------
Compare Clark growth curves when the selected tail shape is part of the
modeling judgment. The tail LDF changes because each curve extrapolates the
remaining development differently.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

these sentences are tautologies (i.e. output changes because input is different), which are not instructive. can we explain why one is much higher than the other, rather than just observing that they are in fact different?


Examples
--------
Compare parametric tail curves when the same development pattern can
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

when should someone use exponential? when should someone use power? what should they use to evaluate the fit?

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