art-tseries 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. art_tseries-0.1.0/PKG-INFO +87 -0
  2. art_tseries-0.1.0/README.md +61 -0
  3. art_tseries-0.1.0/pyproject.toml +42 -0
  4. art_tseries-0.1.0/setup.cfg +4 -0
  5. art_tseries-0.1.0/src/art/__init__.py +69 -0
  6. art_tseries-0.1.0/src/art/describe.py +2200 -0
  7. art_tseries-0.1.0/src/art/diagnosis.py +543 -0
  8. art_tseries-0.1.0/src/art/formal_tests.py +1199 -0
  9. art_tseries-0.1.0/src/art/full_report.py +597 -0
  10. art_tseries-0.1.0/src/art/guion.py +408 -0
  11. art_tseries-0.1.0/src/art/identification.py +958 -0
  12. art_tseries-0.1.0/src/art/interventions.py +485 -0
  13. art_tseries-0.1.0/src/art/mcp_server.py +3309 -0
  14. art_tseries-0.1.0/src/art/model_detection.py +714 -0
  15. art_tseries-0.1.0/src/art/pipeline.py +535 -0
  16. art_tseries-0.1.0/src/art/policy.py +263 -0
  17. art_tseries-0.1.0/src/art/seasonal_detection.py +430 -0
  18. art_tseries-0.1.0/src/art_tseries.egg-info/PKG-INFO +87 -0
  19. art_tseries-0.1.0/src/art_tseries.egg-info/SOURCES.txt +36 -0
  20. art_tseries-0.1.0/src/art_tseries.egg-info/dependency_links.txt +1 -0
  21. art_tseries-0.1.0/src/art_tseries.egg-info/entry_points.txt +2 -0
  22. art_tseries-0.1.0/src/art_tseries.egg-info/requires.txt +10 -0
  23. art_tseries-0.1.0/src/art_tseries.egg-info/top_level.txt +1 -0
  24. art_tseries-0.1.0/tests/test_acf_contributions.py +202 -0
  25. art_tseries-0.1.0/tests/test_compare_versions.py +245 -0
  26. art_tseries-0.1.0/tests/test_formal_tests.py +844 -0
  27. art_tseries-0.1.0/tests/test_full_report.py +219 -0
  28. art_tseries-0.1.0/tests/test_golden_pipeline.py +247 -0
  29. art_tseries-0.1.0/tests/test_guion.py +348 -0
  30. art_tseries-0.1.0/tests/test_identification.py +104 -0
  31. art_tseries-0.1.0/tests/test_interventions.py +320 -0
  32. art_tseries-0.1.0/tests/test_mcp_server.py +716 -0
  33. art_tseries-0.1.0/tests/test_multiplicative_seasonality.py +185 -0
  34. art_tseries-0.1.0/tests/test_overpar.py +231 -0
  35. art_tseries-0.1.0/tests/test_policy.py +166 -0
  36. art_tseries-0.1.0/tests/test_seasonal_params.py +203 -0
  37. art_tseries-0.1.0/tests/test_seasonal_simplification.py +216 -0
  38. art_tseries-0.1.0/tests/test_unit_root.py +213 -0
@@ -0,0 +1,87 @@
1
+ Metadata-Version: 2.4
2
+ Name: art-tseries
3
+ Version: 0.1.0
4
+ Summary: Box-Jenkins-Treadway time series model-building toolkit + MCP server (uses fue and pyfug)
5
+ Author-email: "David E. Guerrero" <davidesg@ucm.es>
6
+ License: GPL-2.0-or-later
7
+ Keywords: time series,ARIMA,Box-Jenkins,Treadway,MCP,forecasting
8
+ Classifier: Development Status :: 4 - Beta
9
+ Classifier: Intended Audience :: Science/Research
10
+ Classifier: Topic :: Scientific/Engineering :: Mathematics
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.10
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Requires-Python: >=3.10
16
+ Description-Content-Type: text/markdown
17
+ Requires-Dist: fue>=0.1.3
18
+ Requires-Dist: pyfug>=2.0
19
+ Requires-Dist: numpy>=1.24
20
+ Requires-Dist: matplotlib>=3.7
21
+ Requires-Dist: scipy>=1.10
22
+ Requires-Dist: statsmodels>=0.14
23
+ Requires-Dist: mcp>=1.0
24
+ Provides-Extra: dev
25
+ Requires-Dist: pytest>=7; extra == "dev"
26
+
27
+ # ART — Box-Jenkins-Treadway time series toolkit + MCP server
28
+
29
+ `art-tseries` (ART) builds univariate time series models following the
30
+ **Box-Jenkins-Treadway** methodology: an iterative, decision-driven process that
31
+ uses graphical tools and formal tests to identify, estimate, diagnose and refine
32
+ a model until it is adequate and parsimonious.
33
+
34
+ ART is the orchestration layer of a four-part suite:
35
+
36
+ | Package | Role |
37
+ |---------|------|
38
+ | **[fue](https://pypi.org/project/fue/)** | Exact maximum-likelihood estimation (ARMAX + transfer functions) and **FUF** forecasting. C engine with a pure-Python fallback. |
39
+ | **pyfug** | High-definition graphics for time series analysis. |
40
+ | **ART** (`art-tseries`) | Identification, model building, diagnosis, formal tests, versioning — and an **MCP server** that exposes all of this to an LLM. |
41
+
42
+ The Box-Jenkins-Treadway loop needs *judgement* at each decision node. ART
43
+ supplies the evidence (graphs, tests, numbers); a human analyst and/or Claude
44
+ supply the criterion. Two modes:
45
+
46
+ - **Guided** — analyst + Claude: Claude proposes with arguments, the analyst decides.
47
+ - **Autonomous** — Claude/heuristic decides every step and presents a final model.
48
+
49
+ ## Install
50
+
51
+ ```bash
52
+ pip install art-tseries # pulls fue + pyfug automatically
53
+ ```
54
+
55
+ This installs the `art-mcp` command (the MCP server).
56
+
57
+ ## Use as an MCP server (Claude Code, etc.)
58
+
59
+ ```bash
60
+ claude mcp add art -- art-mcp
61
+ ```
62
+
63
+ Then ask Claude to analyse a series. ART will ask whether you want a **guided**
64
+ or **autonomous** analysis and drive the workflow from there.
65
+
66
+ ## Use as a library
67
+
68
+ ```python
69
+ import fue
70
+ from art.describe import describe_boxcox, describe_identification, model_equation
71
+
72
+ ts, _ = fue.inp.load("series.inp")
73
+ print(describe_boxcox(ts).summary)
74
+ ```
75
+
76
+ ## Methodology
77
+
78
+ The model-building process is iterative and sequential: each estimation starts
79
+ from the previous likelihood optimum (the `.pre` of the previous model), and
80
+ every step produces a `.pre` (estimated parameters as initial values) and a
81
+ `.out` (results), mirroring `fue`. Decisions and changes are recorded in a
82
+ `guion.json` audit trail. See `docs/ARCHITECTURE.md` for the full design and the
83
+ evidence-vs-criterion philosophy.
84
+
85
+ ## License
86
+
87
+ GPL-2.0-or-later. © David E. Guerrero.
@@ -0,0 +1,61 @@
1
+ # ART — Box-Jenkins-Treadway time series toolkit + MCP server
2
+
3
+ `art-tseries` (ART) builds univariate time series models following the
4
+ **Box-Jenkins-Treadway** methodology: an iterative, decision-driven process that
5
+ uses graphical tools and formal tests to identify, estimate, diagnose and refine
6
+ a model until it is adequate and parsimonious.
7
+
8
+ ART is the orchestration layer of a four-part suite:
9
+
10
+ | Package | Role |
11
+ |---------|------|
12
+ | **[fue](https://pypi.org/project/fue/)** | Exact maximum-likelihood estimation (ARMAX + transfer functions) and **FUF** forecasting. C engine with a pure-Python fallback. |
13
+ | **pyfug** | High-definition graphics for time series analysis. |
14
+ | **ART** (`art-tseries`) | Identification, model building, diagnosis, formal tests, versioning — and an **MCP server** that exposes all of this to an LLM. |
15
+
16
+ The Box-Jenkins-Treadway loop needs *judgement* at each decision node. ART
17
+ supplies the evidence (graphs, tests, numbers); a human analyst and/or Claude
18
+ supply the criterion. Two modes:
19
+
20
+ - **Guided** — analyst + Claude: Claude proposes with arguments, the analyst decides.
21
+ - **Autonomous** — Claude/heuristic decides every step and presents a final model.
22
+
23
+ ## Install
24
+
25
+ ```bash
26
+ pip install art-tseries # pulls fue + pyfug automatically
27
+ ```
28
+
29
+ This installs the `art-mcp` command (the MCP server).
30
+
31
+ ## Use as an MCP server (Claude Code, etc.)
32
+
33
+ ```bash
34
+ claude mcp add art -- art-mcp
35
+ ```
36
+
37
+ Then ask Claude to analyse a series. ART will ask whether you want a **guided**
38
+ or **autonomous** analysis and drive the workflow from there.
39
+
40
+ ## Use as a library
41
+
42
+ ```python
43
+ import fue
44
+ from art.describe import describe_boxcox, describe_identification, model_equation
45
+
46
+ ts, _ = fue.inp.load("series.inp")
47
+ print(describe_boxcox(ts).summary)
48
+ ```
49
+
50
+ ## Methodology
51
+
52
+ The model-building process is iterative and sequential: each estimation starts
53
+ from the previous likelihood optimum (the `.pre` of the previous model), and
54
+ every step produces a `.pre` (estimated parameters as initial values) and a
55
+ `.out` (results), mirroring `fue`. Decisions and changes are recorded in a
56
+ `guion.json` audit trail. See `docs/ARCHITECTURE.md` for the full design and the
57
+ evidence-vs-criterion philosophy.
58
+
59
+ ## License
60
+
61
+ GPL-2.0-or-later. © David E. Guerrero.
@@ -0,0 +1,42 @@
1
+ [build-system]
2
+ requires = ["setuptools>=60", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "art-tseries"
7
+ version = "0.1.0"
8
+ description = "Box-Jenkins-Treadway time series model-building toolkit + MCP server (uses fue and pyfug)"
9
+ readme = "README.md"
10
+ license = { text = "GPL-2.0-or-later" }
11
+ requires-python = ">=3.10"
12
+ authors = [
13
+ { name = "David E. Guerrero", email = "davidesg@ucm.es" },
14
+ ]
15
+ keywords = ["time series", "ARIMA", "Box-Jenkins", "Treadway", "MCP", "forecasting"]
16
+ classifiers = [
17
+ "Development Status :: 4 - Beta",
18
+ "Intended Audience :: Science/Research",
19
+ "Topic :: Scientific/Engineering :: Mathematics",
20
+ "Programming Language :: Python :: 3",
21
+ "Programming Language :: Python :: 3.10",
22
+ "Programming Language :: Python :: 3.11",
23
+ "Programming Language :: Python :: 3.12",
24
+ ]
25
+ dependencies = [
26
+ "fue>=0.1.3",
27
+ "pyfug>=2.0",
28
+ "numpy>=1.24",
29
+ "matplotlib>=3.7",
30
+ "scipy>=1.10",
31
+ "statsmodels>=0.14",
32
+ "mcp>=1.0",
33
+ ]
34
+
35
+ [project.optional-dependencies]
36
+ dev = ["pytest>=7"]
37
+
38
+ [project.scripts]
39
+ art-mcp = "art.mcp_server:main"
40
+
41
+ [tool.setuptools.packages.find]
42
+ where = ["src"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,69 @@
1
+ from .identification import (
2
+ IdentificationListing, identification_listing,
3
+ BoxCoxSelection, boxcox_selection,
4
+ plot_boxcox_selection, save_boxcox_selection,
5
+ save_identification_report,
6
+ UnitRootResult, unit_root_tests, recommended_d,
7
+ )
8
+ from .seasonal_detection import (
9
+ SeasonalDetectionResult, detect_seasonality,
10
+ plot_seasonality, save_seasonality,
11
+ )
12
+ from .model_detection import (
13
+ ModelSpec, suggest_orders,
14
+ plot_model_comparison, save_model_detection_report,
15
+ )
16
+ from .diagnosis import (
17
+ DiagnosisResult, diagnose,
18
+ plot_diagnosis, plot_diagnosis_histogram, save_diagnosis_report,
19
+ )
20
+ from .formal_tests import (
21
+ ShinFullerResult, shin_fuller,
22
+ DCDResult, dcd, dcd_f,
23
+ RVResult, rv,
24
+ MEGResult, meg,
25
+ )
26
+ from .interventions import (
27
+ OutlierWarning, InterventionDiagnosis, diagnose_interventions,
28
+ )
29
+ from .full_report import FullReport, save_full_report
30
+ from .guion import (
31
+ GuionStats, GuionEntry, Guion,
32
+ load_guion, save_guion,
33
+ _extract_spec, _extract_stats, _build_equation, export_guion_html,
34
+ )
35
+ from .describe import (
36
+ Description,
37
+ describe_boxcox, describe_seasonality, describe_identification,
38
+ describe_unit_root,
39
+ describe_diagnosis, describe_formal_tests, describe_interventions,
40
+ describe_prelim_scan,
41
+ _sample_acf_raw, _acf_outlier_contributions,
42
+ )
43
+
44
+ __version__ = "0.1.0"
45
+ __all__ = [
46
+ "IdentificationListing", "identification_listing",
47
+ "BoxCoxSelection", "boxcox_selection",
48
+ "plot_boxcox_selection", "save_boxcox_selection",
49
+ "save_identification_report",
50
+ "SeasonalDetectionResult", "detect_seasonality",
51
+ "plot_seasonality", "save_seasonality",
52
+ "ModelSpec", "suggest_orders",
53
+ "plot_model_comparison", "save_model_detection_report",
54
+ "DiagnosisResult", "diagnose",
55
+ "plot_diagnosis", "plot_diagnosis_histogram", "save_diagnosis_report",
56
+ "ShinFullerResult", "shin_fuller",
57
+ "DCDResult", "dcd", "dcd_f",
58
+ "RVResult", "rv",
59
+ "MEGResult", "meg",
60
+ "OutlierWarning", "InterventionDiagnosis", "diagnose_interventions",
61
+ "FullReport", "save_full_report",
62
+ "UnitRootResult", "unit_root_tests", "recommended_d",
63
+ "describe_unit_root",
64
+ "describe_prelim_scan",
65
+ "_sample_acf_raw", "_acf_outlier_contributions",
66
+ "GuionStats", "GuionEntry", "Guion",
67
+ "load_guion", "save_guion",
68
+ "_extract_spec", "_extract_stats", "_build_equation", "export_guion_html",
69
+ ]