fix: correct the get_parkinson_vol spelling in the public API - #23
Closed
Sean-Koval wants to merge 1 commit into
Closed
fix: correct the get_parkinson_vol spelling in the public API#23Sean-Koval wants to merge 1 commit into
Sean-Koval wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #20 (it reformats the same crate) — merge that first.
Breaking change, made on your instruction ("rename and fix to proper name").
What
Parkinsonwas spelledparksinsonin both the Rust function and the Python binding. Because#[pyfunction(name = "get_parksinson_vol")]is the public Python API, correcting it breaks anydownstream caller — which is why it was raised before doing it rather than fixed silently.
Renamed:
openquant::util::volatility::get_parksinson_vol→get_parkinson_volpyopenquantwrapper fn, its#[pyfunction(name = …)], and its module registrationcrates/openquant/tests/volatility_features.rsOne thing deliberately left misspelled
The doc comment still names mlfinlab's
get_parksinson_vol, because that misspelling isupstream's and is where ours came from. The comment now says so explicitly instead of propagating it
silently:
Verification
cargo fmt -- --check→ 0cargo test --package openquant --test volatility_features→ 0 (1 passed)cargo check --package pyopenquant→ 0Follow-up needed after the docs stack merges
docs-site/src/data/moduleDocs.tsand the generatedmodules/util-volatility.mdstill reference theold 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.tsplus a regenerate —and #21's new
check:examplesgate will fail loudly until it is done, which is the correct behaviour.