Repository navigation
ENH: Use lower case as the only spelling of string options that arch shows - #955
Merged
Merged
Conversation
…shows
Matching of string options is not case sensitive, but a few options still
had a canonical spelling that was not lower case, and arch showed it in
docstrings, annotations, defaults, error messages and attributes. Lower
case is now the only spelling that arch shows:
- MCS: method is "r" or "max" (the method attribute was "R").
- phillips_ouliaris, phillips_ouliaris_cv and phillips_ouliaris_pval:
test_type is "za", "zt", "pu" or "pz". The tests keep their names in the
results ("Phillips-Ouliaris Zt Cointegration Test").
- ARCHModelResult.plot: annualize is "d", "w" or "m".
- arch_model: the annotations, defaults and docstrings use "constant",
"garch" and the other lower case names.
- Kernels: the error message and the docstrings list the names of the
classes in KERNELS in lower case with hyphens, such as
"quadratic-spectral".
Every previous spelling is still accepted and gives the same results. The
tests that checked the old values and messages are updated, and
test_lower_case_options.py checks the annotations, defaults, documented sets,
the values listed in error messages and the exposed values.
xref #947, #950
The narrative documentation and the example notebooks pass the options of arch_model, plot and phillips_ouliaris and the kernel names in lower case. xref #947
| ) | ||
| self.name = f"Phillips-Ouliaris {test_type} Cointegration Test" | ||
| name = _TEST_NAMES.get(test_type.lower(), test_type) | ||
| self.name = f"Phillips-Ouliaris {name} Cointegration Test" |
This was referenced Oct 17, 2026
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #955 +/- ##
==========================================
- Coverage 99.01% 98.96% -0.06%
==========================================
Files 134 135 +1
Lines 29563 29725 +162
Branches 2290 2314 +24
==========================================
+ Hits 29271 29416 +145
- Misses 239 255 +16
- Partials 53 54 +1
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:
|
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.
Branch
a90-lower1-option-case, 4 commits ona90-fix-main-tests. Merge #953first. This is release decision 64: "Lower case should be the only way the
arch package makes official strings shown to users, even though case
insensitive matching is used."
#947 made every string option case-insensitive, but a few still showed or
stored capitals. They are now lower case everywhere arch shows them:
method: the storedMCS.methodis now"r"; it was"R"."max"is unchanged.
arch_model: themean/volannotations and defaults are now"constant"and"garch"; they were"Constant"and"GARCH".plot(annualize=...)is now"d","w","m"; thePhillips-Ouliaris
test_typeis now"za","zt","pu","pz"; kernel namesin messages and docs are written like
"quadratic-spectral"and"newey-west".Literalannotations, signature defaults, docstring option sets,error messages, four documentation pages and five example notebooks.
Matching is still case-insensitive:
vol="GARCH",method="R"andannualize="D"work and give identical results. Names that are not optionvalues are unchanged: model and process names in summaries, class names such as
the
KERNELSkeys, and test names such as "Phillips-Ouliaris Zt CointegrationTest".
Behaviour, compared with the base on 1461 cases (every function × option ×
spelling):
MCS.method. The MCS p-values and theincluded/excluded sets are identical for "R", "r" and "max".
The golden battery is identical.
Tests: 845 new tests in
arch/tests/test_lower_case_options.py(annotations,defaults, documented sets, listed values, exposed values, and old spellings
still accepted); 14 test files updated for the new values and messages. Fast
suite 24,467 passed. The only failures are the 7 covariance dtype tests that
also fail on main; a separate PR fixes them. Docs build 0 warnings; numpydoc lint
0; style clean. The release notes have a backward-incompatible entry for the
exposed values and messages.
🤖 Generated with Claude Code