Changelog for ts-stat-testsπ
v1.0.1
v1.0.1 - Refresh documentation structure, add new pages, update package infrastructure and enhance repo securityπ
v1.0.1
2026-02-01
data-science-extensions/ts-stat-tests/releases/v1.0.1
Release Notes
This release marks a significant milestone in the ts-stat-tests library, transitioning the project to Production/Stable status. The focus of this update is a comprehensive overhaul of the documentation architecture, the integration of mathematical rendering capabilities, and the hardening of the repository's security and CI/CD workflows.
π Key Highlightsπ
Core Infrastructure & Securityπ
- Production Status: Elevated the
development_statusto "5 - Production/Stable" inpyproject.toml, reflecting the library's maturity and stability. - CodeQL Analysis: Introduced a new CodeQL workflow to perform advanced static analysis for both Python and GitHub Actions, ensuring high code quality and security standards.
- Automated Dependency Management: Configured Dependabot to monitor and update
pipand GitHub Actions dependencies weekly. - Metadata Refinement: Updated project classifiers to better represent the library's focus on Mathematical Engineering and Scientific Research.
Documentation Overhaulπ
- Restructured Navigation: Organised the documentation into a clearer "Basic" vs "Advanced" hierarchy in
mkdocs.ymlto improve the onboarding experience for new users while maintaining deep references for experts. - New "Getting Started" Guide: Added a Getting Started page that explains the library's tiered API structure (Dispatchers, Boolean Checks, and Algorithms) and provides usage examples for data loaders.
- Exhaustive Algorithm Catalog: Created the Algorithms Guide, documenting the rationale for library selections and providing a detailed catalog of all implemented statistical tests.
- Comprehensive FAQ: Launched a FAQ section to address common conceptual questions, such as the handling of the Null Hypothesis (\(H_0\)) and the benefits of the library's unified interface.
Mathematical & Visual Enhancementsπ
- KaTeX Integration: Integrated KaTeX for browser-side rendering of mathematical expressions, ensuring that statistical hypotheses and formulas are displayed precisely throughout the documentation.
- Visual Iconography: Enhanced all primary documentation headers with relevant emoji icons (e.g.,
π‘,π,π) to facilitate quicker visual scanning and brand consistency.
Bug Fixes & Refinementsπ
- ADF Parameter Unpacking: Fixed an issue in the documentation for the
adf()algorithm where return values were incorrectly unpacked whenstore=True. - Linearity Options: Standardised the naming of
extra:parameters across the linearity module's tests and algorithms. - Spelling Standardisation: Synchronised all documentation and comments to adhere to Australian English standards (e.g., prioritising
-iseover-ize).
π Change Metricsπ
| Metric | Value |
|---|---|
| Files Changed | 13 |
| Lines Added | +672 |
| Lines Deleted | -201 |
| Project Status | Production/Stable |
| Spelling Standard | Australian English |
π οΈ Internal Changesπ
- Update
.gitignoreto exclude AI instruction sets and local output directories. - Bump
uv-pre-commitversion to0.9.28. - Refine docstring formats to comply with strict DFC (Docstring Format Checker) rules.
πͺ Pull Requestsπ
- Refresh documentation structure, add new pages, update package infrastructure and enhance repo security by @chrimaho in https://github.com/data-science-extensions/ts-stat-tests/pull/34
Full Changelog: https://github.com/data-science-extensions/ts-stat-tests/compare/v1.0.0...v1.0.1
Updates
f796a00: Fix argument unpacking in ADF function call- Remove the
usedlagandnobsarguments from the unpacking of theadf()function. - Ensure the call to
adf()remains functional with the updated argument list. (by chrimaho)
- Remove the
b2fbf08: Properly indentsteps:incodeqlworkflow- Standardise indentation and formatting in the
.github/workflows/codeql.ymlfile. - Ensure consistent use of comments to describe each step in the workflow.
- Maintain clarity in the
Checkout repositoryandInitialize CodeQLsteps. - Improve readability of the
Run manual build stepssection with clearer comments. (by chrimaho)
- Standardise indentation and formatting in the
466984f: Fix yaml syntax error
The matrixinclude:list items are not indented under include: (the- language: ...entries are aligned withinclude:). This is invalid YAML and will prevent the workflow from loading. Indent the list soinclude:maps to a sequence. (by chrimaho)59b2173: Update JavaScript assets in MkDocs configuration- Replace the
assets/js/katex.jsentry with the CDN link for KaTeX. - Add the
https://unpkg.com/katex@0/dist/katex.min.jsandhttps://unpkg.com/katex@0/dist/contrib/auto-render.min.jsentries. - Ensure proper loading of KaTeX for rendering mathematical expressions. (by chrimaho)
- Replace the
7611234: Fix typo
numpyis imported in the example but never used. Dropping the unused import will keep the quickstart snippet minimal and avoids lint warnings for readers who copy/paste it. (by chrimaho)19c9583: Fix typos
get_sine_wave()is shown being called withn/periodsarguments, but the actual function signature takes no parameters. As written, this example will raiseTypeError. Either update the example to callget_sine_wave()as implemented, or extend the API to support the documented parameters. (by chrimaho)1817f46: Fix typo
The snippets include syntax is inconsistent with the other pages (e.g.,--8<-- "README.md") and may not be parsed correctly without quotes. Use the quoted form for the LICENSE include to match the existing working pattern. (by chrimaho)7ad2618: Fix typo
Grammar: βlibraries which implements these testsβ should be βlibraries which implement these testsβ. (by chrimaho)24c85c7: Correct import paths
In the βPython Importβ table, the RUR and ZA rows label the import source aspmdarima, but the imports shown are fromstatsmodels. This is misleading when readers try to map tests to upstream librariesβplease correct the library labels for those rows. (by chrimaho)0d7e3d7: Refresh docs comment
The sampleValueErrormessage here doesn't match what the library actually raises.generate_error_message()produces messages likeInvalid 'algorithm': <value>. Options: <options>, not the multi-lineInvalid value for parameter... Parsed...format shown. Updating the example to match the real output will prevent confusion when troubleshooting. (by chrimaho)2c0a6d5: Reword docs
This section states that the project βstrictly forbid[s] the use ofAnyβ, but the current codebase does useAny(e.g.,ts_stat_tests.stationarity.algorithms.adfassignsres: Any = _adfuller(...)). Either relax/reword this requirement (e.g., βavoidAnywhere possibleβ) or align the implementation to match the stated policy. (by chrimaho)6b8ee18: Update getting started documentation for clarity and detail- Enhance descriptions of data loading functions in the
ts_stat_tests.utils.datamodule. - Include links for
load_airline(),load_macrodata(),get_sine_wave(),get_noise_data(), andget_random_generator(). - Revise the available test categories table to include links for each category and its corresponding algorithms.
- Improve formatting for better readability and navigation within the documentation. (by chrimaho)
- Enhance descriptions of data loading functions in the
0743f40: Add FAQ section to documentation- Introduce a new FAQ section in the documentation for
ts-stat-tests. - Explain the differences between "Dispatcher", "Boolean", and "Algorithm" functions.
- Describe the advantages of using
ts-stat-testsover direct calls to underlying packages. - Clarify the handling of the Null Hypothesis (\(H_0\)) in statistical tests.
- Provide troubleshooting tips for common errors and usage questions.
- Include installation details and rationale for dependencies like
numpy. (by chrimaho)
- Introduce a new FAQ section in the documentation for
9de5928: Update documentation for algorithms and getting started pages- Enhance section headings with relevant emojis for better visual appeal.
- Change heading for selection rationale to
π‘ Selection Rationale. - Change heading for exhaustive test catalog to
π Exhaustive Test Catalog. - Change heading for advanced usage patterns to
π Advanced Usage Patterns. - Change heading for developer information to
π οΈ Developer Information. - Change heading for available test categories to
π Available Test Categories. - Ensure consistent use of Australian English spelling, changing
prioritizedtoprioritised. (by chrimaho)
- Enhance section headings with relevant emojis for better visual appeal.
12a3976: Add KaTeX support for rendering mathematical expressions- Introduce the
katex.jsfile to handle rendering of mathematical expressions. - Subscribe to
document$to render math in the document body. - Define delimiters for inline and block math rendering.
- Update
mkdocs.ymlto include the newkatex.jsfile in extra JavaScript. - Add KaTeX CSS and JavaScript files for proper rendering. (by chrimaho)
- Introduce the
ef0174b: Update documentation for algorithms and tests- Add detailed analysis of algorithms in
algorithms.md. - Include rationale for library selection and coverage in the documentation.
- Introduce an exhaustive test catalog with implementation status and library references.
- Enhance the
index.mdfile by consolidating content and improving clarity. - Remove outdated sections and streamline the overall structure of the documentation. (by chrimaho)
- Add detailed analysis of algorithms in
5f40a50: Add algorithms page to docs- Create a new
algorithms.mdfile for algorithm usage documentation. - Update
mkdocs.ymlto include the new Algorithms section in the navigation. (by chrimaho)
- Create a new
5515331: Fix typo in options for linearity modules- Correct
extras:toextra:in the options forts_stat_tests.linearity.tests. - Correct
extras:toextra:in the options forts_stat_tests.linearity.algorithms. (by chrimaho)
- Correct
952a9ad: Update module links in documentation- Change links for modules in the documentation to include
.mdfile extensions. - Ensure consistency in linking to module descriptions for better navigation. (by chrimaho)
- Change links for modules in the documentation to include
bc32692: Add Getting Started documentation forts-stat-tests- Introduce the
Getting Startedsection to provide an overview of the library. - Outline installation instructions using
uvandpip. - Explain core concepts and structure of the library's modules.
- Provide a quickstart example for performing a stationarity test.
- List utility data loaders available in the
ts_stat_tests.utils.datamodule. - Detail available test categories and their corresponding dispatchers and checks. (by chrimaho)
- Introduce the
cb50c1b: Add FAQ section to documentation- Create a new
faq.mdfile to address common questions. - Update
mkdocs.ymlto include the FAQ section in the navigation. (by chrimaho)
- Create a new
42d5b60: Add license documentation to project- Create a new file
license.mdto include licensing information. - Update
mkdocs.ymlto add a navigation entry for the License section. (by chrimaho)
- Create a new file
ae98c84: Refactor navigation structure in documentation- Organise the navigation menu in
mkdocs.ymlfor better clarity. - Group related items under
BasicandGeneralcategories. - Ensure all links remain functional after restructuring. (by chrimaho)
- Organise the navigation menu in
ee6f791: Add Getting Started section to documentation- Create a new
getting_started.mdfile for user onboarding. - Include the
Getting Startedentry in the navigation ofmkdocs.yml. (by chrimaho)
- Create a new
eeaa0d0: Add CodeQL workflow for advanced code analysis- Introduce the
.github/workflows/codeql.ymlfile for CodeQL analysis. - Configure triggers for
pushandpull_requestevents on themainbranch. - Schedule weekly analysis using a cron job.
- Define job matrix for multiple languages including
actionsandpython. - Set up permissions for security events and package access.
- Include steps for checking out the repository and initializing CodeQL tools.
- Add a manual build step for languages requiring custom build commands.
- Implement the
Perform CodeQL Analysisstep for code scanning. (by chrimaho)
- Introduce the
58e78c9: Update dependency versions inpyproject.toml- Adjust
blackversion for compatibility with Python versions. - Specify conditional dependencies for
ipykernel,isort, andpylintbased on Python version. - Update
docstring-inheritanceandmkdocstringsversions for Python compatibility. - Modify
pytestversion to align with Python version requirements. - Change
complexipyversion to5.*. - Update
uv_buildversion to0.9.28in the build system. (by chrimaho)
- Adjust
71cb5a1: Update project classifiers inpyproject.toml- Change the development status to "5 - Production/Stable".
- Add new topics for utilities, scientific engineering, and information analysis.
- Update intended audience to "Science/Research".
- Include operating systems support for Unix, MacOS, and Windows. (by chrimaho)
- Change the development status to "5 - Production/Stable".
9e1fe97: Update.gitignoreto include additional files and directories- Add
git_output/directory to be ignored. - Include
.github/copilot-instructions.mdfile in the ignore list. - Add
.github/instructions/*and.github/prompts/*directories to be ignored. (by chrimaho)
- Add
398acb6: Updateuv-pre-commitdependency version- Update the
revfor theuv-pre-commitrepository to0.9.28(by chrimaho)
- Update the
aee5492: Update Dependabot configuration for Python dependencies- Add configuration for updating Python dependencies using Dependabot.
- Set target branch to
mainand schedule updates weekly. - Include labels, reviewers, and assignees for the updates.
- Specify commit message prefix as "π€ deps(pip): ". (by chrimaho)
- Add configuration for updating Python dependencies using Dependabot.
51ec99c: Update Dependabot configuration for GitHub Actions- Add target branch for GitHub Actions updates.
- Include assignees and commit message prefix for clarity. (by chrimaho)
- Add target branch for GitHub Actions updates.
86d76b1: Update pre-commit configuration for improved linting and checks- Upgrade
blackto version26.1.0 - Upgrade
uv-pre-committo version0.9.26 - Add
docstring-format-checkerwith entrydfc --check - Modify
tyentry to run without specifying filenames (by chrimaho)
- Upgrade
v1.0.0
v1.0.0 - The First Major Release: A Unified Foundation for Time Series Analysisπ
v1.0.0
2026-01-18
data-science-extensions/ts-stat-tests/releases/v1.0.0
Release Notes
π Overviewπ
We are proud to announce the first major release of ts-stat-tests. This milestone represents the culmination of an intensive development effort to create a unified, production-ready suite for time-series statistical testing in Python.
The primary goal of this release is to provide a single, consistent interface to the most important statistical tests from established libraries like statsmodels, scipy, arch, and antropy. By normalising inputs, outputs, and hypothesis testing logic, ts-stat-tests simplifies complex analysis workflows and ensures mathematical rigour across all modules.
π Getting Startedπ
Install the library using your preferred package manager:
pip install ts-stat-tests
Or with uv:
uv add ts-stat-tests
Basic Usageπ
Every module provides a consistent API. You can check for a property (Boolean) or get full results (Dispatcher).
from ts_stat_tests.stationarity import is_stationary, adf
# Check for stationarity at 5% significance
result = is_stationary(data, algorithm="adf", alpha=0.05)
if result["result"]:
print(f"Series is stationary (p-value: {result['pvalue']:.4f})")
# Or get the raw statistics
stat, pvalue, lags, crit, ic = adf(data, autolag="AIC")
π§© Module Synopsesπ
ts-stat-tests is organised into eight core namespaces, each dedicated to a specific domain of time-series analysis.
π Stationarityπ
Tests to determine if the statistical properties of a series are constant over time. Includes Augmented Dickey-Fuller (adf()), KPSS (kpss()), and Zivot-Andrews (za()) for structural breaks.
π Normalityπ
Assess whether the residuals or data follow a normal distribution. Supports Jarque-Bera (jb()), Shapiro-Wilk (sw()), and D'Agostino's K-squared (dp()).
π Linearityπ
Evaluate if a linear model is appropriate for the data. Includes the Ramsey RESET test (rr()), Harvey-Collier (hc()), and Rainbow test (rb()).
π Heteroscedasticityπ
Detect whether the variance of errors is constant. Provides ARCH (arch()), Breusch-Pagan (bpl()), Goldfeld-Quandt (gq()), and White's test (wlm()).
β»οΈ Correlationπ
Measure autocorrelation and cross-correlation. Features ACF (acf()), PACF (pacf()), and the Ljung-Box test (lb()) for residual independence.
π Seasonalityπ
Identify seasonal patterns and measure their strength. Includes the QS test (qs()), OCSB (ocsb()), and STL-based features like seasonal_strength().
ποΈ Stabilityπ
Analyse the stability and lumpiness of time-series data using STL decomposition features, helping identify periods of structural change or volatility shifts.
πΈοΈ Regularityπ
Measure the complexity and entropy of a signal. Provides multiple entropy metrics including Approximate (approx_entropy()), Sample (sample_entropy()), and Permutation Entropy (permutation_entropy()).
ποΈ Architectural Refactorπ
A core highlight of the v1.0.0 release is a complete re-architecting of the internal package structure (PR #32). We have migrated from a functional layout to a domain-centric layout.
- Namespace Consolidation: Algorithms and tests are now co-located within their respective domain folders (e.g.,
src/ts_stat_tests/stationarity/). - Intuitive Imports: The new structure allows for cleaner, more descriptive import statements. Users can now import directly from the top-level namespace of each module.
Old Import Pattern:
from ts_stat_tests.algorithms.stationarity import kpss
New Import Pattern:
from ts_stat_tests.stationarity import kpss
πͺ Quality Assuranceπ
Reliability is the cornerstone of this library. The v1.0.0 release maintains the highest standards of code quality:
- 100% Code Coverage: Every execution path in the library is verified by unit tests.
- Strict Type Safety: Full
Pyrightstrict-mode compliance and runtime@typecheckedenforcement. - Optimal Linting: 10.00/10
Pylintscore across all files. - Verified Documentation: All examples are tested via
doctestto ensure they are runnable and accurate.
β Checklistπ
- Implement final Heteroscedasticity module.
- Restructure package into domain-centric namespaces.
- Standardise import patterns via
__init__.pyfiles. - Achieve 100% code coverage across the entire library.
- Overhaul documentation and contribution guidelines.
- Remove all skipped doctests and ensure complete reproducibility.
π Changesπ
| Metric | Value |
|---|---|
| Files Changed | 46 |
| Lines Added | +1,317 |
| Lines Deleted | -490 |
| Commit Count | 16 |
| Contributors | 1 |
π Pull Requestsπ
- Prepare for First Major Release by @chrimaho in https://github.com/data-science-extensions/ts-stat-tests/pull/32
Full Changelog: https://github.com/data-science-extensions/ts-stat-tests/compare/v0.8.0...v1.0.0
Updates
38ae241: Fixmkdocsconfig structure
Themkdocs.ymlconfiguration has a structural issue. Theoptions:key should not be nested underextras:. Looking at the diff, the entire options: block (lines 132-153) should be at the same indentation level aspaths:, not nested inside anextras:key. This is likely to cause themkdocsbuild to fail or not apply the configuration correctly. (by chrimaho)19eb899: Fix typo (by chrimaho)9dac0b5: Fix typo (by chrimaho)3ecd1af: Add headers and summaries to each namespace init file- Add titles and purposes for the Heteroscedasticity, Linearity, Normality, Regularity, Seasonality, Stability, and Stationarity modules.
- Include detailed summaries for each module to describe their functionalities and the tools they provide for time series analysis. (by chrimaho)
- Add titles and purposes for the Heteroscedasticity, Linearity, Normality, Regularity, Seasonality, Stability, and Stationarity modules.
4e40b4a: Fix typo (by chrimaho)47f3dfb: Fix broken links in the Code overview page- Update code style adherence to [
black][] formatting. - Ensure spell checking for documentation and code comments using [
codespell][]. - Maintain type safety through type-checking with [
ty][] and [pyright][]. - Manage import sorting with [
isort][] and remove unused imports using [pycln][]. - Check code quality with [
pylint][] maintaining a score of 10/10. - Verify docstring quality using [
docstring-format-checker][]. - Achieve 100% code coverage with unit testing using [
pytest][]. - Build package with [
uv][] and documentation with [mkdocs][]. (by chrimaho)
- Update code style adherence to [
84f6591: Remove redundant checks (by chrimaho)62a5908: Fix typos and formatting issues in testing documentation- Correct spelling errors in the testing section.
- Ensure consistent formatting for library references.
- Improve clarity of the testing description. (by chrimaho)
- Correct spelling errors in the testing section.
24e728b: Revise README for clarity and structure- Change section title from "Motivation" to "Overview"
- Introduce a new "Key Features" section with detailed descriptions
- Add installation instructions and quick start examples
- Include a "Quality Assurance" section outlining testing and code quality practices
- Update "Known limitations" to "Quality Assurance" for better organisation (by chrimaho)
- Change section title from "Motivation" to "Overview"
53344e3: Update contribution guidelines for clarity and completeness- Revise the contribution process to include detailed steps for raising issues, forking the repository, and creating branches.
- Add sections on testing changes and submitting pull requests.
- Ensure guidelines align with project goals and enhance contributor experience. (by chrimaho)
- Revise the contribution process to include detailed steps for raising issues, forking the repository, and creating branches.
f640f36: Add title to changelog output- Include a title in the changelog file for better clarity.
- Write the title as
# Changelog for {repo.name}. (by chrimaho)
- Include a title in the changelog file for better clarity.
7b5ec65: Restructure docs pages for consistency- Remove redundant section headers for tests in various documentation files.
- Introduce a unified "Modules" section across all relevant documentation files.
- Enhance clarity and organisation of the documentation structure. (by chrimaho)
- Remove redundant section headers for tests in various documentation files.
7c9309a: Completely restructure package modules- Old structure:
ts_stat_tests/algorithms/<ALGO>ts_stat_tests/tests/<ALGO>- New structure:
ts_stat_tests/<ALGO>/algorithmsts_stat_tests/<ALGO>/tests- This allows for more streamlined package structure, and a more intuitive import process by intelligent usage of
__init__.pyfiles per namespace (by chrimaho)
- Old structure:
6a72832: Update docs to remove progress updates- Remove implementation progress table from
index.md - Update formatting in
README.mdfor better readability - Ensure consistent header structure across documentation (by chrimaho)
- Remove implementation progress table from
216efc9: Remove any references for# doctest: +SKIP- Replace numpy array generation with utility functions for consistency.
- Update p-values in examples to reflect new calculations.
- Ensure all examples use
data_lineanddata_randomfor data generation. (by chrimaho)
- Replace numpy array generation with utility functions for consistency.
v0.8.0
v0.8.0 - Add Heteroscedasticity Moduleπ
v0.8.0
2026-01-18
data-science-extensions/ts-stat-tests/releases/v0.8.0
Release Notes
π Overviewπ
Introduce the heteroscedasticity module, completing the seventh analytical pillar of the ts-stat-tests library. This release provides a unified interface for detecting Autoregressive Conditional Heteroscedasticity (ARCH) and classic heteroscedasticity using the Breusch-Pagan, Goldfeld-Quandt, and White tests. These tools are critical for identifying volatility clustering and non-constant variance in residuals, ensuring the validity of econometric inferences. This version also represents a significant technical milestone, transitioning the entire test suite to modern pytest assertions and standardising documentation across all core algorithms.
π οΈ Implementation detailsπ
Heteroscedasticity module implementationπ
- Implement core heteroscedasticity algorithms in
src/ts_stat_tests/algorithms/heteroscedasticity.py:arch(): Engle's test for Autoregressive Conditional Heteroscedasticity.bpl(): Breusch-Pagan Lagrange Multiplier test for heteroscedasticity.gq(): Goldfeld-Quandt test for homoskedasticity.wlm(): White's Lagrange Multiplier test for heteroscedasticity and specification error.
- Provide standardised Boolean dispatchers in
src/ts_stat_tests/tests/heteroscedasticity.py:heteroscedasticity(): Unified high-level interface for all heteroscedasticity tests.is_heteroscedastic(): Boolean checker returning a consistent"result"key, maintaining API parity across the library.
- Migrate from deprecated
statsmodels.sandboximports to the stablestatsmodels.stats.diagnosticmodule for long-term compatibility.
Infrastructure and documentationπ
- Create comprehensive theoretical documentation in
docs/code/heteroscedasticity.md, includingKaTeXmathematical definitions for variance testing. - Update
README.mdanddocs/code/index.mdto reflect 100% completion status for both the Linearity and Heteroscedasticity modules. - Extend the library's code overview with detailed feature highlights including unified interfaces, boolean checkers, and strict type safety.
- Optimise navigation in
mkdocs.ymlto include the new diagnostic pages.
Quality assurance and refactoringπ
- Refactor the global test suite to transition from
unittest-style methods to modernpytestassertions, improving diagnostic readability. - Modernise internal QA infrastructure by categorising checks in the
check()function withinsrc/utils/scripts.py. - Standardise type hints across the library, preferring native
floatovernp.float64for simplified user consumption. - Maintain 10-00/10
Pylintscores and 100% test coverage through rigorous docstring and type validation.
β Checklistπ
- Implement
arch(),bpl(),gq(), andwlm()algorithms. - Implement
heteroscedasticity()andis_heteroscedastic()dispatchers. - Refactor entire test suite to use standard
pytestassertions. - Modernise
statsmodelsimports to remove deprecated sandbox references. - Author theoretical documentation for heteroscedasticity diagnostics.
- Pass 100% path coverage and Pylint 10.00/10 quality gates.
π Changesπ
| Metric | Value |
|---|---|
| Files Changed | 11 |
| Lines Added | 1047 |
| Lines Deleted | 22 |
| Contributors | @chrimaho |
| Commit Count | 22 |
π Pull Requestsπ
- Implement Heteroscedasticity Module by @chrimaho in https://github.com/data-science-extensions/ts-stat-tests/pull/31
*Full Changelog: https://github.com/data-science-extensions/ts-stat-tests/compare/v0.7.0...v0.8.0
Updates
782046a: Fix docstrings in thegq()function
The return type annotation in the docstring describesnp.float64values, but the actual code returnsfloatvalues (line 389, 403). The docstring should be updated to reflect the actual return type offloatinstead ofnp.float64to be consistent with the implementation. (by chrimaho)ff8800e: Fix docstrings in thebpl()function
The return type annotation in the docstring describesnp.float64values, but the actual code returnsfloatvalues (line 261). The docstring should be updated to reflect the actual return type offloatinstead ofnp.float64to be consistent with the implementation. (by chrimaho)3c436af: Fix docstrings in thearch()function
The return type annotation in the docstring describesnp.float64values, but the actual code returnsfloatvalues (lines 177-180, 188). The docstring should be updated to reflect the actual return type offloatinstead ofnp.float64to be consistent with the implementation. (by chrimaho)3a4fd45: Fix another typo (by chrimaho)4b4af91: Fix typo (by chrimaho)6cfb3c6: Fix docstrings for thewlm()function
The return type annotation in the docstring describesnp.float64values, but the actual code returnsfloatvalues (line 466). The docstring should be updated to reflect the actual return type offloatinstead ofnp.float64to be consistent with the implementation. (by chrimaho)260477e: Update README to reflect heteroscedasticity tests status- Mark Engle's Test for Autoregressive Conditional Heteroscedasticity (ARCH) as β
- Mark Breusch-Pagan Lagrange Multiplier test for heteroscedasticity (BPL) as β
- Mark Goldfeld-Quandt test for homoskedasticity (GQ) as β
- Mark White's Lagrange Multiplier Test for Heteroscedasticity (WLM) as β (by chrimaho)
- Mark Engle's Test for Autoregressive Conditional Heteroscedasticity (ARCH) as β
50a0b90: Remove deprecatedsandboxmodule- Replace import from
statsmodels.sandbox.stats.diagnosticwithstatsmodels.stats.diagnostic - Ensure consistent usage of
ResultsStoreacross modules (by chrimaho)
- Replace import from
0f106e4: Extend Code overview page to add key info- Introduce key features of the statistical tests package, including:
- Unified interface for consistent user experience.
- Boolean checkers for null hypothesis evaluation.
- Comprehensive documentation for user understanding.
- Robust testing suite achieving 100% code coverage.
- Standardised error handling for informative feedback.
- Strict type safety with
@typecheckeddecorators. - Modular design for extensibility of new tests.
- Integration with established libraries for validated methodologies.
- Quality assurance with stringent code quality checks.
- Document modules available for various statistical tests. (by chrimaho)
- Introduce key features of the statistical tests package, including:
e8350b7: Refactor unit tests to usepytestassertions- Replace
self.assertEqual()withassertfor brevity. - Update type checks to use
assert isinstance()for better readability. - Standardise algorithm result checks across tests. (by chrimaho)
- Replace
3f88884: Refactor params & returns type hints inheteroscedasticitymodule- Standardise type hints to use
floatinstead ofnp.float64 - Update return types to reflect consistent tuple structures
- Simplify return statements in
arch(),bpl(),gq(), andwlm()functions - Remove unnecessary imports and unused code (by chrimaho)
- Standardise type hints to use
66ea028: Fix typo (by chrimaho)d851214: Refactorcheck()function for improved structure and clarity- Organise checks into categories: Formatting, Spelling, Type Safety, Imports, Quality, Docs, and Unit Tests
- Remove redundant calls to
check_codespell()andcheck_pyright() - Ensure all checks are clearly defined and grouped for better readability (by chrimaho)
- Organise checks into categories: Formatting, Spelling, Type Safety, Imports, Quality, Docs, and Unit Tests
4f586ae: Add documentation forheteroscedasticitymodules- Introduce an overview of heteroscedasticity and its significance in statistics.
- Detail the four heteroscedasticity tests available in the library, including their import scripts and links to documentation.
- Provide information on the source library
statsmodelsand its role in the implementation. - List the source modules for the tests and algorithms. (by chrimaho)
- Introduce an overview of heteroscedasticity and its significance in statistics.
5b75189: Fix typo (by chrimaho)db10837: Add unit tests forheteroscedasticitymodule- Implement
setUp()method to prepare test data for homoscedastic and heteroscedastic cases - Create tests for
arch(),bpl(),gq(), andwlm()algorithms - Add dispatcher tests for
heteroscedasticity()function - Include tests for
is_heteroscedastic()function with various algorithms (by chrimaho)
- Implement
7fc683b: Add extensive docstrings to theheteroscedasticitymodule- Add comprehensive docstrings for
arch(),bpl(),gq(), andwlm()functions. - Include usage examples and parameter descriptions for better clarity.
- Implement a convenience wrapper function
heteroscedasticity()for easier testing. - Introduce
is_heteroscedastic()function to evaluate residuals against significance levels. (by chrimaho)
- Add comprehensive docstrings for
0098430: Add module headers and descriptions forheteroscedasticitymodule- Include a summary of the module's purpose and functionality.
- Document the various heteroscedasticity tests implemented:
- ARCH Test
- Breusch-Pagan Test
- Goldfeld-Quandt Test
- White's Test (by chrimaho)
- Include a summary of the module's purpose and functionality.
e66b8b7: Add heteroscedasticity algorithms and tests- Implement
arch(),bpl(),gq(), andwlm()functions for heteroscedasticity tests. - Create
heteroscedasticity()function to select and call appropriate tests based on algorithm. - Introduce
is_heteroscedastic()function to evaluate test results and return structured output. - Update imports to include new functions and necessary modules. (by chrimaho)
- Implement
dcfedb4: Implement initial structure forheteroscedasticitymodule- Add
arch(),bpl(),gq(), andwlm()functions as placeholders - Create initial test structure with
heteroscedasticity()andis_heteroscedastic()functions (by chrimaho)
- Add
9a0347e: Add framework forheteroscedasticitymodule- Introduce
heteroscedasticity.pyalgorithm implementation - Create
test_heteroscedasticity.pyfor unit tests - Update
mkdocs.ymlto include Heteroscedasticity documentation - Add
heteroscedasticity.mddocumentation file (by chrimaho)
- Introduce
v0.7.0
v0.7.0 - Add Linearity Moduleπ
v0.7.0
2026-01-17
data-science-extensions/ts-stat-tests/releases/v0.7.0
Release Notes
π Overviewπ
Introduce the linearity module, the sixth major analytical pillar of the ts-stat-tests library. This release provides a suite of econometric tests designed to validate the linear specification of regression models, including the Harvey-Collier, Lagrange Multiplier, Rainbow, and Ramsey RESET tests. These tools enable researchers to identify neglected non-linearity and functional form misspecifications with high precision. Alongside the new algorithms, this version reaches a new quality milestone with 228 passing tests and 100% code coverage across all modules.
π οΈ Implementation detailsπ
Linearity module implementationπ
- Implement core linearity algorithms in
src/ts_stat_tests/algorithms/linearity.py:hc(): Harvey-Collier test based on recursive residuals.lm(): Lagrange Multiplier test for checking functional form.rb(): Rainbow test for linearity using subset comparisons.rr(): Ramsey RESET test for neglected non-linearity.
- Provide standardised Boolean dispatchers in
src/ts_stat_tests/tests/linearity.py:linearity(): Unified high-level interface for all linearity tests.is_linear(): Boolean checker returning a consistent"result"key, standardised against the rest of the libraryβs API.
- Integrate strict type-checking via
@typecheckedand handlestatsmodelssignature inconsistencies using internal type-narrrowing helpers.
Documentation and navigationπ
- Create a comprehensive theoretical guide in
docs/code/linearity.md, featuringLaTeXdefinitions for all implemented tests. - Update
README.mdanddocs/code/index.mdstatus tables to mark the Linearity module as fully supported. - Optimise navigation in
mkdocs.ymlto include the new diagnostic tools. - Standardise documentation cross-references to ensure seamless transitions between algorithmic theory and code examples.
Quality assurance and testingπ
- Expand the package test suite to 228 passing tests, incorporating 11 new comprehensive unit tests for the Linearity module.
- Maintain 100% path coverage across the entire
ts_stat_testscodebase. - Enforce 10.00/10
Pylintscores and 0Pyrighterrors for all new implementations.
β Checklistπ
- Implement
hc(),lm(),rb(), andrr()algorithms. - Implement
linearity()andis_linear()dispatchers. - Standardise
is_linear()return keys for API consistency. - Author theoretical documentation for linearity diagnostics.
- Update project metadata and status tables in
README.md. - Pass 100% coverage and linting quality gates.
π Changesπ
| Metric | Value |
|---|---|
| Files Changed | 7 |
| Lines Added | 799 |
| Lines Deleted | 8 |
| Contributors | 1 (@chrimaho) |
| Commit Count | 11 |
π Pull Requestsπ
- Implement Linearity Module by @chrimaho in https://github.com/data-science-extensions/ts-stat-tests/pull/30
Full Changelog: https://github.com/data-science-extensions/ts-stat-tests/compare/v0.6.2...v0.7.0
Updates
b78c7dc: Refactoris_linear()function to return keys consistent with the rest of the package- Change return key from
"is_linear"to"result"inis_linear()function. - Update related test assertions in
test_linearity.pyto reflect the new key. - Ensure documentation examples are consistent with the updated return structure. (by chrimaho)
- Change return key from
a16b017: Update progress- Mark linearity tests as implemented in the README.md
- Update test status for
Harvey Collier,Lagrange Multiplier,Rainbow, andRamsey's RESETtests to β - Reflect changes in the index.md documentation for linearity algorithms (by chrimaho)
- Mark linearity tests as implemented in the README.md
63f7847: Refactor options structure in linearity documentation- Move options under
extrasfor clarity - Ensure consistent formatting across sections (by chrimaho)
- Move options under
457d175: Add documentation forlinearitymodules- Introduce an overview of linearity testing and its significance
- Detail the implementation and source library used
- Provide examples of source modules related to linearity tests and algorithms (by chrimaho)
- Introduce an overview of linearity testing and its significance
1bef1a7: Add unit tests for linearity algorithms- Implement
TestLinearityclass for testing various linearity algorithms. - Include tests for Harvey-Collier, Lagrange Multiplier, Rainbow, and Ramsey RESET tests.
- Add dispatcher tests for algorithm selection in linearity checks.
- Validate results for linear and non-linear datasets. (by chrimaho)
- Implement
4aae6e3: Refactor linearity algorithms for improved robustness and clarity.- Remove unnecessary type hints for variables.
- Replace direct attribute access with
getattr()for safer attribute retrieval. - Ensure consistent handling of return values from linearity functions. (by chrimaho)
- Remove unnecessary type hints for variables.
ce23d16: Add linearity tests and convenience functions- Implement
linearity()function to perform linearity tests on fitted regression models. - Introduce
is_linear()function to check if the relationship in a fitted model is linear. - Include detailed docstrings for both functions with usage examples.
- Add necessary imports and define module exports. (by chrimaho)
- Implement
87f9b3b: Add docstrings for linearity algorithms- Include summaries, parameters, return types, and examples for the
hc(),lm(),rb(), andrr()functions. - Enhance documentation clarity for users implementing linearity tests. (by chrimaho)
- Include summaries, parameters, return types, and examples for the
03dfb72: Add linearity algorithms- Introduce
hc(),lm(),rb(), andrr()functions for linearity tests. - Define constants
VALID_RR_TEST_TYPE_OPTIONSandVALID_RR_COV_TYPE_OPTIONS. - Include necessary imports from
statsmodelsandnumpy. (by chrimaho)
- Introduce
e9eb401: Add framework forlinearitymodules- Introduce
linearity.pyalgorithm implementation. - Create
test_linearity.pyfor unit tests. - Add
linearity.mddocumentation file. - Update
mkdocs.ymlto include Linearity in navigation. (by chrimaho)
- Introduce
v0.6.2
v0.6.2 - Add Stability Moduleπ
v0.6.2
2026-01-17
data-science-extensions/ts-stat-tests/releases/v0.6.2
Release Notes
π Overviewπ
Introduce the stability module, the fifth major analytical component of the ts-stat-tests library, providing advanced variance-based metrics for time-series consistency. This release focuses on "Stability" and "Lumpiness"βcritical indicators for data quality and forecasting feasibility. Alongside these algorithmic additions, this version implements significant documentation infrastructure improvements, including multi-column layouts for enhanced readability and a comprehensive audit of internal cross-referencing to ensure seamless navigation across the API.
π οΈ Implementation detailsπ
Stability module implementationπ
- Implement two core stability algorithms in
src/ts_stat_tests/algorithms/stability.py:stability(): Measures the variance of the trend component within a time series, providing a quantified metric for structural consistency.lumpiness(): Calculates the variance of the variance across tiling windows, identifying intermittent "lumpy" patterns in the data.
- Provide standardised Boolean dispatchers in
src/ts_stat_tests/tests/stability.py:is_stable(): Evaluates if a series maintains trend stability below a specified significance threshold.is_lumpy(): Determines if a series exhibit excessive variance variability (lumpiness).
Documentation architecture and UXπ
- Introduce multi-column CSS layouts to the documentation site to optimise information density and improve the presentation of API references.
- Standardise and audit all internal documentation links, ensuring consistent navigation between algorithm implementations and their corresponding test dispatchers.
- Simplify docstring filtering logic to resolve cross-referencing ambiguities and ensure "Summary" and "Details" sections render correctly under strict
dfccompliance. - Update
README.mdanddocs/code/index.mdimplementation tables to reflect the 100% completion of the Stability module and the expanded test suite.
Quality assurance and testingπ
- Expand the global unit test suite to 146 tests, maintaining 100% code coverage across all modules.
- Audit and correct threshold logic in Boolean tests to ensure standard p-value interpretation (rejecting the null hypothesis when statistics are below alpha).
- Standardise all internal variables and public signatures to use
NDArray[np.float64]for improved type specificity and compatibility withpyrightstrict mode.
β Checklistπ
- Implement core stability and lumpiness algorithms.
- Provide standardised Boolean convenience functions for stability assessments.
- Achieve 100% coverage for the new stability module.
- Implement multi-column layout support in the documentation site via custom CSS.
- Complete comprehensive audit and fix of internal docstring cross-references.
- Update project progress metrics to reflect 146 total tests across 6 modules.
π Changesπ
| Metric | Value |
|---|---|
| Files Changed | 19 |
| Lines Added | 639 |
| Lines Deleted | 69 |
| Commit Count | 20 |
| Contributors | @chrimaho |
πͺ Pull requestsπ
- Implement stability module by @chrimaho in https://github.com/data-science-extensions/ts-stat-tests/pull/29
Full Changelog: https://github.com/data-science-extensions/ts-stat-tests/compare/v0.5.3...v0.6.2
Updates
8861517: Update purpose description for stability tests- Change purpose from "Unit tests for stability and lumpiness algorithms." to "Convenience functions for stability algorithms." (by chrimaho)
2b76084: Fix docs descriptions
The documentation states that stability limits are "between 0 and 1", but this is incorrect. According to the implementation and examples (e.g., airline data has stability of 13428.67), stability can have unbounded positive values as it measures variance. This documentation is misleading and should be corrected to reflect that stability is a non-negative value without an upper bound. (by chrimaho)8ff12e1: Fix typo
Grammatical error: "this modules" should be "these modules" to match plural usage. (by chrimaho)74c8ccc: Add missing docs justifications
The placeholder text "REASONS" should be replaced with an actual explanation of why the tsfeatures package was chosen. This appears to be incomplete documentation left from a template. (by chrimaho)a132892: Fix module description
The module docstring description is inaccurate. This module contains convenience functions and boolean checkers (is_stable, is_lumpy), not unit tests. It should describe the module's purpose similar to other test modules, such as "This module contains convenience functions and tests for stability measures, allowing for easy access to stability and lumpiness algorithms." (by chrimaho)61e84c5: Update progress for all docs- Update stability tests to reflect accurate results.
- Modify README to include stability in statistical tests.
- Enhance documentation for clarity on stability algorithms. (by chrimaho)
- Update stability tests to reflect accurate results.
50e3e30: Restructure navigation pages in docs- Change 'Modules' section to be nested under 'Code'
- Improve organisation of documentation for better clarity (by chrimaho)
- Change 'Modules' section to be nested under 'Code'
45ee3fc: Add CSS for multi-column layouts and button styles- Introduce styles for two, three, and four-column layouts
- Implement mobile responsiveness for column layouts
- Define button widths and alignment for various button types (by chrimaho)
- Introduce styles for two, three, and four-column layouts
43e8ce3: Standardise links in documentation for modules- Update links in
correlation.md,normality.md,regularity.md,seasonality.md,stability.md, andstationarity.mdto use reference-style links. - Modify
stability.pyandtests/stability.pyto standardise link formatting forstability()andlumpiness()functions. (by chrimaho)
- Update links in
87eb94b: Update algorithm titles for consistency across modules- Change titles to include 'Algorithms' for clarity in
correlation.py,normality.py,regularity.py,seasonality.py, andstationarity.py. - Update purpose descriptions for better understanding in
seasonality.pytest file. (by chrimaho)
- Change titles to include 'Algorithms' for clarity in
0e73702: Update module docstrings for stability and tests- Enhance docstrings in the stability module to include a summary.
- Add detailed descriptions for the stability algorithms.
- Improve docstrings in the stability tests module to clarify their purpose.
- Include a summary note in both modules for better documentation clarity. (by chrimaho)
- Enhance docstrings in the stability module to include a summary.
c1dfa07: Remove unnecessary filters from docs pages- Eliminate filters for
isand specific test names - Simplify documentation structure for clarity (by chrimaho)
- Eliminate filters for
5711842: Fix stability docs formatting config- Update source module links to remove redundant prefixes
- Adjust options formatting for stability tests and algorithms (by chrimaho)
- Update source module links to remove redundant prefixes
f6e516f: Refactor stability and lumpiness functions for type consistency- Update type hints in
stability()andlumpiness()functions to useNDArray[np.float64]. - Modify
is_stable()andis_lumpy()functions to acceptNDArray[np.float64]as input type. - Adjust expected result in
test_stability_2()to reflect correct stability assessment. (by chrimaho)
- Update type hints in
de3a1f0: Add docstrings to thestabilitymodule- Separate imports for
lumpinessandstabilityfor clarity. - Add detailed docstrings for
stability()andlumpiness()functions. - Implement
is_stable()andis_lumpy()functions with comprehensive examples and explanations. - Ensure consistency in parameter descriptions and return values. (by chrimaho)
- Separate imports for
7347910: Addstabilitydocumentation- Introduce a new document for testing the stability of time-series datasets.
- Include an introduction explaining the concept of stability and its importance.
- Describe the tests for stability and lumpiness, including their significance and scoring.
- Provide references to source libraries and modules related to stability. (by chrimaho)
- Introduce a new document for testing the stability of time-series datasets.
ff5ebd8: Add stability unittests- Implement
TestStabilityclass to test stability and lumpiness - Set up class method to initialise test data and results
- Add tests for stability and lumpiness calculations
- Validate results against expected outputs (by chrimaho)
- Implement
5261964: Implement stability and lumpiness algorithms- Add
stability()function to calculate stability from input data. - Add
lumpiness()function to calculate lumpiness from input data. - Introduce type checking using
@typecheckeddecorator for both functions. - Update imports to include necessary libraries and algorithms. (by chrimaho)
- Add
294a38d: Add framework forstabilitymodule- Create
stability.pyalgorithm file for stability tests - Add
test_stability.pyfor unit tests related to stability - Include
stability.mddocumentation for stability algorithms - Update
mkdocs.ymlto include stability in navigation (by chrimaho)
- Create
v0.5.3
v0.5.3 - Add Seasonality Moduleπ
v0.5.3
2026-01-16
data-science-extensions/ts-stat-tests/releases/v0.5.3
Release Notes
π Overviewπ
Introduce the seasonality module, the fourth major component of the ts-stat-tests library, while simultaneously achieving a significant architectural milestone: the total elimination of typing.cast() and the attainment of 100% global code coverage. This release transforms the library into a strictly typed, fully validated suite for time-series analysis. By integrating six new seasonality algorithms, standardising on NDArray type hints, and implementing MathJax for professional mathematical rendering, this version provides the most robust and accessible interface for statistical testing to date.
π οΈ Implementation detailsπ
Seasonality module implementationπ
- Implement six core seasonality algorithms in
src/ts_stat_tests/algorithms/seasonality.py:qs(): The Ljung-Box test for seasonality.ocsb(): The Osborn-Chui-Smith-Birchenhall test for seasonal differencing.ch(): The Canova-Hansen test for seasonal stability.seasonal_strength()andtrend_strength(): Measures based on STL decomposition.spikiness(): A measure of variance in the remainder component.
- Provide a unified dispatcher in
src/ts_stat_tests/tests/seasonality.py:seasonality(): Central entry point for all seasonality-related measurements.is_seasonal(): Standardised Boolean checker returning result dictionaries with interpreted statistics and alpha thresholds.
Type safety and architectural hardeningπ
- Remove all usages of
typing.cast()throughout the codebase, replacing them with safer type-narrowing patterns and intermediateAnyassignments to satisfy strictpyrightchecks without sacrificing runtime safety. - Standardise internal data structures to use
NDArray[np.float64]for improved type specificity and interoperability withnumpyecosystem. - Refactor normality and stationarity modules to use protocol-based result handling for third-party library outputs (e.g.,
scipyandstatsmodels). - Implement output rounding across all statistical tests to ensure consistent return values and stable documentation examples.
Documentation and visual enhancementsπ
- Integrate
MathJaxinto themkdocspipeline to enable high-quality rendering of mathematical equations in the documentation site. - Introduce custom CSS-based implementation progress bars to the documentation landing pages.
- Standardise all docstrings to follow the strict Google-style format with full
dfc(Docstring Format Checker) compliance. - Update
README.mdanddocs/index.mdstatus tables to reflect the completed seasonality module.
β Checklistπ
- Implement core seasonality algorithms and unified dispatcher.
- Achieve 100% code coverage across the entire
ts_stat_testspackage. - Remove all
typing.cast()calls to satisfy strict Pylint 10/10 and Pyright requirements. - Integrate MathJax for KaTeX math rendering in the documentation.
- Standardise all return types and implement numerical rounding for consistency.
- Update data utility functions with improved type safety and expanded synthetic generators.
π Changesπ
| Metric | Value |
|---|---|
| Files Changed | 34 |
| Lines Added | 2645 |
| Lines Deleted | 532 |
| Commit Count | 86 |
| Contributors | Chris Mahoney |
πͺ Pull requestsπ
- Implement seasonality module by @chrimaho in https://github.com/data-science-extensions/ts-stat-tests/pull/28
Full Changelog: https://github.com/data-science-extensions/ts-stat-tests/compare/v0.4.5...v0.5.3
Updates
e54021f: Refactor return types and handling in normality and seasonality tests- Update return type of
normality()function to support variable-length tuples. - Simplify handling of results in
is_normal()function for better clarity. - Enhance return structure in
seasonality()function to accommodate ARIMA objects. - Improve type handling in internal helper functions for robustness. (by chrimaho)
- Update return type of
699a777: Refactor return type and structure ofis_stationary()function- Update return type hint to use
STATIONARITY_ITEMfor clarity. - Explicitly define return dictionary to match the new type hint.
- Adjust handling of
pvalueto returnNonewhen applicable. (by chrimaho)
- Update return type hint to use
dd5445a: Add tests for seasonality and normality algorithms- Implement fallback tests for Anderson-Darling in
is_normal()function. - Add coverage for list-based result branches in
is_seasonal()function. - Test fallback for non-numeric types in
is_seasonal()function. - Test fallback for non-numeric scalar types in
is_seasonal()function. (by chrimaho)
- Implement fallback tests for Anderson-Darling in
7b6daf2: Enhance pytest configuration and update check functions.- Add
--doctest-modulesand--doctest-continue-on-failureoptions to pytest inpyproject.toml. - Modify
check_pytest()function to dynamically include Python files for testing. - Comment out
check_doctest()in thecheck()function. (by chrimaho)
- Add
0c1da06: Refactor type hints in stationarity module- Remove unnecessary
Optionalfrom return type ofis_stationary()function. - Simplify type hints for
statandpvaluevariables toAny. (by chrimaho)
- Remove unnecessary
8bf8b36: Refactor type hints to removecast()usage- Remove
cast()fromnormalitymofule. - Remove
cast()fromseasonalitymodule. - Remove
cast()fromstationaritymodule. (by chrimaho)
- Remove
74bf5f8: Removecast()from stationarity module- Remove unnecessary
cast()in theis_stationary()function. - Simplify the return type assignment to directly use the result of
stationarity()function. (by chrimaho)
- Remove unnecessary
aa51207: Enhance normality test return types and type hints.- Update return type of
normality()to includeNormaltestResult,ShapiroResult, andAndersonResult. - Replace
cast()with direct type annotations for improved clarity. - Adjust variable types in
is_normal()for consistency and readability. (by chrimaho)
- Update return type of
49203f7: Refactor type hints to removecast()in stationarity and seasonality modules- Update type hints to use
Anyfor better flexibility. - Remove unnecessary
cast()calls to simplify code. - Ensure consistent handling of return types across functions. (by chrimaho)
- Update type hints to use
2ccd1bd: Round numerical outputs in theadf()function for improved readability.- Update output formatting to display rounded values.
- Enhance clarity of example output in documentation. (by chrimaho)
- Update output formatting to display rounded values.
e6fe3af: Round numerical outputs in entropy and regularity functions for improved readability.- Update example outputs in
entropy()function to show rounded values. - Update example outputs in
regularity()function to show rounded values. (by chrimaho)
- Update example outputs in
d9ac474: Refactor numpy type hints to useNDArrayinstead ofnp.ndarray- Update type hints in
seasonality.pyto useNDArray[np.float64] - Modify return types in
correlation.pyto useNDArray[np.float64] - Adjust type casting in
normality.pyto reflect new type hints (by chrimaho)
- Update type hints in
b2ffd98: Refactor data types in test setup for consistency- Change data types of test data attributes to use
NDArray[np.float64] - Update
cls.data_random,cls.data_sine,cls.data_line,cls.data_noise, andcls.data_2dattributes (by chrimaho)
- Change data types of test data attributes to use
9a75913: Fix import issue forVarianceRatioin thestationaritymodule- Remove explicit type annotation for
resinvr()function. - Simplify assignment to
resby directly using_vr(). (by chrimaho)
- Remove explicit type annotation for
bff495e: Refactor return types in data utility functions for improved type safety- Change return type of
get_random_numbers()toNDArray[np.float64] - Change return type of
get_random_numbers_2d()toNDArray[np.float64] - Change return type of
get_sine_wave()toNDArray[np.float64] - Change return type of
get_normal_curve()toNDArray[np.float64] - Change return type of
get_straight_line()toNDArray[np.float64] - Change return type of
get_trend_data()toNDArray[np.float64] - Change return type of
get_uniform_data()toNDArray[np.float64] - Change return type of
get_noise_data()toNDArray[np.float64] - Update variable types in data loading to reflect new return types (by chrimaho)
- Change return type of
13d0c18: Refactor type handling in stationarity functions- Introduce type aliases for improved clarity and maintainability.
- Update function signatures to use new type aliases.
- Simplify return statements in
is_stationary()function. (by chrimaho)
- Introduce type aliases for improved clarity and maintainability.
0cec5c4: Refactor imports instationarity.pyfor consistency and clarity.- Standardise import statements for
VarianceRatio. - Group related imports together for better readability. (by chrimaho)
- Standardise import statements for
a15a06c: Add examples toadf()function docs- Include example usage for storing results with
adf(x=airline, store=True) - Add example for using
adf()without autolag:adf(x=airline, autolag=None, maxlag=5)(by chrimaho)
- Include example usage for storing results with
1d300e9: Refactor return statements in stationarity functions for clarity and efficiency.- Simplify return statements in
kpss(),rur(), andza()functions by removing unnecessarycast(). - Enhance readability by directly returning results from
_kpss(),_rur(), and_za(). - Maintain type safety while improving code clarity in the
vr()function. (by chrimaho)
- Simplify return statements in
feb0ace: Refactoradf()function for improved type handling and return structure- Change return type handling to use
Anyfor compatibility with statsmodels stubs - Simplify return statements based on
storeandautolagparameters - Ensure consistent float and integer conversions for returned values (by chrimaho)
- Change return type handling to use
5479ac7: Add tests for ADF stationarity function- Introduce
test_stationarity_adf_store()to validate ADF withstore=True - Introduce
test_stationarity_adf_autolag_none()to validate ADF withautolag=None(by chrimaho)
- Introduce
aaba18f: Refactor type annotations in theregularitymodule- Update type annotations in
regularity.pyandtests/regularity.pyto useNDArraywhere appropriate. - Simplify return statements in
approx_entropy(),sample_entropy(),permutation_entropy(),spectral_entropy(), andsvd_entropy()functions. - Ensure all functions return consistent types, enhancing type safety and readability. (by chrimaho)
- Update type annotations in
8f90a8c: Refactornormalitymodule for improved type annotations in all functions- Remove unnecessary class definitions and simplify return types.
- Update function signatures to use specific return types like
ShapiroResultandNormaltestResult. - Streamline the implementation of statistical tests by returning results directly from their respective functions. (by chrimaho)
- Remove unnecessary class definitions and simplify return types.
f8d4c7e: Fix typo (by chrimaho)d9f458d: Refactor example outputs inqs()function- Adjust precision of output values in the docstring.
- Ensure clarity in the representation of ARIMA model output. (by chrimaho)
- Adjust precision of output values in the docstring.
340f63c: Fix typo (by chrimaho)74fec0b: Refactor seasonality tests for clarity and consistency.- Rename test methods for better readability.
- Remove debug print statements.
- Update assertions to ensure accuracy.
- Improve documentation for test cases. (by chrimaho)
- Rename test methods for better readability.
006a7b2: Refactor correlation tests and add new data tests- Remove unused imports and redundant tests from
test_correlation.py - Create
test_data.pywith tests forload_airline()andload_macrodata() - Enhance error handling tests in
test_errors.py(by chrimaho)
- Remove unused imports and redundant tests from
ece6d42: Refactor covariance type handling inlm()function- Standardise
cov_typeparameter to useVALID_LM_COV_TYPE_OPTIONS - Remove redundant overloads for
lm()function - Update docstring for clarity on
cov_typeoptions (by chrimaho)
- Standardise
46fdb01: Refactor type hints forcorrelationalgorithms- Update type hints to use
NDArray[np.float64]for better type clarity. - Modify return types in
acf(),pacf(),ccf(),lb(),lm(), andbglm()functions. - Standardise covariance type options in
VALID_LM_COV_TYPE_OPTIONS. (by chrimaho)
- Update type hints to use
41ddcd0: Update seasonality tests and documentation for improved readability- Modify
doctest_optionflagsinpyproject.tomlto include "ELLIPSIS" - Update expected output in
qs()function examples for clarity - Shorten numerical outputs in
qs(),seasonal_strength(),trend_strength(), andspikiness()functions - Adjust expected output in
seasonality()test cases for consistency (by chrimaho)
- Modify
0138dd4: Enhance equation formatting innormalityalgorithms- Improve readability of equations in the Jarque-Bera, D'Agostino's KΒ², Shapiro-Wilk, and Anderson-Darling tests.
- Update equations to use consistent formatting with
$$for better display. (by chrimaho)
- Improve readability of equations in the Jarque-Bera, D'Agostino's KΒ², Shapiro-Wilk, and Anderson-Darling tests.
4219a53: Updatepytestcommand incheck_doctest()functions to include doctest options.- Add
--doctest-modulesand--doctest-continue-on-failureflags to enhance doctest execution. (by chrimaho)
- Add
5e776f6: Fix type checking forload_macrodata()function- Introduce
TypeCheckErrorfor more specific error handling. - Update error assertions to check for expected messages.
- Enhance test coverage for type errors in data loading. (by chrimaho)
- Introduce
a8a4ec3: Addprint_labelfunctionality for improved checking output readability- Introduce
print_label()function to format command output labels. - Enhance linting functions with descriptive labels for better user feedback.
- Update command usage messages for clarity and consistency. (by chrimaho)
- Introduce
382bafe: Add tests foris_correlated()function with various algorithms- Implement tests for Ljung-Box, LM, and Breusch-Godfrey algorithms.
- Validate results and types for correlation checks.
- Ensure proper error handling for unsupported algorithms.
- Test correlation logic for both correlated and non-correlated data.
- Refactor failure assertions in
assert_almost_equal()method tests. (by chrimaho)
- Implement tests for Ljung-Box, LM, and Breusch-Godfrey algorithms.
a1fa2eb: Refactor error message assertions intest_generate_error_message()method.- Update assertions to check for specific error message components.
- Ensure clarity in error reporting for invalid parameters. (by chrimaho)
- Update assertions to check for specific error message components.
4fcee28: Refactor error message formatting inassert_almost_equal()function.- Update error message to use clearer variable names.
- Change
tol: p={places}, d={delta}to({places=}, {delta=})for consistency. (by chrimaho)
- Update error message to use clearer variable names.
7ade057: AddELLIPSISoption to doctest flags- Include
# "ELLIPSIS"in thedoctest_optionflagssection ofpyproject.toml - Enhance flexibility for doctest output matching (by chrimaho)
- Include
0a86247: Improve error message for invalid algorithm parameter instationarity()function.- Clarify the options available for the
algorithmparameter in the error message. - Enhance user experience by providing detailed feedback on valid options. (by chrimaho)
- Clarify the options available for the
47a14a5: Update example outputs in seasonality tests- Update expected output for
qs()function to reflect precise values:
qs(data, freq=12)now returns(194.46928920877465, 5.9092232580147965e-43) - Update expected output for
seasonality()function using seasonal strength:
seasonality(x=data, algorithm="ss", m=12)now returns0.7787219427520644(by chrimaho)
- Update expected output for
3fc4004: Fix typo (by chrimaho)e3d5993: Add parameter and return type documentation forstationarity()function- Document parameters and return types for clarity.
- Include examples for better understanding of usage. (by chrimaho)
- Document parameters and return types for clarity.
8cfe9df: Add parameter and return type documentation forseasonality()function- Document parameters
funcandargswith types. - Specify return type as a union of possible result types.
- Include example usage in the docstring. (by chrimaho)
- Document parameters
8a4cd9d: Add example toAndersonResultprotocol documentation- Include an example of how to use the
AndersonResultprotocol. - Enhance clarity for users implementing the protocol.
- Provide a code snippet demonstrating usage:
```python
def my_func(res: AndersonResult) -> None:
print(res.statistic) (by chrimaho)
- Include an example of how to use the
73fa21d: Refactoris_correlated()function to enhance correlation testing- Update function signature to accept parameters for correlation algorithm and significance level.
- Implement logic for various correlation tests including Ljung-Box, LM, and Breusch-Godfrey.
- Raise
ValueErrorfor unsupported algorithms. - Add detailed docstring with examples and parameter descriptions. (by chrimaho)
- Update function signature to accept parameters for correlation algorithm and significance level.
e52debc: Enhance docs structure for allcorrelationfunctions- Add summary and details for the
acf(),pacf(),ccf(), andlb()functions. - Update references formatting for clarity.
- Improve readability by adding line breaks in the documentation. (by chrimaho)
- Add summary and details for the
5a183f7: Refactorload_macrodata()function to improve data loading- Update data types for
yearandquartercolumns toint. - Simplify data loading process using
pd.read_csv(). - Adjust index creation to use a combined string format for quarterly periods. (by chrimaho)
- Update data types for
a740fd6: Update doctest examples in data utilities- Move the
data = ...section from theExamplechunk to theSetupchunk for each function in theutils/datamodule (by chrimaho)
- Move the
bfd3af1: Add doctest config topyproject.toml- Include
--doctest-modulesand--doctest-continue-on-failureoptions inpytestconfiguration. - Update test command in
check_doctest()andcheck_doctest_module()functions to use--config-file=pyproject.toml. - Standardise data type outputs in docstrings from
np.float64tofloat64for consistency. (by chrimaho)
- Include
a5bb4e8: Update error message formatting inassert_almost_equal()function- Modify the traceback output for clarity in error reporting.
- Ensure the assertion error message is displayed correctly. (by chrimaho)
- Modify the traceback output for clarity in error reporting.
2a3ec92: Add__init__.pymodule to theutilsnamespace (by chrimaho)d03c7f0: Refactor data utility documentation for clarity and consistency.- Standardise docstring formatting across functions.
- Add detailed examples and references for better understanding.
- Introduce type checking for improved type safety.
- Enhance descriptions to clarify functionality and usage. (by chrimaho)
- Standardise docstring formatting across functions.
0754d8b: Refactor error utility documentation for clarity and consistency.- Update docstrings to provide clearer summaries and details.
- Enhance examples for better understanding of usage.
- Standardise formatting across all functions. (by chrimaho)
- Update docstrings to provide clearer summaries and details.
ab48087: Add utils docs pages to MkDocs navigation- Create
data.mdfile for data utilities documentation - Create
errors.mdfile for error utilities documentation - Update
mkdocs.ymlto include new documentation in navigation (by chrimaho)
- Create
0050943: Modify 'calculation' of docstrings section to be optional- Change 'required' attribute of 'calculation' from true to false
- Ensure flexibility in documentation requirements (by chrimaho)
- Change 'required' attribute of 'calculation' from true to false
26174f2: Refactor table formatting for clarity in implementation progress- Adjust column headers for better alignment
- Enhance readability of the implementation progress table (by chrimaho)
- Adjust column headers for better alignment
d4c3fcb: Update README.md for improved link formatting and clarity- Correct link formatting for Statistical Tests references
- Add direct links for [Normality], [Stationarity], and [Correlation] (by chrimaho)
- Correct link formatting for Statistical Tests references
d080631: Add navigation link to Data Science Extensions page- Include a link to Data Science Extensions in the navigation menu. (by chrimaho)
77204b4: Add additional code features to MkDocs configuration- Include
content.code.selectfeature for enhanced code selection - Include
content.code.copyfeature for improved code copying - Ensure
content.code.annotatefeature is available for code annotations (by chrimaho)
- Include
1f29834: Add MathJax integration for enhanced mathematical rendering- Introduce
mathjax.jsfor MathJax configuration - Subscribe to document changes to clear cache and typeset
- Update
mkdocs.ymlto include MathJax scripts (by chrimaho)
- Introduce
f0c979c: Add progress bar styles and integrate into MkDocs configuration- Create
progress_bar.csswith styles for progress bars and labels - Include progress bar styles in
mkdocs.ymlunderextra_css(by chrimaho)
- Create
27b17bd: Move CSS styles fromstylesheetssub-dir to thecsssub-dir- Introduce styles for various admonition types including
pro-tip,deprecation,observation, andcalculation - Implement styles for code chunk filenames with appropriate icons
- Update
mkdocs.ymlto reference new CSS file paths (by chrimaho)
- Introduce styles for various admonition types including
4df11e7: Update README and Code docs pages- Enhance
READMEstructure and badge visibility - Update seasonality test results in the implementation progress table
- Correct overall test statistics for seasonality (by chrimaho)
- Enhance
9d43aa2: Refactor pytest imports for clarity- Remove unused
fixtureandmarkimports from pytest - Simplify import statements for better readability (by chrimaho)
- Remove unused
155879f: Refactor assertions and enhance seasonality tests- Update
assert_almost_equal()calls to useplacesparameter for precision. - Add detailed test cases for
seasonality()andis_seasonal()functions. - Include summaries for
test_seasonality()andtest_is_seasonal()methods. - Improve test coverage for seasonal algorithms: QS, OCSB, CH, seasonal strength, trend strength, and spikiness. (by chrimaho)
- Update
c6de989: Update seasonality documentation for clarity and accuracy- Correct quote reference to Rob Hyndman and George Athanasopoulos.
- Refine definitions of trend, seasonal, and cyclic patterns for better understanding.
- Enhance information on source libraries and modules used in the implementation.
- Improve overall structure and readability of the documentation. (by chrimaho)
- Correct quote reference to Rob Hyndman and George Athanasopoulos.
5631240: Fill out theseasonality()andis_seasonal()functions- Introduce
seasonality()function as a dispatcher for various seasonality algorithms. - Enhance
is_seasonal()function to provide a standardized output. - Update docstrings for better understanding and usage examples.
- Implement type checking for function parameters. (by chrimaho)
- Introduce
c6a8d15: Enhance documentation requirements for sections- Require 'params', 'examples', and 'calculation' sections to be mandatory.
- Add 'warning' section with optional requirement. (by chrimaho)
- Require 'params', 'examples', and 'calculation' sections to be mandatory.
a289db6: Refactor seasonality documentation for clarity and consistency- Improve descriptions and examples for the
qs(),ocsb(),ch(),seasonal_strength(), andspikiness()functions. - Standardise parameter descriptions and default values.
- Enhance mathematical equations and their explanations.
- Update example usage for better clarity and accuracy. (by chrimaho)
- Improve descriptions and examples for the
c6afda0: Refactor seasonality documentation paths for consistency- Update paths in the seasonality tests section to remove the
src.prefix - Adjust paths in the seasonality algorithms section for uniformity (by chrimaho)
- Update paths in the seasonality tests section to remove the
b716147: Refactor spikiness function to handle NaN values- Replace
np.mean()withnp.nanmean()for robust calculation of mean - Ensure proper handling of missing values in seasonal decomposition (by chrimaho)
- Replace
739cc65: Refactor type hints and input handling for seasonality functions- Change input type from
np.ndarraytoArrayLikefor improved flexibility. - Update input conversion to
np.asarray(x, dtype=float)for consistent handling of input data. (by chrimaho)
- Change input type from
91dfc47: Specify exceptions in ARIMA model fitting error handling- Replace generic exception handling with specific exceptions:
ValueError,RuntimeError, andIndexError - Improve error handling clarity and robustness in the
qs()function (by chrimaho)
- Replace generic exception handling with specific exceptions:
4f6a078: Refactor type hints across unit tests for improved clarity and consistency- Update type hints in
setup.pyto useobjectinstead ofAny - Modify return type of
data_dict()function for better type specificity - Ensure consistency in type annotations across various functions (by chrimaho)
- Update type hints in
c0f5e6f: Add comprehensive documentation pages for seasonality analysis- Introduce an overview of seasonality in time series datasets
- Define key concepts such as trend, seasonal, and cyclic patterns
- Provide references for further reading and source libraries
- Include links to relevant source modules for clarity (by chrimaho)
- Introduce an overview of seasonality in time series datasets
6c9e2e2: Add additionalpylintdisable rules for improved code quality- Include "R0903" for
too-few-public-methods - Add "R0912" for
too-many-branches - Add "R1719" for
simplifiable-if-expression(by chrimaho)
- Include "R0903" for
cb9529f: Implement unit tests for seasonality algorithms- Add
TestSeasonalityclass to test various seasonality functions - Include tests for
qs(),ocsb(),ch(),seasonal_strength(),trend_strength(), andspikiness() - Validate expected outputs and handle failure cases for
qs() - Ensure proper setup with
setUpClass()method (by chrimaho)
- Add
5d3b1a1: Refactor stationarity module header documentation- Remove unnecessary comments and clean up the docstring.
- Enhance the clarity of the purpose and usage of stationarity tests.
- Include a relevant article link for further reading on ADF & KPSS tests. (by chrimaho)
- Remove unnecessary comments and clean up the docstring.
9bbc9cb: Enhance docs forseasonalitymodule- Introduce the
qs()function for the Ljung-Box test to detect seasonality in time series data. - Implement the
ocsb()function for the Osborn, Chui, Smith, and Birchenhall test for seasonal differencing. - Add the
ch()function for the Canova-Hansen test to assess seasonal stability. - Include the
seasonal_strength()function to measure the strength of seasonality in time series data. - Implement the
trend_strength()function to evaluate the strength of the trend component. - Add the
spikiness()function to detect spikes or volatility in time series data. - Enhance docstrings with detailed descriptions, parameters, return values, and examples for each function. (by chrimaho)
- Introduce the
cde3717: Add detailed headers and descriptions for seasonality modules- Include a summary of seasonality tests in the
seasonality.pymodule. - Document the purpose and functionality of each implemented algorithm.
- Enhance clarity for users regarding the statistical tests available. (by chrimaho)
- Include a summary of seasonality tests in the
ebfeac7: AddAndersonResultprotocol and improve type casting- Introduce
AndersonResultprotocol for better type safety. - Enhance type casting in
ad()function to usecast(AndersonResult, ...). - Import
Protocolfromtypingandnumpyfor type annotations. (by chrimaho)
- Introduce
341686b: Implement seasonality algorithms and tests- Introduce algorithms for seasonality analysis including
qs(),ocsb(),ch(),seasonal_strength(),trend_strength(), andspikiness(). - Add placeholder functions
seasonality()andis_seasonal()for future implementation. - Include necessary imports and exports for the new functionality. (by chrimaho)
- Introduce algorithms for seasonality analysis including
ee30457: Add seasonality modules and related tests & docs- Introduce
seasonality.pyfor seasonality analysis - Create
test_seasonality.pyfor unit testing seasonality features - Update
mkdocs.ymlto include seasonality documentation - Add
seasonality.mddocumentation file (by chrimaho)
- Introduce
v0.4.5
v0.4.5 - Add Stationarity Moduleπ
v0.4.5
2026-01-13
data-science-extensions/ts-stat-tests/releases/v0.4.5
Release Notes
π Overviewπ
Introduce the stationarity module, completing the third major component of the statistical test suite. This release provides a unified interface for seven core unit-root and stationarity tests, expanding the library's capability to assess time-series properties. Alongside the new module, this release implements a comprehensive overhaul of documentation standardisation, introduces new synthetic data generators, and achieves a milestone of 100% global code coverage through enhanced unit tests and doctest validation logic.
π οΈ Implementation detailsπ
Stationarity module implementationπ
- Introduce the
src/ts_stat_tests/algorithms/stationarity.pymodule, implementing seven essential stationarity tests:adf(): Augmented Dickey-Fuller test.kpss(): Kwiatkowski-Phillips-Schmidt-Shin test.pp(): Phillips-Perron test (utilisingarchfor improved reliability).za(): Zivot-Andrews test for structural breaks.ers(): Elliott-Rothenberg-Stock GLS test.vr(): Variance Ratio test.rur(): Range Unit Root test.
- Implement a unified dispatcher in
src/ts_stat_tests/tests/stationarity.py:stationarity(): Provide a consistent interface to execute any supported stationarity test via string aliases.is_stationary(): Return a standardised dictionary containing the Boolean result, test statistic, and interpreted p-value.
- Standardise all algorithm outputs to native Python types (
float,int,dict,tuple), ensuring consistent behaviour across the API.
Data utility enhancementsπ
- Expand the
src/ts_stat_tests/utils/data.pymodule with new synthetic data generators:get_normal_curve(): Generate data following a normal distribution.get_trend_data(): Generate data with deterministic linear trends.get_uniform_data(): Generate data following a uniform distribution.
- Expose these as global variables (
data_normal,data_trend,data_uniform) to facilitate reproducible examples and testing. - Refactor all docstring examples across the library (correlation, normality, regularity, stationarity) to use these standardised data imports.
Documentation standardisationπ
- Standardise all function docstrings to follow strict Google-style formatting and DFC compliance.
- Move mathematical formulations into dedicated
equationdropdowns using KaTeX notation for improved readability. - Update terminology to Australian English (e.g.,
standardise,summarise,recognise) and adopt the imperative mood across all descriptions. - Enhance the API reference by adding
docs/code/stationarity.mdand updating the implementation progress tables inREADME.mdanddocs/index.md.
β Checklistπ
- Implement seven core stationarity algorithms in the
algorithmslayer. - Develop a unified stationarity dispatcher and Boolean check in the
testslayer. - Achieve 100% global code coverage across the
ts_stat_testspackage. - Standardise all docstrings and mathematical equations across the entire library.
- Expand data utilities with new synthetic generators and integrate them into examples.
- Implement robust cross-platform doctest validation for floating-point precision.
π§ͺ Testing and quality assuranceπ
- Achieve 100% code coverage by adding comprehensive unit tests for the stationarity module and addressing edge cases in
utils/errors.py. - Implement a custom doctest runner in
src/utils/scripts.pyto enable targeted validation of documentation examples. - Standardise numeric outputs in doctests using explicit string formatting to ensure stability across different operating systems and Python versions.
- Pass all strict
pylint(10/10),pyright(strict), andcomplexipychecks.
πͺ Pull requestsπ
- Implement stationarity module by @chrimaho in https://github.com/data-science-extensions/ts-stat-tests/pull/27
Full Changelog: https://github.com/data-science-extensions/ts-stat-tests/compare/v0.3.1...v0.4.5
Updates
ef5d67a: Fix docstring for theget_normal_curce()function (by chrimaho)ee52e6d: Fixsys.argvlength in thecheck_doctest_cli()function
The function accessessys.argv[2]but the length check only ensures at least 2 elements exist (indices 0 and 1). This will cause an IndexError when exactly 2 arguments are provided. The check should belen(sys.argv) < 3or the access should besys.argv[1]. (by chrimaho)ba4df2c: Addtest_errorsunit tests (by chrimaho)9d3ca5c: Fix unit tests (by chrimaho)df27be0: Update unit tests (by chrimaho)5610b08: Addcheck_doctest()function to list of checks (by chrimaho)667ac56: Standardise and modernise docstring examples for all algorithms and tests- Replace legacy or inconsistent data preparation in docstring examples with unified imports from
ts_stat_tests.utils.data - Use consistent variable names such as
normal,airline,random,trend,noise, andseasonalto improve clarity in all code examples - Remove redundant or outdated example blocks, and add new, focused examples for every major algorithm to better illustrate expected output
- Update expected output values in example code to reflect current results from the associated algorithms
- Ensure all examples use the proper
pyconcode block style and follow a logical, repeatable structure for easier maintenance - Improve exception and error reporting in usage notes, including explicit
ValueErrortracebacks for invalid algorithm parameters - Align with Australian English spelling and imperative mood in documentation (by chrimaho)
- Replace legacy or inconsistent data preparation in docstring examples with unified imports from
95b107b: Expand doc filters to include algorithm-specific patterns- Improve documentation clarity by adding new filter patterns for algorithm-specific members such as
^correlation,^entropy,^regularity, and^stationarity - Standardise filtering approach to ensure relevant functions and methods are included in docs for each algorithm section
- Reduce noise and improve discoverability for users browsing documentation (by chrimaho)
- Improve documentation clarity by adding new filter patterns for algorithm-specific members such as
3ce6ff6: Standardise test docstring examples and update expected outputs- Replace
.valuesusage with direct assignment for test data examples to align with actual return types and avoid confusion - Update expected numeric outputs in code examples for accuracy and consistency with current algorithm behaviour
- Clarify example titles and comments for improved readability and instructional value
- Ensure test documentation reflects standard dataset and normality testing patterns (by chrimaho)
- Replace
ee2eea8: Fix bug in README links (by chrimaho)ae14c7f: Fix typos (by chrimaho)bf06810: Remove redundant test documentation sections from API docs- Streamline documentation by removing duplicate
ts_stat_tests.testssections - Focus on algorithm documentation for clarity and consistency
- Improve maintainability by reducing unnecessary content (by chrimaho)
- Streamline documentation by removing duplicate
5e9fe9f: Add doctest checking functions for targeted modules- Introduce
check_doctest()function to enable running doctests on specific files containingts_stat_tests - Add
check_doctest_module()function to allow module-specific doctest execution - Implement
check_doctest_cli()function for command-line doctest invocation using arguments - Comment out doctest check in
check()function to prevent default execution until ready - Facilitate easier validation of documentation examples and improve test coverage for doctests (by chrimaho)
- Introduce
a02994a: Clarify and standardise normality test return values- Update the return type documentation to clarify that the Anderson-Darling algorithm yields a
tupleof(stat, critical_values, significance_level)instead of a library-specific object - Unpack the result from
_jb()and return atupleof test statistic and p-value for consistency with other algorithms - Improve code clarity and maintainability by standardising interface and documentation (by chrimaho)
- Update the return type documentation to clarify that the Anderson-Darling algorithm yields a
84e144e: Standardise and simplify normality test docstring examples- Replace lengthy, varied examples with concise, uniform usage across all normality test function docstrings
- Use standardised datasets (
data_airline,data_noise,data_normal,data_uniform) to ensure examples are reproducible and consistent - Remove unrelated or overly detailed explanations, focusing on clarity and direct usage of test interfaces
- Improve clarity for end users by providing setup code blocks and clear example output
- Reduce maintenance burden by avoiding external library dependencies (e.g. remove references to
sktime,numpysin data) (by chrimaho)
- Replace lengthy, varied examples with concise, uniform usage across all normality test function docstrings
243adad: Add usage examples forcorrelation()function- Clarify usage by including practical examples
- Demonstrate different algorithms such as "acf" and "lb"
- Help users understand input requirements and expected outputs (by chrimaho)
- Clarify usage by including practical examples
5f8f675: Standardise usage of example data in docstrings- Replace legacy data loading functions with direct data imports in example code for consistency
- Update example code to use
data_airlineanddata_macrodatavariables rather than callload_airline()orload_macrodata() - Align example usage with updated data utilities to improve clarity and reproducibility
- Use
from statsmodels import api as smimport style to match internal standards (by chrimaho)
- Replace legacy data loading functions with direct data imports in example code for consistency
6a3cf35: Add normal, trend, and uniform data generators- Expand data utilities to include
get_normal_curve(),get_trend_data(), andget_uniform_data()functions for generating additional synthetic datasets - Expose new sample arrays such as
data_normalanddata_trendfor easier access in tests and examples - Support reproducibility by seeding random generators for new functions
- Enhance flexibility for statistical testing and demonstration scenarios (by chrimaho)
- Expand data utilities to include
57ed6df: Standardise correlation algorithm documentation and references- Update algorithm table to improve clarity and consistency, including renaming 'Breusch-Godfrey LM Test' and adding 'Lagrange Multiplier Test'
- Remove redundant library column entries for algorithms that are all from
statsmodels - Replace external reference with direct link to official
statsmodelsdocumentation for improved relevance - Correct grammar and style for improved readability, including module names and package references
- Add documentation configuration block for
ts_stat_tests.tests.correlationto align with existing structure - Apply consistent filtering for member listing by excluding methods starting with
isand_(by chrimaho)
- Update algorithm table to improve clarity and consistency, including renaming 'Breusch-Godfrey LM Test' and adding 'Lagrange Multiplier Test'
8ae9069: Standardise return types for normality test functions- Ensure all normality test functions consistently return tuples of floats or lists, improving type clarity and downstream compatibility
- Refine type casting and result extraction in tests to align with updated function outputs
- Enhance robustness of result handling in both normality and stationarity test utilities (by chrimaho)
- Ensure all normality test functions consistently return tuples of floats or lists, improving type clarity and downstream compatibility
215a2af: Standardise normality test function return types- Ensure all normality test functions return plain tuples for consistency and predictability
- Remove use of union types and result classes from function signatures to simplify API and reduce ambiguity
- Facilitate easier downstream usage and type checking by unifying return types across statistical test functions (by chrimaho)
- Ensure all normality test functions return plain tuples for consistency and predictability
cbeac37: Standardise and clarify documentation for statistical tests- Clarify and condense docstrings for normality and stationarity tests, removing repetitive explanations and focusing on essential details
- Standardise notation in mathematical equations, consistently using LaTeX formatting and correct mathematical symbols (e.g.,
\Delta,\epsilon_t) - Enhance explanations of test statistics, including concise mathematical definitions and parameter descriptions
- Add, correct, and clarify credit and reference sections for external libraries and sources, ensuring proper attribution
- Improve consistency in section headers and callout formatting (e.g.,
??? success "Credit",??? tip "See Also") - Add an abstract and usage details to the correlation test dispatcher, listing supported algorithms
- Improve clarity and accuracy of parameter descriptions and summary sections
- Update docstring language to Australian English (e.g., 'standardise', 'summarise'), and use imperative mood throughout (by chrimaho)
- Clarify and condense docstrings for normality and stationarity tests, removing repetitive explanations and focusing on essential details
8e78a81: Standardise exception docstrings for validation errors- Replace inconsistent exception documentation with uniform
Raises:sections detailing(ValueError)for invalid input across normality and regularity algorithms - Remove redundant
Raises:notes specifying no exceptions raised, clarifying documentation - Improve clarity and maintainability of API reference for users and contributors (by chrimaho)
- Replace inconsistent exception documentation with uniform
9bab801: Standardise and clarify docstrings for return types- Update and clarify return type annotations and descriptions in docstrings for statistical test functions
- Remove outdated or ambiguous type hints, ensuring consistency and improved readability
- Adopt consistent dictionary and tuple return type formatting using Python type hinting
- Enhance explanations for result dictionaries, clearly listing expected fields and value types
- Improve maintainability and reduce confusion for users and contributors by standardising documentation (by chrimaho)
- Update and clarify return type annotations and descriptions in docstrings for statistical test functions
eee99be: Standardise parameter documentation formatting- Align docstrings for parameter default values and descriptions across functions
- Remove inconsistent HTML tags and unify wording to improve readability
- Clarify default values using
Default: valuefor easier reference - Improve consistency for users consuming API documentation (by chrimaho)
- Align docstrings for parameter default values and descriptions across functions
c298449: Standardise and expand statistical test docstring examples- Align all docstring code examples to a clear, consistent format using stepwise "Setup" and labelled example sections
- Replace outdated or confusing usage with current, project-specific data loader and methods
- Expand coverage for key statistical tests to demonstrate more parameter combinations and result formats
- Replace
pprintwithprintfor clarity, and showcase array slicing for readable outputs - Add new examples for confidence intervals, advanced options, and more realistic outputs for
acf(),pacf(),ccf(),lb(),lm(), andbglm()functions - Improve readability for end users and facilitate easier learning by showing expected results and recommended invocation patterns (by chrimaho)
- Align all docstring code examples to a clear, consistent format using stepwise "Setup" and labelled example sections
01926a1: Refactor test data setup to use shared utility functions- Standardise test data access by importing shared utility functions
- Remove duplicate data generation logic from test setup file
- Simplify test base class to use direct references to shared data
- Improve maintainability and consistency of test data across the project (by chrimaho)
- Standardise test data access by importing shared utility functions
bc95f0f: Add utility functions and datasets for synthetic and real data- Enable generation of random, sine wave, straight line, and fractional Gaussian noise datasets via dedicated utility functions for reproducible testing and experimentation
- Introduce caching for data generators using
@lru_cacheto improve performance and ensure consistent outputs - Add direct access to classic real-world datasets by loading airline passenger and macroeconomic data as pandas objects
- Standardise data access patterns for downstream code and unit tests by exposing curated data objects
- Improve code clarity by listing public exports and grouping related logic (by chrimaho)
- Enable generation of random, sine wave, straight line, and fractional Gaussian noise datasets via dedicated utility functions for reproducible testing and experimentation
bafa581: Standardise return value documentation for functions in thecorrelationmodule- Align function docstrings to consistently document return types and conditional outputs
- Improve clarity on optional outputs based on input parameters for core statistical test functions
- Enhance maintainability and user comprehension of function behaviour (by chrimaho)
- Align function docstrings to consistently document return types and conditional outputs
6b19d4b: Standardise docstring formatting and improve references- Replace
???admonition syntax with!!!for credits and adjust headings to follow a consistent style - Add hyperlinks to referenced resources for clarity and ease of access
- Update reference block styles to better distinguish between credits and citations
- Clarify return type documentation by removing redundant text and consolidating explanations (by chrimaho)
- Replace
fa557b8: Refactor and standardise entropy docstrings and return types- Refactor and condense docstrings for all entropy-related functions to improve clarity, consistency, and maintainability
- Standardise parameter descriptions and sections, ensuring consistent formatting and mathematical notation using LaTeX
- Add or update examples and notes for better user guidance, using realistic data and reproducible snippets
- Remove redundant or overly verbose explanations and outdated links, and clarify equations in dedicated sections
- Standardise all entropy function return types to explicitly cast outputs to
floatfor consistency - Update references to external libraries and methods, and ensure proper credit is given to the original sources
- Adopt imperative mood and Australian English spelling throughout documentation (by chrimaho)
- Refactor and condense docstrings for all entropy-related functions to improve clarity, consistency, and maintainability
f913bb3: Standardise docstring param and return sections- Replace non-standard
???+ itemizedmarkers with standardParams:andReturns:sections in function docstrings - Improve clarity and consistency of documentation to align with typical Python docstring conventions
- Facilitate better integration with documentation tools and enhance readability for maintainers (by chrimaho)
- Replace non-standard
1cc3d1e: Refactor and clarify statistical docstrings for correlation tests- Reorganise and clarify docstring explanations for autocorrelation, partial autocorrelation, cross-correlation, Ljung-Box, Lagrange Multiplier, and Breusch-Godfrey tests
- Move mathematical definitions and formulas into dedicated
equationdropdowns for better readability and accessibility - Standardise notation (e.g. use
$nlags$,$n_{obs}$, and proper LaTeX formatting) for consistency across documentation - Replace raw Markdown examples with
exampledropdowns and improve usage clarity - Fix minor typos and wording for Australian English, e.g. 'standardise', 'summarise', and ensure use of imperative mood in documentation
- Enhance explanation of test parameters, especially default values and deprecation warnings, for improved user guidance
- Remove redundant or duplicated information and modernise docstring structure with collapsible sections for details, examples, and references
- Credit the
statsmodelslibrary more consistently and visibly in each section (by chrimaho)
- Reorganise and clarify docstring explanations for autocorrelation, partial autocorrelation, cross-correlation, Ljung-Box, Lagrange Multiplier, and Breusch-Godfrey tests
313e185: Expand and standardise stationarity test coverage- Add tests for invalid algorithm handling in
stationarity()function to ensure ValueError is raised as expected - Standardise test results from statistical libraries by converting outputs to native Python types for consistency and easier assertions
- Improve branch coverage in
is_stationary()function, including logic for boolean and non-numeric p-value handling - Explicitly cover all algorithm branches in stationarity dispatcher for comprehensive test coverage
- Replace
pmdarima'sPPTest().should_diff()usage with directarch.unitroot.PhillipsPerron()calls for result consistency across libraries - Enhance readability and maintainability by grouping related imports and adding whitespace for class separation (by chrimaho)
- Add tests for invalid algorithm handling in
35aa684: Increase test coverage for normality checks- Add tests to cover branch scenarios in
is_normal()function where result hasstatisticandpvalueattributes, or is a simple float - Use
unittest.mock.patch()to simulate different return types fromnormality()function - Ensure more robust handling and validation of diverse outputs for improved reliability (by chrimaho)
- Add tests to cover branch scenarios in
c0ecca4: Add summary tables of key statistical tests to docs- Improve discoverability by listing major correlation, normality, and regularity tests in markdown tables
- Standardise documentation with clear algorithm names, abbreviations, import scripts, and links for each method
- Aid users in identifying and accessing relevant statistical tools quickly for time series analysis (by chrimaho)
- Improve discoverability by listing major correlation, normality, and regularity tests in markdown tables
fe7c283: Standardise documentation references and configuration keys- Remove redundant
src.prefix from module references for consistency across documentation - Update configuration blocks to use
extra:root key, aligning with documentation standards - Improve clarity and maintainability for future documentation updates (by chrimaho)
- Remove redundant
dcdbd26: Add missingnumpyimport to thestationaritymodule (by chrimaho)c3093aa: Refactor stationarity result handling and typing- Improve clarity and robustness of the
is_stationary()function by explicitly casting result types and handling tuple returns safely - Standardise type checking and assignment for statistics and p-values, supporting multiple possible types
- Cast return dictionary to expected types, ensuring outputs are consistently formatted and type-safe
- Enhance maintainability and reduce ambiguity in interpreting
stationarity()function results (by chrimaho)
- Improve clarity and robustness of the
1b27b60: Introduce internal helper to standardise function calls- Introduce
_call()function to centralise keyword argument handling when invoking test functions - Improve maintainability and reduce code duplication by standardising how stationarity test functions are called
- Lay groundwork for future changes that may require consistent invocation logic (by chrimaho)
- Introduce
e26a2e7: Expand supported types for algorithm keyword arguments- Allow
stationarity()function andis_stationary()function to acceptArrayLikeas a valid type for keyword arguments - Enable passing complex argument types directly to underlying algorithms, improving flexibility for users specifying parameters
- Standardise type annotations in docstrings to match updated function signatures (by chrimaho)
- Allow
335aaa1: Expand keyword argument types to support array-like inputs- Allow pass array-like types as values for
**kwargsin thecorrelation()function overloads - Enable greater flexibility for algorithms requiring non-scalar keyword arguments
- Improve API consistency and support for advanced use cases (by chrimaho)
- Allow pass array-like types as values for
985bd06: Add usage notes and credit to docstring forrur()function- Clarify that p-values are interpolated and out-of-range statistics generate a warning
- Document that missing values are not handled
- acknowledge the
statsmodelslibrary as the basis for the implementation (by chrimaho)
- Clarify that p-values are interpolated and out-of-range statistics generate a warning
546a1c9: Fix typo (by chrimaho)2df720e: Standardise output types and add explicit casting in tests- Ensure all test functions return standardised output formats by explicitly casting results
- Improve type safety and compatibility across statistical test functions
- Remove inline usage examples from docstrings to declutter documentation
- Adjust lag handling logic for the Phillips-Perron test to avoid invalid lag values
- Enhance maintainability and clarity for future extension or integration (by chrimaho)
- Ensure all test functions return standardised output formats by explicitly casting results
d293fa1: Relocate and standardise example blocks in docstrings- Move all example blocks to consistent positions at the end of each function docstring for improved documentation clarity
- Use uniform markdown formatting for all example code, ensuring consistent presentation across tests including
kpss(),rur(),za(),pp(),ers(), andvr() - Add missing "See Also" section to the Zivot-Andrews test to align with other stationarity tests and aid discoverability
- Improve documentation structure to aid user navigation and future maintenance (by chrimaho)
- Move all example blocks to consistent positions at the end of each function docstring for improved documentation clarity
4fd8c98: Add missingCreditsection to the docstring for theadf()function (by chrimaho)714073e: Standardise type annotations and return values in stationarity algorithms- Align type annotations for parameters and return types to be more explicit and consistent, using domain-specific type aliases where appropriate
- Update docstrings to accurately reflect parameter types and improve clarity on optional arguments
- Adjust return signatures of
kpss(),rur(),pp(),za(), anders()functions for consistency with value structure and expected outputs - Clarify the use of
storeparameter and its effect on returned result tuples - Reduce ambiguity and potential confusion for users and static analysis tools, improving maintainability and type safety throughout the statistical test API (by chrimaho)
- Align type annotations for parameters and return types to be more explicit and consistent, using domain-specific type aliases where appropriate
fe5eae8: Refactor and standardise docstrings for consistency- Improve consistency and clarity in docstring formatting across all stationarity test functions
- Replace scattered "Notes", "Credits", and "Examples" sections with standardised locations and Markdown formatting
- Move or consolidate important notes into
??? note "Notes"blocks for better visibility - Relocate all credit attributions to the end of docstrings in a uniform
!!! success "Credit"block - Remove redundant or duplicate content and streamline explanations, focusing on essential mathematical and usage details
- Enhance maintainability by ensuring all test documentation sections follow a clear, predictable structure (by chrimaho)
- Improve consistency and clarity in docstring formatting across all stationarity test functions
e613d7c: Standardise docstring admonitions for clarity- Replace all occurrences of
!!! summarywith!!! noteto improve consistency in documentation style - Change
???+ infoto???+ abstractfor detailed sections to better reflect their purpose - Update
!!! exampleto???+ examplefor improved formatting and alignment with documentation tools - Amend
??? infoto??? noteto standardise note sections across docstrings - Improve readability and maintainability of docstring formatting for future contributors (by chrimaho)
- Replace all occurrences of
9ec60ac: Refactor normality result handling for robustness- Improve robustness of result extraction by using
getattr()and type casting to handle diverse result types from statistical tests - Ensure consistent float conversion and type safety for
statisticandp_valuefields - Enhance code clarity around Anderson-Darling test result parsing by separating tuple unpacking and array conversions
- Reduce risk of runtime errors from unexpected result formats, standardise output structure, and improve maintainability (by chrimaho)
- Improve robustness of result extraction by using
c2fdd32: Add calculation section to docstring configuration- Introduce a
calculationsection withequationadmonition and unique order in the docstring structure - Standardise documentation by enabling explicit space for calculation or formula details
- Improve clarity by shifting the order of existing sections to accommodate
calculation(by chrimaho)
- Introduce a
afabea1: Expand pylintdisablelist for improved code maintainability- Add
R0911,R0914to the pylint disable list for warnings related to too many return statements and too many local variables - Support more flexible code patterns without triggering style violations
- Facilitate maintainability by reducing unnecessary linting noise and focusing on critical issues (by chrimaho)
- Add
27aca4e: Fix various typos- Standardise test naming and refactor variable names
- Replace inconsistent test method names to use
test_stationarity_za_*format for clarity and consistency - Update variable names from
indxtoindexfor readability and alignment with standard conventions - Change import statement to use
tests.setupfor improved test structure organisation - Improve code maintainability and ease future test extensions (by chrimaho)
- Standardise test naming and refactor variable names
1735768: Standardise typing and signatures for keyword arguments- Replace generic
Anykeyword argument types with explicitUnion[float, int, str, bool, None]to improve static type checking and code clarity - Update function return type annotations for accuracy, clarifying output types for consumers and future maintainers
- Remove unused
Anyimports to clean up namespace and avoid confusion - Apply
cast(int, delay)instead ofcast(Any, delay)inpermutation_entropy()function to enforce type correctness - Use
objectinstead ofAnyingenerate_error_message()function parameters to further restrict accepted types - Improve docstrings to accurately reflect updated parameter and return types, supporting clearer auto-generated documentation (by chrimaho)
- Replace generic
f90d46b: Standardise and update stationarity test documentation- Update statistical test links to point to relevant documentation pages for improved navigation
- Standardise stationarity test implementation indicators from
π²toβin the README to reflect completed Python support - Revise progress table to show full implementation and unit-test coverage for stationarity tests
- Clarify test status and improve transparency of documentation for users (by chrimaho)
- Update statistical test links to point to relevant documentation pages for improved navigation
826dd68: Update stationarity docs to clarify test coverage- Standardise terminology and references for time series stationarity
- Reference authoritative external sources for definitions and further reading
- Refine library comparison table to focus on
statsmodelsandarchfor numerical reliability - Clarify rationale for selecting
statsmodelsandarchpackages, highlighting their comprehensive suite of tests - Update source module references to point to correct stationarity modules (by chrimaho)
- Standardise terminology and references for time series stationarity
49eb822: Standardise hypothesis logic and update PP test implementation- Clarify and align null hypothesis handling for stationarity tests, ensuring consistent interpretation of p-values across algorithms
- Replace
pmdarimaPP test implementation witharchlibrary version, refactorpp()function signature and return values - Improve documentation with explicit references, trend and test type options for PP test, and fix docstring examples
- Update VR, ERS, RUR test hypotheses in docstrings for accuracy
- Enhance stationarity determination logic to robustly support all test types
Relates to improved consistency and accuracy in statistical testing APIs (by chrimaho)
- Clarify and align null hypothesis handling for stationarity tests, ensuring consistent interpretation of p-values across algorithms
17dd78a: Add documentation for time-series stationarity tests- Provide an overview of key stationarity and seasonality tests for time-series data, comparing major Python libraries and their relevant algorithms
- List supported statistical tests with import instructions and direct links to documentation
- Reference implementation modules and usage for both algorithmic and test layers
- Facilitate easier selection and understanding of statistical tools for assessing time-series suitability (by chrimaho)
- Provide an overview of key stationarity and seasonality tests for time-series data, comparing major Python libraries and their relevant algorithms
5acad0c: Add comprehensive unit tests for stationarity algorithms- Expand test coverage for statistical stationarity tests by introducing new test classes and cases
- Standardise testing by comparing custom implementations to third-party libraries, verifying consistency of results
- Include tests for major time series stationarity checks such as ADF, KPSS, PP, ERS, ZA, RUR, and VR
- Use selective assertions and rounding to address minor numerical discrepancies between implementations
- Improve reliability of statistical test code and facilitate future refactoring or algorithm enhancements (by chrimaho)
- Expand test coverage for statistical stationarity tests by introducing new test classes and cases
0a1feb9: add comprehensive docstrings for stationarity test functions- improve clarity and usability by providing detailed docstrings for
stationarity()andis_stationary()functions - include algorithm options, parameter descriptions, return values, and example usage in the documentation
- guide users on the interpretation of test results and clarify statistical assumptions (by chrimaho)
- improve clarity and usability by providing detailed docstrings for
a1da846: add module header and summary docstring for clarity- provide an overview section and description to improve documentation
- include a summary docstring for the module to explain its purpose
- enhance code readability and maintainability by standardising file headers (by chrimaho)
- provide an overview section and description to improve documentation
e497a9c: Add stationarity test wrappers with unified interface- Provide
stationarity()function to standardise access to multiple stationarity tests via a single interface - Implement
is_stationary()function to streamline stationarity assessment using consistent logic across algorithms - Simplify selection of test algorithms with flexible naming and error handling
- Improve code maintainability and readability by centralising algorithm dispatch and result interpretation (by chrimaho)
- Provide
68fbec0: Add comprehensive docstrings for all stationarity test functions- Improve clarity and usability by introducing detailed docstrings for each statistical test function
- Include mathematical formulations, parameter descriptions, expected return values, and practical code examples
- Standardise documentation style with markdown formatting and KaTeX math for equations
- Credit original libraries and add references for further reading to facilitate user understanding
- Enhance discoverability with "See Also" sections linking related tests (by chrimaho)
- Improve clarity and usability by introducing detailed docstrings for each statistical test function
1eba0d9: Add module overview and detailed documentation for stationarity algorithms- Introduce a comprehensive module header describing the purpose and scope of stationarity tests in time series analysis
- Add a detailed summary discussing the statistical rationale and importance of stationarity tests, including ADF, KPSS, PP, ERS, and VR
- Reference useful external resources for further reading to aid understanding
- Improve code readability and maintainability by clarifying context and intent for future contributors (by chrimaho)
- Introduce a comprehensive module header describing the purpose and scope of stationarity tests in time series analysis
40d087b: Add stationarity test wrappers with type validation- Provide standardised function interfaces for multiple stationarity tests
- Use type validation via
@typecheckeddecorator for input safety - Expose consistent argument options and overloads for flexible usage
- Centralise imports and constants to simplify maintenance and readability
- Improve usability by mirroring third-party library signatures (by chrimaho)
- Provide standardised function interfaces for multiple stationarity tests
0c6c10b: Add stationarity test scaffolding to codebase- Prepare groundwork for future stationarity feature implementation
- Standardise documentation and navigation by including stationarity references
- Enable future unit testing via placeholder test files
- Facilitate expansion of statistical algorithms with initial stationarity structure (by chrimaho)
- Prepare groundwork for future stationarity feature implementation
v0.3.1
v0.3.1 - Add Normality Moduleπ
v0.3.1
2026-01-08
data-science-extensions/ts-stat-tests/releases/v0.3.1
Release Notes
π Overviewπ
Introduce the normality module, providing a suite of statistical tests to assess the distribution of time series data. Significantly expand the documentation and test coverage for the regularity and normality modules, update the implementation progress, and improve the clarity and accuracy of references across the project. Notably, introduce new documentation pages, update the README.md and progress tables to reflect completed work, and add a comprehensive test suite for normality algorithms.
π οΈ Implementation detailsπ
Normality module implementationπ
- Introduce the
src/ts_stat_tests/algorithms/normality.pymodule, implementing five core normality tests:jb(),ob(),sw(),dp(), andad(). - Implement a unified interface in
src/ts_stat_tests/tests/normality.pywith the following standardised functions:normality(): Act as a dispatcher to run a selected normality test.is_normal(): Return a standardised dictionary containing the test result (True/False), statistic, and p-value.
- Support various
nan_policyoptions ("propagate", "raise", "omit") across algorithms to handle missing data gracefully. - Provide detailed mathematical documentation, including LaTeX equations and bibliographic references, in the docstrings of all normality test functions.
Regularity module enhancementsπ
- Expand the
src/ts_stat_tests/algorithms/regularity.pymodule by exposing additional entropy measures:permutation_entropy()andsvd_entropy(). - Update the
entropy(),regularity(), andis_regular()functions insrc/ts_stat_tests/tests/regularity.pyto support these new algorithms via intuitive string aliases. - Standardise parameter handling and improve error messaging using
generate_error_message(). - Enhance docstrings with comprehensive examples, mathematical context, and internal cross-references.
Documentation and progress trackingπ
- Create new documentation pages to provide detailed guidance:
docs/code/normality.md: Provide an overview of normality testing, rationale, algorithm details, and API references.docs/code/regularity.md: Detail entropy-based regularity testing and provide a comprehensive API guide.
- Update
docs/code/index.mdandREADME.mdprogress tables to mark thenormalityandregularitymodules as 100% complete. - Refactor
docs/code/correlation.mdto correct and clarify module references and formatting. - Register the
normalitysection inmkdocs.ymlto improve site navigation and information architecture.
Testing and quality assuranceπ
- Add a comprehensive unit test suite in
src/tests/test_normality.py, covering all implemented normality algorithms and edge cases. - Implement a specific mock-based scenario to trigger the fallback path in
is_normal(), ensuring 100% code coverage for the normality module. - Adhere to Australian English spelling (e.g.
standardise,optimise,recognise) and imperative coding style throughout the codebase. - Ensure all code changes pass linting and type checks to maintain high standards for reliability, usability, and transparency.
β Checklistπ
- Implement core normality test algorithms in
src/ts_stat_tests/algorithms/normality.py. - Create unified normality test interfaces in
src/ts_stat_tests/tests/normality.py. - Add comprehensive unit tests in
src/tests/test_normality.pyand achieve 100% coverage. - Expand regularity algorithms and update convenience wrappers.
- Generate detailed documentation for both normality and regularity modules.
- Update project-wide progress tables in
README.mdanddocs/code/index.md. - Standardise spelling to Australian English and ensure consistent formatting.
πͺ Pull Requestsπ
- Implement normality module and enhance regularity documentation by @chrimaho in https://github.com/data-science-extensions/ts-stat-tests/pull/26
Full Changelog: https://github.com/data-science-extensions/ts-stat-tests/compare/v0.2.0...v0.3.1
Updates
90cd570: Fix grammar error (by chrimaho)b708fe1: Remove documentation
Duplicate dictionary key "entropy" in the return type documentation. The second entry on line 341 should be removed as it's identical to the one on line 340. (by chrimaho)4f554e5: Incomplete documentation
The text "because REASONS" is a placeholder that should be replaced with actual reasoning for why the AntroPy package was selected. (by chrimaho)1427c5e: Document additional entropy algorithms in regularity tests- Expand documentation to include
permutation_entropy()andsvd_entropy()functions as supported algorithms - Clarify algorithm selection options and aliases for improved user guidance
- Ensure consistency across docstrings and abstract sections for easier reference (by chrimaho)
- Expand documentation to include
1782d7b: Update progress docs for completed regularity and normality- Mark completed
antropyregularity algorithms and addsvd_entropy()function to documentation - Mark all normality algorithms as implemented and tested
- Reflect full test and unit test coverage for correlation, regularity, and normality modules in progress tables
- Improve accuracy of documentation for current feature and test status (by chrimaho)
- Mark completed
d006b1c: Add documentation for normality tests and algorithms- Provide an overview of normality testing in time-series analysis, including rationale and references
- Detail the use of
scipy.statsandstatsmodelslibraries for statistical tests - Link to relevant source modules for implementation details
- Outline available tests and algorithms via code documentation structure
- Help users understand when and why to perform normality checks on residuals (by chrimaho)
- Provide an overview of normality testing in time-series analysis, including rationale and references
4584b3f: Add unit test for fallback branch in normality check- Improve test coverage by introducing a scenario that triggers the fallback path in the
is_normal()function - Ensure behaviour when the
normality()function returns an object that is neither a tuple/list nor has apvalueattribute - Confirm that the
is_normal()function handles unexpected return types gracefully and returns expected results (by chrimaho)
- Improve test coverage by introducing a scenario that triggers the fallback path in the
ec8d327: Introduce unified normality test interface and refactor docs- Add
normality()andis_normal()functions to standardise access to multiple normality test algorithms - Refactor and expand documentation for all normality algorithms, improving clarity and consistency of usage examples and equations
- Replace scattered summary/info/example blocks with a unified doc structure and imperative notes, using Australian English spelling
- Update and extend test coverage for new interfaces, ensuring comprehensive behaviour for all supported normality tests
- Improve parameter handling and error messaging for invalid algorithm selection using
generate_error_message() - Align with latest
scipyandstatsmodelsresult object conventions for type safety and compatibility (by chrimaho)
- Add
ad67e9d: Add detailed docstrings for normality test functions- Improve documentation by adding comprehensive docstrings to all normality test functions
- Include summaries, parameter descriptions, return types, example usages, equations, references, notes, and related function links
- Standardise documentation style and formatting for clarity and consistency
- Enhance usability for end users by providing practical guidance and mathematical context, referencing the relevant statistical literature and library sources (by chrimaho)
- Improve documentation by adding comprehensive docstrings to all normality test functions
25c4823: Add module-level summary and structured docstrings- Provide a clear overview and description for the normality testing algorithms
- Improve future maintainability by standardising documentation structure
- Clarify module purpose for statistical analysis and forecasting workflows
- Facilitate easier onboarding for new contributors (by chrimaho)
- Provide a clear overview and description for the normality testing algorithms
8f21f94: Add statistical normality test algorithm implementations- Provide comprehensive implementations for assessing data normality via
jb(),ob(),sw(),dp(), andad()functions. - Include detailed docstrings, equations, practical examples, and references to support correct use and interpretation.
- Standardise parameter types, outputs, and documentation for consistent usage across different normality tests.
- Facilitate robust statistical validation in time series forecasting workflows by exposing multiple established tests. (by chrimaho)
- Provide comprehensive implementations for assessing data normality via
a4cfa2a: Add normality test documentation and stubs- Create initial documentation for normality tests
- Add normality test file stubs for future implementation
- Update navigation to include normality section
- Prepare codebase for standardisation of normality test approach (by chrimaho)
- Create initial documentation for normality tests
c0e61c5: Fix docs reference bugs (by chrimaho)1083496: Add regularity documentation- Introduce comprehensive overview and rationale for regularity testing using entropy-based algorithms
- Standardise documentation with references, examples, and usage guidelines for
ts_stat_testsmodules - Clarify differences between approximate entropy and sample entropy in forecasting context
- Link to further resources on time-series analysis methodology and data quality
- Detail regularity algorithms and tests, including filtering logic for code navigation (by chrimaho)
- Introduce comprehensive overview and rationale for regularity testing using entropy-based algorithms
v0.2.0
v0.2.0 - Add Regularity Algorithmsπ
v0.2.0
2026-01-06
data-science-extensions/ts-stat-tests/releases/v0.2.0
Release Notes
π Overviewπ
This release introduces a suite of regularity algorithms for time series analysis, including several entropy-based measures. It also features significant performance optimisations for project maintenance utilities and ensures the package achieves 100% unit test coverage. These enhancements stabilise the codebase and provide a robust foundation for assessing the complexity and regularity of time series data.
π οΈ Implementation detailsπ
Regularity and entropy algorithmsπ
- Implement the
entropy()function as a unified dispatcher for multiple entropy calculation algorithms, supporting Approximate, Sample, Permutation, Spectral, and SVD entropy. - Introduce the
regularity()function to provide a standardised wrapper for assessing time series regularity. - Add the
is_regular()function to determine if a time series meets a defined regularity threshold. - Provide comprehensive wrappers for the
approx_entropy(),sample_entropy(),permutation_entropy(),spectral_entropy(), andsvd_entropy()functions. - Utilise the
antropylibrary for underlying calculations and apply the@typecheckeddecorator for rigorous runtime parameter validation. - Integrate mathematical documentation within docstrings to describe the logic behind regularity measures.
Performance and maintenance utilitiesπ
- Refactor the
get_all_files()function in thescripts.pymodule to use system-levelgit ls-filesandfindcommands. - Optimise directory traversal for project maintenance tasks, reducing execution time from 41 seconds to near-instantaneous.
- Update the
Pylintconfiguration to ignoreR0801(duplicate code) warnings, facilitating specialised test case implementation. - Fix documentation build failures by resolving
mkdocs-materialextension inconsistencies in the development environment.
Quality assurance and environmentπ
- Achieve 100% unit test coverage across the library by adding comprehensive test cases for regularity algorithms, data loading, and error handling.
- Enhance the
assert_almost_equal()andis_almost_equal()utility functions to support precise verification of statistical results. - Update the
load_airline()function to include stricter data type validation and error reporting. - Restrict the
numpyversion to< 2.4inpyproject.tomlto maintain compatibility withNumba()andantropy. - Drop support for Python 3.9 in the CI/CD workflows to align with modern Python lifecycle standards.
β Checklistπ
- Implement core regularity algorithms and entropy measures.
- Optimise file discovery performance in maintenance scripts.
- Reach 100% unit test coverage across all modules.
- Update package dependencies and Python support.
- Standardise documentation and verify build success.
πͺ Pull Requestsπ
- Implement regularity algorithms by @chrimaho in https://github.com/data-science-extensions/ts-stat-tests/pull/25
Full Changelog: https://github.com/data-science-extensions/ts-stat-tests/compare/v0.1.0...v0.2.0
Updates
df1172b: Fix f-string syntax in documentation
The example code contains syntax errors with mismatched quotes. Lines 665, 670, and other locations use straight double quotes inside the f-string which will cause a Python syntax error. The method parameter value should use single quotes or escaped double quotes. (by chrimaho)388713e: Fix documentation typo
The examples show calls to"sample_entropy","approx_entropy", and"spectral_entropy"functions, but the surrounding documentation indicates these should be calls to"is_regular()"with different algorithm parameters. The function names in the examples should be corrected to match the function being documented. (by chrimaho)49ecb5a: Fix documentation consistency
There's an inconsistency in the documentation examples. The function calls in the examples use"approx_entropy","sample_entropy", and"spectral_entropy"directly, but the surrounding text indicates these should be calls to the"regularity()"function with different algorithm parameters. The examples should match the function being documented. (by chrimaho)579c51d: Fix redundant docstring comment
The docstring contains duplicate quote marks in the"Summary"admonition. It should be either!!! note "Summary"or just!!! note Summarywithout the extra quotes. (by chrimaho)9b125fb: Fix another duplication
The documentation lists"approx"twice in line 337 which appears to be a typo. It should likely list the valid string options as:["app", "approx"]based on the implementation in the entropy function. (by chrimaho)b8461aa: Fix duplication
The documentation lists"approx"twice in line 99 which appears to be a typo. It should likely list the valid string options as:["app", "approx"]based on the implementation in the options dictionary on line 181. (by chrimaho)90ce8c2: Update src/ts_stat_tests/algorithms/regularity.py
The example output shows a raw array representation"array([0.9426, 0.9383, 0.9411, 0.9375])"instead of formatted output. Since this is in an f-string print statement, the output format is inconsistent with the other examples which show formatted floats. Consider using.tolist()or formatting the array elements consistently. (by chrimaho)43954ef: Remove redundant docs comment
The docstring contains duplicate quote marks in the"Summary"admonition. It should be either!!! note "Summary"or just!!! note Summarywithout the extra quotes. It should not have duplicate"Summary"sections. (by chrimaho)81defae: Remove duplicates
The documentation lists"approx"twice in line 227 which appears to be a typo. It should likely list the valid string options as:["app", "approx"]based on the implementation in the entropy function. (by chrimaho)b2c8d65: Fixnumpycast process
The cast tonp.ndarrayon line 429 may be incorrect if the inputxis actually anArrayLikethat is not anumpyarray (e.g., alistorpd.Series). Thenp.std()function already acceptsArrayLikeinputs, so this cast is both unnecessary and potentially misleading. Consider removing thecast()or verifying thatxhas been converted to anumpyarray first. (by chrimaho)a344cca: Fixnumpyversion constraint
Thenumpyversion constraint"numpy<2.4"lacks a lower bound, which could allow installation of very oldnumpyversions (including 1.x) that may not be compatible with the codebase. Consider adding a lower bound like"numpy>=2.0.0,<2.4"to ensure compatibility, matching the override-dependencies specification on line 45. (by chrimaho)541a996: Expand test coverage for utils and entropy logic- Include unit tests for the
load_airline()function to verify data type validation and error handling. - Add coverage for the
is_almost_equal()andassert_almost_equal()utility functions to testing parameter validation and failure messages. - Minimise gaps in coverage for the
svd_entropy()andentropy()functions by testing direct calls and algorithm selections. - Verify tolerance logic in the
is_regular()function forNoneand string-based input values. - Bring test coverage up to 100% (by chrimaho)
- Include unit tests for the
63ebd14: Add permutation and SVD entropy options- Expose the
permutation_entropy()andsvd_entropy()functions within the regularity testing module. - Extend the
entropy()function logic to include support for permutation and SVD algorithm types. - Update the options mapping to recognise new aliases and standardise selection of these entropy measures. (by chrimaho)
- Expose the
369a321: Optimise file discovery performance- Use the
findsystem command within theget_all_files()function to accelerate directory traversal. - Implement a fallback mechanism to the
.glob()method on thePath()class if the system command is unavailable. - Prune
.venvand hidden directories in the search path to minimise processing time. - Standardise the output by applying the
sorted()function to the list of discovered file paths. - Add a docstring to the
get_all_files()function to document the dual-method execution logic. (by chrimaho)
- Use the
4dc7cad: Update the Pylint configuration to suppressR0801duplicate-code check- Ignore duplicate-code warnings to reduce linting noise
- Allow code repetition where refactoring for deduplication is not desirable (by chrimaho)
- Ignore duplicate-code warnings to reduce linting noise
5f6b9e5: Refine documentation and update test baselines- Update baseline numerical values for
approx_entropy(),sample_entropy(),permutation_entropy(), andspectral_entropy()functions in the test suite to match revised calculations. - Standardise the type hint for the
metricparameter inentropy(),regularity(), andis_regular()functions to useVALID_KDTREE_METRIC_OPTIONS. - Refine docstrings by removing redundant admonition titles in
svd_entropy(),entropy(),regularity(), andis_regular()functions. (by chrimaho)
- Update baseline numerical values for
89ce566: Improve regularity test type safety and documentation- Standardise docstring admonition blocks to use consistent
noteandabstractlabels. - Add a comprehensive docstring for the
svd_entropy()function including parameters and return types. - Enhance type safety by using the
cast()function and specific type aliases formetricandmethodarguments. - Refactor logic in the
entropy()function to replace nested branches with early returns. - Update parameter documentation for
toleranceandmetricin theapprox_entropy()andsample_entropy()functions. - Ensure the
is_regular()function returns predictable types through explicit dictionary value casting. - Add module-level headers and summary documentation to the regularity test utility source code. (by chrimaho)
- Standardise docstring admonition blocks to use consistent
3e13d54: Restrict NumPy version for Numba compatibility- Limit
numpyversion to less than2.4to ensure compatibility with Numba - Synchronise the version cap across project dependencies and
uvoverrides (by chrimaho)
- Limit
c0d065d: Add unit tests for regularity and entropy metrics- Implement the
TestRegularity()class to provide comprehensive unit testing for regularity and entropy algorithms. - Add test cases for the
approx_entropy(),sample_entropy(),permutation_entropy(), andspectral_entropy()functions across multiple data types including noise, sine waves, and linear trends. - Verify that the
is_regular()function validates return keys and value types while handling invalid algorithm parameters. - Validate numerical accuracy for various scenarios such as multidimensional arrays and different distance metrics used within the algorithms.
- Utilise the
assert_almost_equal()function to ensure precise verification of calculated entropy values. (by chrimaho)
- Implement the
f71614b: Standardise documentation and fix docstring typos- Update code block labels to
pyconto support interactive example rendering - Fix a typographical error in the
importstatement for thespectral_entropy()function - Standardise spacing in arithmetic expressions within the
sample_entropy()andpermutation_entropy()functions - Improve docstring layout by adding vertical spacing before example blocks in the
approx_entropy()andspectral_entropy()functions (by chrimaho)
- Update code block labels to
700a063: Add regularity and entropy statistical tests- Introduce
entropy()function as a unified interface for several entropy calculation algorithms - Add
regularity()function to provide a pass-through wrapper for assessing time series regularity - Implement
is_regular()function to determine if a dataset is regular by comparing entropy against a threshold - Apply
typecheckeddecorator to ensure robust parameter validation for all new functions - Include helper logic to calculate a default
tolerancebased on the standard deviation of the input data - Support
approx_entropy(),sample_entropy(), andspectral_entropy()functions via a central entry point - Provide internal parameter validation to normalise algorithm selection strings (by chrimaho)
- Introduce
50b5405: Add regularity test file- Initialise the
test_regularity.pyfile to provide a structure for upcoming test cases (by chrimaho)
- Initialise the
f33cbf7: Add documentation for regularity functions- Provide extensive docstrings for
approx_entropy(),sample_entropy(),permutation_entropy(), andspectral_entropy()functions. - Include mathematical formulations such as \(ApEn(m, r, N) = \phi_m(r) - \phi_{m+1}(r)\) to describe regularity logic.
- Add practical examples demonstrating how to apply entropy functions to various datasets.
- Document parameter configurations such as the
orderandmetricarguments for thesample_entropy()function. - Detail the steps required to normalise results within the
permutation_entropy()andspectral_entropy()functions. - Incorporate academic references and credit the
AntroPylibrary for the underlying implementations.ts (by chrimaho)
- Provide extensive docstrings for
759edd6: Refine typing and expand entropy functions- Introduce
Literaltype hints to restrict valid options formetricandmethodparameters. - Add
toleranceparameter toapprox_entropy()andsample_entropy()functions. - Standardise parameter definitions in
approx_entropy(),sample_entropy(), andspectral_entropy()functions usingVALID_KDTREE_METRIC_OPTIONSandVALID_SPECTRAL_ENTROPY_METHOD_OPTIONSconstants. (by chrimaho)
- Introduce
5c48940: Addsvd_entropy()function for regularity testing- Include
svd_entropyin the__all__list to expose the new algorithm. - Implement the
svd_entropy()function as a type-checked wrapper for theantropyimplementation to provide Singular Value Decomposition entropy calculations. (by chrimaho)
- Include
a51404c: Add documentation header and module docstring- Add a descriptive header to the regularity module to clarify its purpose.
- Include a module-level docstring that summarises functionality for computing regularity measures. (by chrimaho)
- Add a descriptive header to the regularity module to clarify its purpose.
1796788: Add regularity entropy algorithms- Implement
approx_entropy(),sample_entropy(),permutation_entropy(), andspectral_entropy()functions - Utilise the
antropylibrary for underlying entropy calculations - Apply the
typecheckeddecorator to ensure parameter type safety - Define the
__all__list to expose the public API of the module (by chrimaho)
- Implement
ffb08f7: Add regularity module and documentation- Provide regularity statistical tests within the algorithms library
- Ensure code quality with a new test suite
- Initialise the documentation and update the site navigation (by chrimaho)
- Provide regularity statistical tests within the algorithms library
dd00a96: Drop Python 3.9 support from CD workflow- Remove
3.9from the environment matrix to align with modern support standards. - Optimise the deployment pipeline by focusing on more recent releases. (by chrimaho)
- Remove
v0.1.0
v0.1.0 - Initial release of Time Series Statistical Testsπ
v0.1.0
2026-01-05
data-science-extensions/ts-stat-tests/releases/v0.1.0
Release Notes
π Overviewπ
This is the initial release of ts-stat-tests, a Python package dedicated to providing a unified and standardised interface for time series statistical testing. This release establishes the foundational project infrastructure, implements a comprehensive suite of correlation algorithms, and provides extensive documentation and automated CI/CD pipelines. It aims to bridge the gap between R and Python for time series analysis by offering a single, robust library for standard time series statistical tests.
π οΈ Implementation detailsπ
Core correlation algorithmsπ
- Introduce the
acf()function,pacf()function, andccf()function to estimate autocorrelation, partial autocorrelation, and cross-correlation functions. - Implement residual diagnostic tests including the
lb()function for Ljung-Box testing, thelm()function for Lagrange Multiplier tests, and thebglm()function for Breusch-Godfrey tests. - Provide a unified
correlation()dispatcher function to simplify algorithm selection via string aliases. - Utilise the
statsmodelslibrary as the underlying engine to ensure robust and standardised statistical results. - Include detailed docstrings for all algorithms, featuring mathematical definitions, parameter details, and practical usage examples.
Project infrastructure and automationπ
- Initialise the project structure using
uvfor efficient dependency management and build orchestration. - Implement a centralised
scripts.pymodule to provide a suite of automation utilities for linting, checking, and maintenance. - Configure pre-commit hooks to enforce code quality, standardise formatting, and prevent direct commits to the
mainbranch. - Establish GitHub Actions workflows for continuous integration (
ci.yml) and continuous delivery (cd.yml) to automate testing and releases. - Integrate Dependabot to automate updates for GitHub Actions dependencies on a weekly schedule.
Documentation and presentationπ
- Launch a comprehensive documentation site using
mkdocswith thematerialtheme and custom stylesheets. - Expand the
README.mdwith project badges, a motivation section, and a detailed feature implementation table. - Implement custom documentation hooks in
shortcodes.pyto support dynamic content and enhanced rendering. - Add placeholder pages and "To Do" notes for
CHANGELOG.mdandCONTRIBUTING.mdto guide future documentation efforts.
Type safety and quality assuranceπ
- Enforce runtime type safety by applying the
@typecheckeddecorator to all core algorithm functions. - Integrate
pyrightfor rigorous static type analysis and resolve complex type-hinting issues. - Implement utility functions for error reporting and float comparison, including
generate_error_message(),is_almost_equal(), andassert_almost_equal(). - Achieve 100% unit test coverage for the correlation module to ensure reliability and correctness.
β Checklistπ
- Establish foundational project structure and configuration.
- Implement core correlation algorithms and diagnostic tests.
- Create a centralised automation and maintenance script.
- Launch a comprehensive documentation site and expand
README.md. - Configure CI/CD pipelines and pre-commit hooks.
- Enforce runtime and static type safety across the package.
- Achieve high unit test coverage for the initial release.
πͺ Pull Requestsπ
- Initialise project structure and configuration by @chrimaho in https://github.com/data-science-extensions/ts-stat-tests/pull/15
- Add correlation algorithms for time series analysis by @chrimaho in https://github.com/data-science-extensions/ts-stat-tests/pull/16
- Set up unit tests and enhance development infrastructure by @chrimaho in https://github.com/data-science-extensions/ts-stat-tests/pull/17
- Establish CI/CD pipelines and automate release workflows by @chrimaho in https://github.com/data-science-extensions/ts-stat-tests/pull/18
- Bump actions/checkout from 5 to 6 by @dependabot[bot] in https://github.com/data-science-extensions/ts-stat-tests/pull/19
- Bump actions/setup-python from 5 to 6 by @dependabot[bot] in https://github.com/data-science-extensions/ts-stat-tests/pull/23
- Bump astral-sh/setup-uv from 6 to 7 by @dependabot[bot] in https://github.com/data-science-extensions/ts-stat-tests/pull/22
- Bump actions/upload-artifact from 4 to 6 by @dependabot[bot] in https://github.com/data-science-extensions/ts-stat-tests/pull/21
- Bump actions/download-artifact from 5 to 7 by @dependabot[bot] in https://github.com/data-science-extensions/ts-stat-tests/pull/20
- Enhance project documentation and presentation by @chrimaho in https://github.com/data-science-extensions/ts-stat-tests/pull/24
π New Contributorsπ
- @chrimaho made their first contribution in https://github.com/data-science-extensions/ts-stat-tests/pull/15
- @dependabot[bot] made their first contribution in https://github.com/data-science-extensions/ts-stat-tests/pull/19
Full Changelog: https://github.com/data-science-extensions/ts-stat-tests/commits/v0.1.0
Updates
085a4c0: Re-enable key components in thecdworkflow, ready for first deployment (by chrimaho)a722504: Ensure coverage reports are staged even when directory paths are ignored.- Use the
--forceflag in thegit_add_coverage_report()function. - Bypass
.gitignorerestrictions to guarantee documentation updates. (by chrimaho)
- Use the
85f68e6: Hide some lines incdto check workflow during release (by chrimaho)16c9288: Standardise type hints and remove dependencies- Replace custom type hints with native Python equivalents for the
__all__variable - Remove the unnecessary import from the
toolbox_python.collection_typesmodule - Update the
replace()function to use there.Match()class directly (by chrimaho)
- Replace custom type hints with native Python equivalents for the
8e76143: Fix missing justifications in docs (by chrimaho)a3085ff: Fix typos (by chrimaho)aef58db: Fix typo (by chrimaho)90c953b: Fix incorrect percentages (by chrimaho)15202ad: Re-enablemkdocschecks (by chrimaho)728c24a: Add overview of module progress (by chrimaho)02d36d1: Addcorrelationmodule docs page (by chrimaho)60c7127: Fix some typos on thecorrelationmodule docs (by chrimaho)fe9003d: Add docs landing page and home page structures (by chrimaho)37fab51: Add custom hooks for docs to utilise (by chrimaho)83dd55f: Initial commit of package icons (by chrimaho)8c3f0cf: Initial commit of package stylesheets (by chrimaho)950c1fb: Fill in README file (by chrimaho)e2c62bd: Initial commit of standard package docs (by chrimaho)1f1a9d6: Initial commit ofmkdocsconfig file (by chrimaho)c7839a4: Set UTF-8 encoding for Python I/O in CI- Define the
PYTHONIOENCODINGenvironment variable to ensure consistent character handling across CI environments (by chrimaho)
- Define the
cc368ff: Fix typo (by chrimaho)0b2d590: Standardise variable naming convention- Rename the repository variable to lower-case to follow standard naming conventions for local instances within the
main()function. - Update references to the variable when calling the
.get_releases()method and.get_commits()method. - The variable name
REPOis defined in uppercase following constant naming conventions, but it's not a constant - it's a dynamically created repository object. Consider using lowercaserepoto follow Python naming conventions where uppercase names are reserved for constants. (by chrimaho)
- Rename the repository variable to lower-case to follow standard naming conventions for local instances within the
ed5404d: Initialise the output file before starting the main process- Call the
prepare_output_file()function to ensure the destination is ready for writing. - Set up the file environment prior to opening the GitHub and file context managers. (by chrimaho)
- Call the
6060627: Define constant for short SHA length- Introduce
SHORT_SHA_LENGTHconstant to replace hardcoded magic numbers - Update
add_commit_info()function to use defined constant - Standardise representation of short commit identifiers for improved maintainability (by chrimaho)
- Introduce
aa243b7: FixPotential bug
Ifcommit.authorisNone, the code constructs an incomplete markdown link[]()with empty values. This would result in broken links in the changelog. Consider providing a default fallback text like"Unknown"for the author name and omitting the link altogether when the author is unavailable. (by chrimaho)d1e0800: Refactor correlation tests to use pytest- Replace
.assertRaises()method withraises()function to standardise test assertions - Update
.test_is_correlated()method to expectNotImplementedError()class fromis_correlated()function (by chrimaho)
- Replace
01d3544: Create script to automate changelog generation- Introduce the
src/utils/changelog.pyscript to automate the creation ofCHANGELOG.mdby retrieving data via the GitHub API. - Implement the
prepare_output_file()function to ensure the document is recreated from scratch on each run. - Define the
add_page_styling()function to embed CSS for better navigation in Markdown viewers. - Utilise the
main()function to fetch releases via the.get_releases()method and filter out irrelevant commits to maintain a clean history. - Use the
Github()class to authenticate and manage repository interactions. - Standardise the output format for release notes and commit details to improve readability. (by chrimaho)
- Introduce the
702d902: Add continuous delivery workflow for releases- Introduce
cd.ymlto automate the release cycle triggered by published GitHub releases. - Orchestrate a multi-stage pipeline including testing, building, PyPI deployment, and documentation generation.
- Utilise
uvto synchronise dependencies and manage the build process for improved performance. - Execute the
git_update_version_cli()function to handle versioning during the build stage. - Verify package integrity using an installation matrix across multiple operating systems and Python versions.
- Automate changelog generation via the
changelog.pyscript and push updates to the repository. - Upload distribution assets to GitHub releases and coverage data to Codecov. (by chrimaho)
- Introduce
3e014f6: Increase CI job parallelism- Increase the
max-parallellimit to 30 to allow for more concurrent jobs - Optimise the CI pipeline performance by utilising more available runners for the matrix build (by chrimaho)
- Increase the
cd1f7ad: Add CI workflow for automated code validation- Implement GitHub Actions to automate validation on push and pull request events.
- Configure a check job for non-main branches to facilitate early issue detection.
- Define a matrix strategy to ensure cross-platform compatibility across various OS types.
- Support Python versions 3.9 through 3.14 to maintain broad environment stability.
- Utilise
uvfor efficient dependency management and execution of the validation script. (by chrimaho)
- Implement GitHub Actions to automate validation on push and pull request events.
1f68794: Add Dependabot for GitHub Actions- Initialise the configuration file to manage
github-actionsdependencies. - Schedule weekly updates to ensure actions remain current.
- Assign a default reviewer and label to simplify the pull request review process. (by chrimaho)
- Initialise the configuration file to manage
c059c7c: Raise error for unimplemented correlation test- Replace the
Nonereturn value in theis_correlated()function with aNotImplementedErrorto explicitly signal that this logic is a placeholder and has not yet been implemented. (by chrimaho)
- Replace the
470fbfa: Clarify type ignore reasons- Document rationale for
# type: ignoreon calls to theacorr_lm()function andacorr_breusch_godfrey()function - Note that
statsmodelstype hints are incomplete or incompatible with internalRegressionResults()class types (by chrimaho)
- Document rationale for
8ea4c9d: Standardise equality check utility functions- Set default value for
placesparameter inis_almost_equal()function andassert_almost_equal()function overloads - Refactor
is_almost_equal()function to prioritise argument validation over value equality checks - Standardise type annotations for the
paramsdictionary inassert_almost_equal()function - Simplify logic for error messages in
assert_almost_equal()function by defaulting to precision-based comparison (by chrimaho)
- Set default value for
00a6029: Initialise parent classes in test suites- Call the
.setUpClass()and.tearDownClass()methods of the superclass in theBaseTester()class - Implement the
.setUp(),.tearDown(), and.tearDownClass()methods in theTestCorrelation()class to ensure proper lifecycle management (by chrimaho)
- Call the
3b018b4: Remove redundant lines in config file (by chrimaho)58163f0: Update documentation headers and module summaries- Add header comments to the
setup.pyscript explaining its role in unit tests. - Standardise documentation in the
errors.pymodule regarding error generation and data equality checks. (by chrimaho)
- Add header comments to the
9c7206a: Optimise data generation and loading via caching- Apply the
@lru_cachedecorator to theget_random_generator()function and variousdata_*()functions to reduce redundant test overhead. - Remove the global
seed()function call to favour the use of independent random generators. - Enhance the
load_airline()function with result caching to improve data retrieval performance. (by chrimaho)
- Apply the
891edd2: Refactor correlation logic and remove redundant code- Remove commented-out code from the
correlation()function to clean up the source. - Update the
is_correlated()function to returnNoneinstead of raising aNotImplementedErrorclass to provide a neutral placeholder. (by chrimaho)
- Remove commented-out code from the
0d078f3: Add implementation error to theis_correlatedfunction
The functionis_correlatedis defined but returnsNoneand serves no purpose. It's marked as a placeholder in the docstring, but placeholder functions should either be removed or raiseNotImplementedErrorto indicate they're not yet implemented. ReturningNonewith no implementation can lead to confusion. (by chrimaho)335045d: Refine correlation APIs and improve type safety- Introduce
@overload()function signatures foracf(),pacf(),ccf(),lm(),bglm(), andcorrelation()functions to improve static analysis and developer experience. - Standardise parameter validation using
Literal()class aliases for algorithm options within theacf()andpacf()functions. - Update the
ccf()function to supportnlagsandalphaparameters for better consistency with other correlation tools. - Enforce keyword-only arguments for the
storeparameter inlm()andbglm()functions and thealphaandqstatparameters in theacf()function. - Refine the
correlation()function to act as a unified interface with specific return type hints based on the provided algorithm string. - Ensure the
lb()function return type is correctly annotated as apd.DataFrame()class. (by chrimaho)
- Introduce
6176186: Validate data type inload_airline()- Ensure the
load_airline()function returns apd.Series()class by introducing a type check - Raise a
TypeError()class if the result of the.squeeze()method is not a series to prevent errors when initialising thepd.PeriodIndex()class - Resolve PyRight errors (by chrimaho)
- Ensure the
d668fa7: Organise and clean up check function calls- Remove the redundant commented out
check_mypy()function call from thecheck()function - Move and disable the
check_mkdocs()function call to execute after thecheck_build()function call within thecheck()function (by chrimaho)
- Remove the redundant commented out
b9a9c1a: Addpyrightfor static type analysis- Include
pyrightin the development dependencies - Define the
check_pyright()function to analyse code types - Integrate the
check_pyright()function into the validationcheck()function (by chrimaho)
- Include
d7b0669: Ignore complexipy cache directory- Prevent
.complexipy_cache/*from being tracked in the repository (by chrimaho)
- Prevent
15b4f17: Expand correlation tests and organise imports- Import
correlation()andis_correlated()functions to expand test coverage for the correlation module. - Add
.test_correlation_ccf_raises()and.test_correlation_bglm()methods to validate algorithm error handling and behaviour. - Simplify the
.setUpClass()method by removing redundant type annotations from class attributes and local variables. - Reformat import statements to improve code structure and maintainability. (by chrimaho)
- Import
f61bbf8: Update type hints to use abstract base classes- Replace
Dict()andList()withMapping()andCollection()classes in thegenerate_error_message()function to support broader input types - Standardise the use of the built-in
dict()class within theassert_almost_equal()function - Simplify complex
Uniontype annotations to improve code maintainability (by chrimaho)
- Replace
c77a089: Introduce correlation test dispatcher- Implement the
correlation()function to provide a unified interface for various statistical correlation algorithms. - Map string aliases to internal implementations such as the
_acf(),_pacf(), and_ccf()functions. - Utilise the
generate_error_message()function to handle unsupported algorithm selections with descriptive feedback. - Ensure the
yparameter is provided when theccfalgorithm is requested via thecorrelation()function. - Add a placeholder
is_correlated()function to define the intended package structure. (by chrimaho)
- Implement the
47ff459: Refine type annotations for correlation functions- Standardise return type signatures for the
lm()function and thebglm()function. - Introduce
overload()definitions for thelm()function to improve static analysis and type safety. - Replace
np.float64,np.ndarray, and complexUniontypes with specificfloattuples to ensure consistency. (by chrimaho)
- Standardise return type signatures for the
4f783a0: Add error handling and float comparison utilities- Add
generate_error_message()function to standardise error reporting for invalid parameter options. - Implement
is_almost_equal()function to provide flexible float comparison using either decimal places or a specific delta. - Include
assert_almost_equal()function to facilitate testing by raising descriptiveAssertionErrormessages when float values deviate beyond tolerances. (by chrimaho)
- Add
aa0c816: Disable invalid-name linting rule- Disable the
C0103rule to standardise the project's naming convention exceptions. (by chrimaho)
- Disable the
8b1424e: Standardise docstrings and improve type hinting- Define
VALID_PACF_METHODSconstant to centralise allowed methods for thepacf()function. - Update docstring callouts to use
!!! noteand???+ abstractadmonitions for improved documentation consistency. - Refine parameter type descriptions in docstrings to use
ArrayLikeandOptionaltypes for theacf(),pacf(),ccf(),lb(), andlm()functions. - Reformat code examples to use
pyconsyntax and ensure correct line continuation for better rendering. - Clean up
!!! deprecationblocks and standardise internal formatting. (by chrimaho)
- Define
02fd5d2: Document and standardise data utility module- Add module-level docstrings and structural headers to improve navigation
- Enhance the
load_airline()function with comprehensive documentation and academic references - Remove unused
numpyimport to tidy theimportssection - Standardise the file layout using consistent section markers (by chrimaho)
- Add module-level docstrings and structural headers to improve navigation
f6824ad: Suppress specific Pylint linting warnings- Introduce configuration to relax linting constraints
- Minimise noise by disabling checks for line length and file length
- Disable warnings for argument counts and redefined built-ins (by chrimaho)
- Introduce configuration to relax linting constraints
716db6d: Expand and standardise docstring sections- Add
credit,references,see also, anddeprecationsections to the configuration - Standardise the internal key order for all section definitions to maintain consistency
- Align configuration properties to improve visual clarity and maintenance (by chrimaho)
- Add
48abfe1: Update package name and add script documentation- Add a header comment block to the utility script to document usage and purpose.
- Update the
PACKAGE_NAMEconstant to reflect the project identity. (by chrimaho)
- Add a header comment block to the utility script to document usage and purpose.
9ba6915: Introduce a centralised scripts module- Provide a centralised suite of automation utilities for project maintenance.
- Implement a
run_command()function to handle shell execution and argument expansion. - Include a
lint()function to standardise code formatting across the repository. - Define a
check()function to aggregate quality assurance tests and build verification. - Automate git workflows for versioning, tagging, and documentation deployment.
- Expose utilities via a CLI entry point to simplify development and CI/CD pipelines. (by chrimaho)
- Provide a centralised suite of automation utilities for project maintenance.
c6021f8: Introduce pre-commit hooks for code quality- Standardise repository-wide formatting and linting rules
- Automate file-level sanitisation for whitespace and line endings
- Enforce Python style consistency using
black,isort, andpyupgrade - Prevent direct commits to the
mainbranch viano-commit-to-branch - Validate configuration files with
check-json,check-toml, andcheck-yaml - Integrate
uvlockfile and synchronisation checks to maintain environment integrity - Sanitise documentation and check spelling with
blacken-docsandcodespell - Implement a local
ty-checkhook for type safety (by chrimaho)
- Standardise repository-wide formatting and linting rules
ccc7aed: Add unit tests for thecorrelationmodule- Update
llvmliteandnumbapackages to stable versions inpyproject.toml - Add
stochasticpackage to the test dependencies - Introduce
BaseTester()class to standardise test data setup via the.setUpClass()method - Implement
load_airline()function to retrieve sample datasets for time series analysis - Add unit tests for correlation functions including
acf()andpacf() - Configure
uvdependency overrides to maintainnumpypackage version consistency (by chrimaho)
- Update
f18bc49: Fix the PACF formula clarity
The PACF formula is incorrectly formatted and unclear. The notation"Corr(Y_t, Y_{t-k} / Y_{t-1}, Y_{t-2}, ..., Y_{t-k+1})"uses division where conditional notation should be used. It should be"Corr(Y_t, Y_{t-k} | Y_{t-1}, Y_{t-2}, ..., Y_{t-k+1})"with a vertical bar (|) to denote conditioning, not a division symbol. (by chrimaho)9de39de: Correct ACF formula inacf()function docstring- Update the mathematical expression in the
acf()function docstring to correctly show square roots in the denominator. - Add the simplified version of the ACF formula for stationary time series to the
acf()function documentation. (by chrimaho)
- Update the mathematical expression in the
984fb1d: Fix typo issue
Inconsistent terminology: The documentation states "Ljung-Box and Box-Pierce statistic differ" but should use "statistics" (plural) since there are two statistics being discussed. (by chrimaho)04dbd4b: Fixp-valueformatting issue (by chrimaho)9631202: Fix self-referential documentation issue
The text "Seeq_statfor more information" is circular and unhelpful since this IS the documentation for theqstatparameter. This reference should either be removed or point to relevant external documentation or the Returns section. (by chrimaho)044f8a0: Fix typo (by chrimaho)cbf0fb7: Fix duplicate word (by chrimaho)feba34c: Standardise formatting ofp-valuein docs (by chrimaho)ac283f5: Correct the formula provided in thelm()function documentation- Clarify the relationship between the LM test, Engle's ARCH test, and the Breusch-Godfrey test within the
lm()function - Refine the mathematical definition of the test statistic to focus on the auxiliary regression
$R^2$, the number of observations, and degrees of freedom - Provide a clearer step-by-step procedure for fitting the time series model and running the auxiliary regression to obtain the test statistic
- Improve the explanation of the null hypothesis and the resulting asymptotic chi-squared distribution of the LM statistic
- Standardise document formatting by using KaTeX for math equations and back-ticks for parameters like
residandnlags(by chrimaho)
- Clarify the relationship between the LM test, Engle's ARCH test, and the Breusch-Godfrey test within the
1d32293: Add correlation algorithms for time series analysis- Introduce
acf()function,pacf()function, andccf()function to compute temporal dependencies. - Implement
lb()function,lm()function, andbglm()function for residual autocorrelation testing. - Utilise
statsmodelslibrary to ensure robust and standardised statistical results. - Include detailed docstrings with mathematical formulas and usage examples.
- Apply
@typecheckeddecorator to ensure runtime type safety for all algorithm inputs. (by chrimaho)
- Introduce
fa3e3fd: Remove duplicate function declaration (by chrimaho)94efa8b: Initialise project structure and configuration- Define project metadata and dependencies within
pyproject.tomlusinguv_build. - Configure linting, formatting, and testing tools to standardise development.
- Implement
strip_ansi_codes()function insetup.pyto facilitate environment-agnostic CLI output verification. - Add test naming helper functions like
name_func_flat_list()function tosetup.py. - Configure
sys.pathin thetests__init__.pyfile to ensure local module resolution. - Extend
.gitignoreto excludeuv.lock,.vscode/, and other local environment directories. (by chrimaho)
- Define project metadata and dependencies within
b963f05: Initial commit (by chrimaho)