Skip to content

fix: correct the get_parkinson_vol spelling in the public API - #23

Closed
Sean-Koval wants to merge 1 commit into
chore/cargo-fmt-pyopenquantfrom
fix/rename-parkinson-vol
Closed

fix: correct the get_parkinson_vol spelling in the public API#23
Sean-Koval wants to merge 1 commit into
chore/cargo-fmt-pyopenquantfrom
fix/rename-parkinson-vol

Conversation

@Sean-Koval

Copy link
Copy Markdown
Contributor

Stacked on #20 (it reformats the same crate) — merge that first.

Breaking change, made on your instruction ("rename and fix to proper name").

What

Parkinson was spelled parksinson in both the Rust function and the Python binding. Because
#[pyfunction(name = "get_parksinson_vol")] is the public Python API, correcting it breaks any
downstream caller — which is why it was raised before doing it rather than fixed silently.

Renamed:

  • openquant::util::volatility::get_parksinson_volget_parkinson_vol
  • the pyopenquant wrapper fn, its #[pyfunction(name = …)], and its module registration
  • crates/openquant/tests/volatility_features.rs

One thing deliberately left misspelled

The doc comment still names mlfinlab's get_parksinson_vol, because that misspelling is
upstream's and is where ours came from. The comment now says so explicitly instead of propagating it
silently:

/// Mirrors mlfinlab's `get_parksinson_vol` — note that upstream misspells
/// "Parkinson"; this crate spells it correctly.

Verification

  • cargo fmt -- --check → 0
  • cargo test --package openquant --test volatility_features → 0 (1 passed)
  • cargo check --package pyopenquant → 0

Follow-up needed after the docs stack merges

docs-site/src/data/moduleDocs.ts and the generated modules/util-volatility.md still reference the
old name in four places. They are not updated here on purpose: this branch sits on the crates/
stack and carries the old page generator, so regenerating from here would revert the honest-status
work in #18. Once #18/#21 and this land, it is a one-line edit in moduleDocs.ts plus a regenerate —
and #21's new check:examples gate will fail loudly until it is done, which is the correct behaviour.

The Rust fn and the Python binding both spelled Parkinson as 'parksinson'.
The pyfunction name IS the public Python API, so this is a deliberate
breaking rename, made on the owner's instruction.

Renamed: openquant::util::volatility::get_parksinson_vol ->
get_parkinson_vol, the pyopenquant wrapper, its #[pyfunction(name = ...)],
its module registration, and the volatility_features test.

The doc comment still names mlfinlab's 'get_parksinson_vol' because that
misspelling is upstream's and is where ours came from; the comment now
says so rather than propagating it silently.
@Sean-Koval
Sean-Koval deleted the branch chore/cargo-fmt-pyopenquant August 31, 2026 03:12
@Sean-Koval Sean-Koval closed this Aug 31, 2026
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.

1 participant