Designed to make time series forecasting workflows faster, safer, and more standardized.
Project description
TSTools
TSTools is a Python package for making time series forecasting workflows faster, safer, and more standardized.
It is intended to become a practical forecasting helper package for:
- validating forecasting datasets
- exploring time series structure quickly
- supporting reusable forecasting workflows
Today, the implemented package starts with the first and most important layer of that vision: data sanity checks for forecast readiness.
Why TSTools
Forecasting projects often lose time because basic data problems are discovered too late:
- invalid or inconsistent dates
- duplicate time keys
- missing timestamps
- invalid target values
- weak or broken grouped-series structure
- messy regressor columns
TSTools is designed to catch those problems early, with an API that works well in notebooks, scripts, and pipeline-style checks.
Current Release
The current public workflow is centered on:
load_sample_data(...)sanity_checks(...)
Current implemented package areas:
tstools.sanityforecast-readiness validationtstools.datasetssample data for trying the API quickly
Planned package areas:
tstools.edafast exploration and diagnostics for time series datatstools.forecastingreusable forecasting helpers, baselines, and evaluation utilities
Install
Install from PyPI:
pip install tstools-forecast
Import it as:
import tstools
For local development:
pip install tstools-forecast
For editable local development:
pip install -e .
For development tools:
pip install -e .[dev]
Quickstart
from tstools import load_sample_data, sanity_checks
df = load_sample_data("sample_timeseries_dataframe")
report = sanity_checks(
df,
date_col="date", # timestamp column for the time series
target_col="sales", # value column to validate for forecasting
group_cols=["dfu"], # key column(s) defining each individual series
expected_freq="D", # expected cadence, here daily
min_history=10, # minimum observations expected per series
non_negative_target=True,
integer_like_target=True,
regressors={
"categorical": ["promo_type"],
"numerical": ["price"],
"boolean": ["is_promo"],
},
)
print(report.overall_status)
print(report.summary)
Recommended first-time flow:
- install
tstools-forecast - import from
tstools - run
load_sample_data("sample_timeseries_dataframe") - inspect the printed report and
report.summary
What The Current Sanity Module Covers
sanity_checks(...) currently covers:
- required columns
- duplicate column names
- empty data / zero usable rows
- null group keys
- date parsing
- monotonic timestamp order
- duplicate keys and conflicting duplicate keys
- missing dates and frequency consistency
- numeric target validity
- target domain constraints
- missing targets
- constant and all-zero series
- short history
- typed regressor validation for categorical, numerical, and boolean regressors
Sample Data
TSTools ships with one maintained public demo dataset:
sample_timeseries_dataframe
It is intentionally designed to exercise the current sanity-check surface in one dataframe, including:
- invalid dates
- missing dates
- duplicate and conflicting duplicate keys
- missing targets
- constant and all-zero series
- short history
- target domain violations
- invalid or missing regressors
Report Statuses
Overall report status:
READYREADY_WITH_WARNINGSNOT_READY
Check status:
PASSWARNFAILINFO
Product Direction
The long-term goal is not just to validate data, but to support a fuller forecasting workflow:
- validate time series inputs
- explore and diagnose the data
- build repeatable forecasting utilities on top of clean inputs
Development
Run verification:
.\.venv\Scripts\python.exe -m pytest
.\.venv\Scripts\python.exe -m bandit -q -r src
Docs
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tstools_forecast-1.0.0.tar.gz.
File metadata
- Download URL: tstools_forecast-1.0.0.tar.gz
- Upload date:
- Size: 23.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
373485c3bdcd543b92813e1f20d8962fbe5192fe0daee53b5538061415dadeeb
|
|
| MD5 |
16ff7eadab871983090d1cc79756ba3d
|
|
| BLAKE2b-256 |
55497b00460c7fd4cdf177b09b147fa4222b6c99c52e3e79782ff7a5b881bc44
|
Provenance
The following attestation bundles were made for tstools_forecast-1.0.0.tar.gz:
Publisher:
publish-prod.yml on rudreshmishra16/TSTools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tstools_forecast-1.0.0.tar.gz -
Subject digest:
373485c3bdcd543b92813e1f20d8962fbe5192fe0daee53b5538061415dadeeb - Sigstore transparency entry: 1203836523
- Sigstore integration time:
-
Permalink:
rudreshmishra16/TSTools@5c7b0c9c426f13bd581a3cedfebb5b143d84c16a -
Branch / Tag:
refs/heads/prod - Owner: https://github.com/rudreshmishra16
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-prod.yml@5c7b0c9c426f13bd581a3cedfebb5b143d84c16a -
Trigger Event:
push
-
Statement type:
File details
Details for the file tstools_forecast-1.0.0-py3-none-any.whl.
File metadata
- Download URL: tstools_forecast-1.0.0-py3-none-any.whl
- Upload date:
- Size: 24.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4d677572349642863b04a70343693a76f8bedf3338d147f427436603b35fda56
|
|
| MD5 |
babcf7dcbd03bb16075895690cd671a4
|
|
| BLAKE2b-256 |
9ff61922c254e6954e524fb2365d3ea05685cc31a4896c638e2e4b3c66373f5f
|
Provenance
The following attestation bundles were made for tstools_forecast-1.0.0-py3-none-any.whl:
Publisher:
publish-prod.yml on rudreshmishra16/TSTools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tstools_forecast-1.0.0-py3-none-any.whl -
Subject digest:
4d677572349642863b04a70343693a76f8bedf3338d147f427436603b35fda56 - Sigstore transparency entry: 1203836528
- Sigstore integration time:
-
Permalink:
rudreshmishra16/TSTools@5c7b0c9c426f13bd581a3cedfebb5b143d84c16a -
Branch / Tag:
refs/heads/prod - Owner: https://github.com/rudreshmishra16
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-prod.yml@5c7b0c9c426f13bd581a3cedfebb5b143d84c16a -
Trigger Event:
push
-
Statement type: