Skip to content

Name documented parameters as the signatures define them - #350

Merged
clonker merged 1 commit into
deeptime-ml:mainfrom
dylanpulver:doc/parameter-names-match-signatures
Nov 14, 2026
Merged

clonker merged 1 commit into
deeptime-ml:mainfrom
dylanpulver:doc/parameter-names-match-signatures

Conversation

@dylanpulver

Copy link
Copy Markdown
Contributor

Six Parameters entries name an argument the function does not accept, so the rendered docs and help() list a parameter that cannot be passed. Same shape as #348, different mistake: that one documented wrong defaults, these document names that are not there.

markov/tools/estimation/api.py

  • girsanov_reweighted_count_matrix: reweighting → reweighting_factors
  • sample_tmatrix: nstep → nsteps
  • tmatrix_sampler: nstep → nsteps
  • transition_matrix: dropped the return_conv entry. It is not in the signature, and return_conv appears nowhere else in src/ or tests/.

markov/tools/estimation/sparse/count_matrix.py

  • count_matrix_coo2_mult: dtraj → dtrajs, reweighting → reweighting_factors

Descriptions, types and ordering are untouched. Only the names move, plus the one deletion.

Three I left alone

dense/ratematrix.py:258, CrommelinVandenEijndenEstimator, documents C : (N,N) ndarray as a "count matrix at a lag time dt", but the parameter is T and __init__ raises unless is_transition_matrix(T) holds. Renaming C to T would leave the text saying "count matrix", which would still be wrong, so the wording is an author's call. The other two C : (N,N) ndarray entries in that file, on KalbfleischLawlessEstimator and estimate_rate_matrix, do take a count matrix and are correct as written.

covariance/util/_running_moments.py, Moments.__init__, documents s and M against a signature of (w, sx, sy, Mxy). Splitting s into sx and sy means writing new text for a private class, so I left it rather than guess.

Glad to fold fixes for any of the three into this PR if you tell me how they should read.

  • Make sure to include one or more tests for your change
  • Add yourself to AUTHORS

Tests: none added, the change is docstring text with no runtime behaviour to cover. AUTHORS already lists me as of #348, so there is nothing to add here.

Six Parameters entries in markov/tools/estimation name an argument the
function does not take, so the keyword form raises TypeError.

- girsanov_reweighted_count_matrix and count_matrix_coo2_mult both
  document `reweighting`; the parameter is `reweighting_factors`.
- count_matrix_coo2_mult documents `dtraj`; the parameter is `dtrajs`.
- sample_tmatrix and tmatrix_sampler both document `nstep`; the
  parameter is `nsteps`.
- transition_matrix documents `return_conv`, which appears nowhere else
  in the codebase. `return_statdist` directly above it is correct.

@clonker clonker left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

thanks!

@clonker
clonker enabled auto-merge November 14, 2026 15:03
@codecov

codecov Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.03%. Comparing base (59cfe0f) to head (9b07e6a).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #350   +/-   ##
=======================================
  Coverage   94.03%   94.03%           
=======================================
  Files         141      141           
  Lines       11199    11199           
=======================================
  Hits        10531    10531           
  Misses        668      668           
Flag Coverage Δ
decomposition 48.85% <ø> (ø)
markov 69.18% <ø> (ø)
misc 65.70% <ø> (ø)

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

☔ View full report in Codecov by Harness.
📢 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.

@clonker
clonker merged commit a435c29 into deeptime-ml:main Nov 14, 2026
94 of 97 checks passed
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