A DARTS-first CLI for time series analysis, preprocessing, and forecasting
Project description
tscli
tscli is a command-line tool for time series analysis and forecasting built around DARTS.
It is designed for a simple workflow:
- load a CSV
- clean common formatting issues
- inspect and analyze the series
- compare models on a holdout window
- generate and export forecasts
What It Does
- works directly from CSV files
- detects and fixes common time-series formatting issues
- supports a clean
date + targetworkflow - benchmarks multiple models with
MAE,RMSE, andMAPE - exports cleaned datasets, forecasts, benchmark tables, and plots
- provides an interactive terminal mode
Install
Main install:
pip install tscli-darts
Local development install:
pip install -e .
Optional extras:
- Classical DARTS models such as
thetaandexponential-smoothing
pip install -e .[classical]
- AutoARIMA support
pip install -e .[autoarima]
- Everything
pip install -e .[full]
Typical Workflow
1. Inspect the raw CSV
Use this first to confirm the time column, target column, inferred frequency, and any preprocessing fixes.
python -m tscli inspect .\sales.csv --time-col Month --target-col Sales
2. Clean the dataset
If the CSV has shorthand dates, duplicate timestamps, formatted numeric values, or other simple issues, save a normalized version.
python -m tscli clean .\sales.csv --time-col Month --target-col Sales --output .\cleaned_sales.csv
3. Analyze the time series
Get quick descriptive statistics and recent observations before forecasting.
python -m tscli analyze .\cleaned_sales.csv --time-col Month --target-col Sales
4. Benchmark models
Run several models against a holdout window, compare metrics, and optionally export the score table, forecast, and plot.
python -m tscli benchmark .\cleaned_sales.csv --time-col Month --target-col Sales --horizon 12 --models all --scores-output .\scores.csv --forecast-output .\best_forecast.csv --plot-output .\benchmark.png
5. Generate a forecast
Forecast future periods with a chosen model and optionally export the forecast and chart.
python -m tscli forecast .\cleaned_sales.csv --time-col Month --target-col Sales --model naive-drift --horizon 12 --output .\forecast.csv --plot-output .\forecast.png
6. Use interactive mode
Run the full workflow from a menu-driven terminal interface.
python -m tscli interactive .\cleaned_sales.csv --time-col Month --target-col Sales
Commands
inspect: summarize the dataset and show preprocessing fixesclean: normalize and save a cleaned CSVanalyze: print descriptive statistics and recent observationsforecast: generate future values from one modelbenchmark: compare several models on a holdout windowmodels: list supported forecasting modelsinteractive: launch the terminal menu workflow
Forecasting Models
Supported models:
naive-lastnaive-driftnaive-seasonalmoving-averageweighted-moving-averageexp-smoothingseasonal-averageseasonal-medianlinear-trendquadratic-trendarimasarimathetaexponential-smoothingauto-arima
Example Dataset
The bundled examples/sales.csv shows a shorthand monthly sales format like:
Month,Sales
1-01,266.0
1-02,145.9
1-03,183.1
tscli will detect and normalize that Month column into proper first-of-month datetimes.
Notes
- The CSV should include a target column and optionally a time column.
- If no time column is provided,
tsclibuilds a synthetic integer index. - If DARTS cannot infer a frequency automatically, forecasting still uses the ordered observations.
- Some classical DARTS models depend on optional libraries; when unavailable,
forecastexplains the missing requirement andbenchmarkskips the model. arimaandsarimaremain DARTS-first models, with fallback behavior only when the DARTS classical path is unavailable.
Packaging
To build distributable artifacts locally:
python -m pip install build
python -m build
This will generate source and wheel distributions in dist/.
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 tscli_darts-0.1.1.tar.gz.
File metadata
- Download URL: tscli_darts-0.1.1.tar.gz
- Upload date:
- Size: 15.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c9ea2aec3ff1f9117820703a76d291f0402eceb3a4e284ca6a47ee01dd8d497
|
|
| MD5 |
82a01fc040f7a1cac5340299caea008d
|
|
| BLAKE2b-256 |
03cc214bbc0aac2d44386515275fd9b7aac578d3bec42f120a1220b8b03e30dc
|
File details
Details for the file tscli_darts-0.1.1-py3-none-any.whl.
File metadata
- Download URL: tscli_darts-0.1.1-py3-none-any.whl
- Upload date:
- Size: 15.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae486ea0a40ba9e2bfdb874d15c690810823217ac4ee4660e7e899dd621dd0ae
|
|
| MD5 |
751433759b26bd2cfb83231ae113d1f8
|
|
| BLAKE2b-256 |
b54e47525f232fcc90fbbbe9cce99a5717c7dd2345c4b71506a941c9fa8f9857
|