SAES 2.0.0__tar.gz → 2.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 (131) hide show
  1. saes-2.1.0/.github/CODEOWNERS +2 -0
  2. {saes-2.0.0 → saes-2.1.0}/.github/workflows/release.yml +9 -2
  3. {saes-2.0.0 → saes-2.1.0}/CHANGELOG.md +16 -1
  4. {saes-2.0.0 → saes-2.1.0}/PKG-INFO +1 -1
  5. {saes-2.0.0 → saes-2.1.0}/docs/api-reference.md +6 -0
  6. saes-2.1.0/docs/extensibility.md +174 -0
  7. {saes-2.0.0 → saes-2.1.0}/docs/index.md +8 -0
  8. saes-2.1.0/docs/user-guide/pareto-plugin.md +225 -0
  9. {saes-2.0.0 → saes-2.1.0}/mkdocs.yml +1 -0
  10. {saes-2.0.0 → saes-2.1.0}/pyproject.toml +4 -1
  11. {saes-2.0.0 → saes-2.1.0}/src/saes/__init__.py +6 -0
  12. saes-2.1.0/src/saes/plugins/__init__.py +54 -0
  13. saes-2.1.0/src/saes/plugins/pareto/__init__.py +118 -0
  14. saes-2.1.0/src/saes/plugins/pareto/dominance.py +260 -0
  15. saes-2.1.0/src/saes/plugins/pareto/eaf.py +321 -0
  16. saes-2.1.0/src/saes/plugins/pareto/indicators.py +286 -0
  17. saes-2.1.0/src/saes/plugins/pareto/io.py +490 -0
  18. saes-2.1.0/src/saes/plugins/pareto/models.py +459 -0
  19. saes-2.1.0/src/saes/plugins/pareto/plots.py +1756 -0
  20. saes-2.1.0/src/saes/plugins/pareto/plugin.py +48 -0
  21. saes-2.1.0/src/saes/plugins/pareto/router.py +481 -0
  22. saes-2.1.0/src/saes/plugins/registry.py +328 -0
  23. {saes-2.0.0 → saes-2.1.0}/src/saes/reports/renderers.py +6 -0
  24. {saes-2.0.0 → saes-2.1.0}/src/saes/server/app.py +4 -0
  25. saes-2.1.0/src/saes/server/routes/plugins.py +34 -0
  26. {saes-2.0.0 → saes-2.1.0}/src/saes/server/schemas.py +10 -0
  27. {saes-2.0.0 → saes-2.1.0}/src/saes/stats/registry.py +6 -0
  28. {saes-2.0.0 → saes-2.1.0}/src/saes/visualization/registry.py +6 -0
  29. saes-2.1.0/tests/plugins/test_dominance_and_indicators.py +113 -0
  30. saes-2.1.0/tests/plugins/test_eaf.py +83 -0
  31. saes-2.1.0/tests/plugins/test_io_and_plots.py +219 -0
  32. saes-2.1.0/tests/plugins/test_plugin_integration.py +199 -0
  33. saes-2.1.0/tests/unit/test_plugins.py +235 -0
  34. {saes-2.0.0 → saes-2.1.0}/uv.lock +1 -1
  35. saes-2.1.0/version.txt +1 -0
  36. saes-2.0.0/docs/extensibility.md +0 -89
  37. saes-2.0.0/version.txt +0 -1
  38. {saes-2.0.0 → saes-2.1.0}/.github/workflows/docs.yml +0 -0
  39. {saes-2.0.0 → saes-2.1.0}/.github/workflows/tests.yml +0 -0
  40. {saes-2.0.0 → saes-2.1.0}/.gitignore +0 -0
  41. {saes-2.0.0 → saes-2.1.0}/CITATION.cff +0 -0
  42. {saes-2.0.0 → saes-2.1.0}/LICENSE +0 -0
  43. {saes-2.0.0 → saes-2.1.0}/Makefile +0 -0
  44. {saes-2.0.0 → saes-2.1.0}/README.md +0 -0
  45. {saes-2.0.0 → saes-2.1.0}/assets/saes-logo.svg +0 -0
  46. {saes-2.0.0 → saes-2.1.0}/docs/assets/figures/bayesian_simplex_hv.svg +0 -0
  47. {saes-2.0.0 → saes-2.1.0}/docs/assets/figures/boxplot_dtlz2_hv.svg +0 -0
  48. {saes-2.0.0 → saes-2.1.0}/docs/assets/figures/critical_distance_hv.svg +0 -0
  49. {saes-2.0.0 → saes-2.1.0}/docs/assets/figures/effect_size_forest_dtlz2.svg +0 -0
  50. {saes-2.0.0 → saes-2.1.0}/docs/assets/figures/ml_cd_accuracy.svg +0 -0
  51. {saes-2.0.0 → saes-2.1.0}/docs/assets/figures/plackett_luce_hv.svg +0 -0
  52. {saes-2.0.0 → saes-2.1.0}/docs/assets/logo.svg +0 -0
  53. {saes-2.0.0 → saes-2.1.0}/docs/changelog.md +0 -0
  54. {saes-2.0.0 → saes-2.1.0}/docs/getting-started/installation.md +0 -0
  55. {saes-2.0.0 → saes-2.1.0}/docs/getting-started/quickstart.md +0 -0
  56. {saes-2.0.0 → saes-2.1.0}/docs/hooks.py +0 -0
  57. {saes-2.0.0 → saes-2.1.0}/docs/javascripts/mathjax.js +0 -0
  58. {saes-2.0.0 → saes-2.1.0}/docs/methodology.md +0 -0
  59. {saes-2.0.0 → saes-2.1.0}/docs/rest-api.md +0 -0
  60. {saes-2.0.0 → saes-2.1.0}/docs/stylesheets/extra.css +0 -0
  61. {saes-2.0.0 → saes-2.1.0}/docs/tutorials/metaheuristics-benchmark.md +0 -0
  62. {saes-2.0.0 → saes-2.1.0}/docs/tutorials/ml-crossvalidation.md +0 -0
  63. {saes-2.0.0 → saes-2.1.0}/docs/user-guide/bayesian-and-equivalence.md +0 -0
  64. {saes-2.0.0 → saes-2.1.0}/docs/user-guide/blocked-and-posthoc.md +0 -0
  65. {saes-2.0.0 → saes-2.1.0}/docs/user-guide/decision-engine.md +0 -0
  66. {saes-2.0.0 → saes-2.1.0}/docs/user-guide/visualization-and-tables.md +0 -0
  67. {saes-2.0.0 → saes-2.1.0}/scripts/release_stamp.js +0 -0
  68. {saes-2.0.0 → saes-2.1.0}/src/saes/_version.py +0 -0
  69. {saes-2.0.0 → saes-2.1.0}/src/saes/api.py +0 -0
  70. {saes-2.0.0 → saes-2.1.0}/src/saes/app/__init__.py +0 -0
  71. {saes-2.0.0 → saes-2.1.0}/src/saes/app/pipeline.py +0 -0
  72. {saes-2.0.0 → saes-2.1.0}/src/saes/domain/__init__.py +0 -0
  73. {saes-2.0.0 → saes-2.1.0}/src/saes/domain/exceptions.py +0 -0
  74. {saes-2.0.0 → saes-2.1.0}/src/saes/domain/models.py +0 -0
  75. {saes-2.0.0 → saes-2.1.0}/src/saes/io/__init__.py +0 -0
  76. {saes-2.0.0 → saes-2.1.0}/src/saes/io/base.py +0 -0
  77. {saes-2.0.0 → saes-2.1.0}/src/saes/io/csv_reader.py +0 -0
  78. {saes-2.0.0 → saes-2.1.0}/src/saes/py.typed +0 -0
  79. {saes-2.0.0 → saes-2.1.0}/src/saes/reports/__init__.py +0 -0
  80. {saes-2.0.0 → saes-2.1.0}/src/saes/reports/reproducibility.py +0 -0
  81. {saes-2.0.0 → saes-2.1.0}/src/saes/server/__init__.py +0 -0
  82. {saes-2.0.0 → saes-2.1.0}/src/saes/server/helpers.py +0 -0
  83. {saes-2.0.0 → saes-2.1.0}/src/saes/server/routes/__init__.py +0 -0
  84. {saes-2.0.0 → saes-2.1.0}/src/saes/server/routes/analysis.py +0 -0
  85. {saes-2.0.0 → saes-2.1.0}/src/saes/server/routes/datasets.py +0 -0
  86. {saes-2.0.0 → saes-2.1.0}/src/saes/server/routes/health.py +0 -0
  87. {saes-2.0.0 → saes-2.1.0}/src/saes/server/storage.py +0 -0
  88. {saes-2.0.0 → saes-2.1.0}/src/saes/stats/__init__.py +0 -0
  89. {saes-2.0.0 → saes-2.1.0}/src/saes/stats/anova.py +0 -0
  90. {saes-2.0.0 → saes-2.1.0}/src/saes/stats/assumptions.py +0 -0
  91. {saes-2.0.0 → saes-2.1.0}/src/saes/stats/base.py +0 -0
  92. {saes-2.0.0 → saes-2.1.0}/src/saes/stats/bayesian.py +0 -0
  93. {saes-2.0.0 → saes-2.1.0}/src/saes/stats/decision.py +0 -0
  94. {saes-2.0.0 → saes-2.1.0}/src/saes/stats/effect_sizes.py +0 -0
  95. {saes-2.0.0 → saes-2.1.0}/src/saes/stats/explorer.py +0 -0
  96. {saes-2.0.0 → saes-2.1.0}/src/saes/stats/nonparametric.py +0 -0
  97. {saes-2.0.0 → saes-2.1.0}/src/saes/stats/posthoc.py +0 -0
  98. {saes-2.0.0 → saes-2.1.0}/src/saes/stats/power.py +0 -0
  99. {saes-2.0.0 → saes-2.1.0}/src/saes/stats/profiles.py +0 -0
  100. {saes-2.0.0 → saes-2.1.0}/src/saes/stats/ranking.py +0 -0
  101. {saes-2.0.0 → saes-2.1.0}/src/saes/stats/tables.py +0 -0
  102. {saes-2.0.0 → saes-2.1.0}/src/saes/stats/ttest.py +0 -0
  103. {saes-2.0.0 → saes-2.1.0}/src/saes/validation/__init__.py +0 -0
  104. {saes-2.0.0 → saes-2.1.0}/src/saes/validation/validator.py +0 -0
  105. {saes-2.0.0 → saes-2.1.0}/src/saes/visualization/__init__.py +0 -0
  106. {saes-2.0.0 → saes-2.1.0}/src/saes/visualization/barplot.py +0 -0
  107. {saes-2.0.0 → saes-2.1.0}/src/saes/visualization/base.py +0 -0
  108. {saes-2.0.0 → saes-2.1.0}/src/saes/visualization/bayesianplot.py +0 -0
  109. {saes-2.0.0 → saes-2.1.0}/src/saes/visualization/boxplot.py +0 -0
  110. {saes-2.0.0 → saes-2.1.0}/src/saes/visualization/cdplot.py +0 -0
  111. {saes-2.0.0 → saes-2.1.0}/src/saes/visualization/ecdfplot.py +0 -0
  112. {saes-2.0.0 → saes-2.1.0}/src/saes/visualization/forest_plot.py +0 -0
  113. {saes-2.0.0 → saes-2.1.0}/src/saes/visualization/lineplot.py +0 -0
  114. {saes-2.0.0 → saes-2.1.0}/src/saes/visualization/plackett_luce_plot.py +0 -0
  115. {saes-2.0.0 → saes-2.1.0}/src/saes/visualization/scatterplot.py +0 -0
  116. {saes-2.0.0 → saes-2.1.0}/src/saes/visualization/utils.py +0 -0
  117. {saes-2.0.0 → saes-2.1.0}/src/saes/visualization/violinplot.py +0 -0
  118. {saes-2.0.0 → saes-2.1.0}/tests/__init__.py +0 -0
  119. {saes-2.0.0 → saes-2.1.0}/tests/fixtures/data.csv +0 -0
  120. {saes-2.0.0 → saes-2.1.0}/tests/fixtures/ml_data.csv +0 -0
  121. {saes-2.0.0 → saes-2.1.0}/tests/integration/test_pipeline.py +0 -0
  122. {saes-2.0.0 → saes-2.1.0}/tests/integration/test_real_dataset.py +0 -0
  123. {saes-2.0.0 → saes-2.1.0}/tests/statistical/test_reference_validation.py +0 -0
  124. {saes-2.0.0 → saes-2.1.0}/tests/statistical/test_stats_correctness.py +0 -0
  125. {saes-2.0.0 → saes-2.1.0}/tests/unit/test_datasets_api.py +0 -0
  126. {saes-2.0.0 → saes-2.1.0}/tests/unit/test_io.py +0 -0
  127. {saes-2.0.0 → saes-2.1.0}/tests/unit/test_plugins_sync.py +0 -0
  128. {saes-2.0.0 → saes-2.1.0}/tests/unit/test_scientific_features.py +0 -0
  129. {saes-2.0.0 → saes-2.1.0}/tests/unit/test_server.py +0 -0
  130. {saes-2.0.0 → saes-2.1.0}/tests/unit/test_validation.py +0 -0
  131. {saes-2.0.0 → saes-2.1.0}/tests/unit/test_visualization.py +0 -0
@@ -0,0 +1,2 @@
1
+ # Default repository maintainers required to approve pull requests targeting main.
2
+ * @rorro6787 @ajnebro
@@ -28,10 +28,17 @@ jobs:
28
28
  version: ${{ steps.commit.outputs.version }}
29
29
 
30
30
  steps:
31
+ - name: Generate Release App token
32
+ id: app-token
33
+ uses: actions/create-github-app-token@v1
34
+ with:
35
+ app-id: ${{ secrets.RELEASE_APP_ID }}
36
+ private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
37
+
31
38
  - name: Checkout repository
32
39
  uses: actions/checkout@v4
33
40
  with:
34
- token: ${{ secrets.GITHUB_TOKEN }}
41
+ token: ${{ steps.app-token.outputs.token }}
35
42
 
36
43
  - name: Set up Node.js
37
44
  uses: actions/setup-node@v4
@@ -99,7 +106,7 @@ jobs:
99
106
 
100
107
  - name: Create GitHub Release from CHANGELOG.md
101
108
  env:
102
- GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
109
+ GH_TOKEN: ${{ steps.app-token.outputs.token }}
103
110
  VERSION: ${{ steps.commit.outputs.version }}
104
111
  run: |
105
112
  python3 - <<'EOF'
@@ -9,10 +9,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9
9
 
10
10
  ## [Released]
11
11
 
12
+ ## [2.1.0] — 2026-11-27 (@rorro6787)
13
+
14
+ ### Added
15
+
16
+ - PEP-standard Python plugin discovery and domain extension architecture (`saes.plugins`, exported as `saes.PluginManifest`, `saes.SAESPlugin`, `saes.PluginRegistry`, and `saes.plugins`): automatically discovers built-in and external packages via `importlib.metadata.entry_points` across four groups (`saes.tests`, `saes.renderers`, `saes.plotters`, `saes.plugins`) with graceful fault isolation.
17
+ - Built-in reference domain plugin **`saes.plugins.pareto`** (`ParetoPlugin`, registered via `[project.entry-points."saes.plugins"]`):
18
+ - Multi-objective Pareto front domain models (`ParetoFront`, `FrontCollection`), vectorized non-dominated filtering, set coverage matrix $C(A, B)$, and representative run selection (best / median / worst / accumulated front).
19
+ - Exact 2D Empirical Attainment Functions (EAF), attainment surfaces (0%, 25%, 50%, 75%, 100%), pairwise $\Delta\text{EAF}(z)$ spatial advantage surfaces, and deterministic KS-EAF Monte Carlo permutation hypothesis tests.
20
+ - Multi-objective quality indicators (`HV` exact 2D & 3D, `IGD`, `IGD+`, `GD`, `EPS`, `Spacing`) with direct bridge `FrontCollection.to_indicators_dataset() -> saes.Dataset`.
21
+ - Flexible I/O (tidy CSV, `.pf` reference fronts, jMetal/PlatEMO `FUN.*.tsv` trees, ZIP archives, built-in ZDT1–3 & DTLZ2 demo suite), 7 dual Matplotlib/Plotly visualization modes (`attainment`, `runs`, `representative`, `eaf-diff`, `small-multiples`, `3d`, `pcp`) with full publication styling parity (`title`, `title_mode`, `legend_placement`, `font_size`, `font_family`, `label_mode`, `bold_mode`, `show_grid`, `dark_theme`, `width_px`, `height_px`), reference-only plotting (`algorithms=[]`, `show_reference=True`), non-overlapping legends & colorbars, and FastAPI routes auto-mounted under `/api/v1/plugins/pareto`.
22
+ - Lazy entry-point discovery integrated into `TestRegistry`, `TableRendererRegistry`, and `PlotterRegistry`.
23
+ - REST plugin discovery endpoint `GET /api/v1/plugins` (`PluginRegistryResponse`) and automatic mounting of plugin-provided FastAPI `APIRouter` instances under `/api/v1/plugins/<plugin_id>` in `saes.server.app.create_app()`.
24
+ - Expanded `docs/extensibility.md` and added dedicated GitHub Pages guide `docs/user-guide/pareto-plugin.md` covering multi-file, tidy CSV, `.pf`, and jMetal ZIP input formats, exact EAF/KS-EAF methodology, and REST endpoints (including `POST /api/v1/plugins/pareto/collections/create-multi`).
25
+
12
26
  ## [2.0.0] — 2026-11-24 (@rorro6787)
13
27
 
14
28
  ### Added
15
29
 
30
+
31
+ - Updated `.github/workflows/release.yml` to authenticate release stamp pushes and GitHub Releases via the `saes-release-bot` GitHub App (`actions/create-github-app-token@v1`) so protected `main` rulesets remain enforced.
16
32
  - Exact confidence intervals on all parametric and non-parametric effect sizes (`saes.stats.effect_sizes`): noncentral-$t$ CIs for Cohen's $d$ / Hedges' $g$ (`cohens_d_ci`), noncentral-$F$ CIs for ANOVA $\eta^2$ (`eta_squared_ci`), Brunner–Munzel logit-transformed CIs for Vargha–Delaney $A_{12}$ and Cliff's $\delta$ (`vargha_delaney_a12_ci`, `cliffs_delta_ci`), and percentile bootstrap CIs for Kruskal–Wallis $\varepsilon^2$ (`epsilon_squared_ci`), automatically populated on every `StatisticalResult.effect_size`.
17
33
  - Comprehensive multiple-comparison adjustments and post-hoc test suite (`saes.stats.posthoc`): extended `adjust_pvalues` to 11 procedures (`holm`, `bonferroni`, `hochberg`, `hommel`, `finner`, `holland`, `rom`, `li`, `fdr_bh`, `fdr_by`, `none`), added Shaffer's static (`adjust_pvalues_shaffer`) and exact Bergmann–Hommel exhaustive (`adjust_pvalues_bergmann_hommel`) matrix procedures, plus `tukey_hsd`, `games_howell`, `dunnett`, `dunn`, `conover_iman`, and `BrunnerMunzelTest` (`saes.statistics.brunner_munzel`).
18
34
  - Blocked multi-instance omnibus tests (`saes.stats.ranking`): `FriedmanAlignedRanksTest` (`saes.statistics.friedman_aligned_ranks`), `QuadeTest` (`saes.statistics.quade`), and `RepeatedMeasuresANOVA` with Greenhouse–Geisser sphericity $\varepsilon$ (`saes.statistics.rm_anova`).
@@ -103,4 +119,3 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
103
119
  - Decoupled and extracted `chat`, `mcp`, and `plugins` into the dedicated `saes-ai` package.
104
120
  - `saes.server.app` now dynamically mounts `saes_ai.server.routes` when `saes-ai` is installed without internal legacy fallbacks.
105
121
  - Cleaned core dependencies by removing `chat` extra and delegating AI tooling to `[ai]` optional extra (`saes-ai`).
106
-
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: saes
3
- Version: 2.0.0
3
+ Version: 2.1.0
4
4
  Summary: Stochastic Algorithm Evaluation Suite - Scientific Python library for statistical benchmarking
5
5
  Project-URL: Homepage, https://github.com/saes-suite/saes
6
6
  Project-URL: Documentation, https://saes-suite.github.io/saes/
@@ -69,6 +69,12 @@ Every capability in the SAES ecosystem is exposed first as a strongly typed Pyth
69
69
  - `minimum_detectable_effect(n, target_power=0.80, alpha=0.05, paired=False) -> float`
70
70
  - `tost(x1, x2, low_eqbound, high_eqbound=None, alpha=0.05, paired=False, equal_var=False, ...) -> TOSTResult`
71
71
 
72
+ ### Extensibility & Python Plugins (`saes.plugins` / `saes.PluginRegistry`)
73
+ - `saes.plugins.discover(force=False) -> list[PluginManifest]` — Discover installed `entry_points` (`saes.tests`, `saes.renderers`, `saes.plotters`, `saes.plugins`).
74
+ - `saes.plugins.list_installed() -> list[PluginManifest]` — List active SAES domain plugins.
75
+ - `saes.plugins.get(plugin_id) -> SAESPlugin` / `saes.plugins.get_namespace(plugin_id) -> Any` — Access a plugin instance or its Python API namespace.
76
+ - `saes.plugins.register(plugin)` / `saes.plugins.unregister(plugin_id)` — Programmatic runtime registration.
77
+
72
78
  ---
73
79
 
74
80
  ## 3. Auto-Generated Module Documentation
@@ -0,0 +1,174 @@
1
+ # Extensibility & Python Plugins
2
+
3
+ SAES separates statistical computation, presentation rendering, visualization, and domain-specific extensions behind **four PEP-standard `importlib.metadata.entry_points` extension groups**, inspired by R's S3/S4 dispatch, `texreg` (Leifeld 2013), and the Python scientific plugin ecosystem (`pytest`, `mkdocs`, `napari`):
4
+
5
+ | Extension Mechanism | Runtime Registry | Python `entry_points` Group | Purpose |
6
+ | :--- | :--- | :--- | :--- |
7
+ | Hypothesis Tests | `saes.TestRegistry` | `"saes.tests"` | Register custom `saes.StatisticalTest` implementations |
8
+ | Table Renderers | `saes.TableRendererRegistry` | `"saes.renderers"` | Register custom `saes.TableRenderer` output formats (Typst, Org, journal templates) |
9
+ | Visualizations | `saes.PlotterRegistry` | `"saes.plotters"` | Register custom `Plotter` classes (requires `saes[viz]`) |
10
+ | **Domain Plugins** | **`saes.PluginRegistry` (`saes.plugins`)** | **`"saes.plugins"`** | Package domain-specific workflows (`saes.SAESPlugin`) with optional FastAPI routes auto-mounted under `/api/v1/plugins/<id>` |
11
+
12
+ > **Note:** SAES Python runtime plugins (built-in under `saes.plugins.*` or installed externally via `entry_points`) are distinct from the `saes-plugins` repository, which distributes Markdown `SKILL.md` guides for AI coding assistants.
13
+
14
+ ---
15
+
16
+ ## 1. Registering a Custom Statistical Test
17
+
18
+ Subclass `saes.StatisticalTest`, implement `run(groups, alpha=0.05) -> StatisticalResult`, and register it either at runtime or via `pyproject.toml`:
19
+
20
+ ```python
21
+ import numpy as np
22
+ from scipy import stats
23
+ import saes
24
+ from saes.domain.models import EffectSize, StatisticalResult
25
+
26
+
27
+ class PermutationMeanTest(saes.StatisticalTest):
28
+ """Exact/Monte-Carlo two-sample permutation test for difference in means."""
29
+
30
+ def run(self, groups: dict[str, np.ndarray], alpha: float = 0.05) -> StatisticalResult:
31
+ g1, g2 = list(groups.keys())[:2]
32
+ x1, x2 = groups[g1], groups[g2]
33
+ res = stats.permutation_test(
34
+ (x1, x2),
35
+ statistic=lambda a, b: np.mean(a) - np.mean(b),
36
+ n_resamples=2000,
37
+ random_state=42,
38
+ )
39
+ diff = float(res.statistic)
40
+ p_val = float(res.pvalue)
41
+ return StatisticalResult(
42
+ test_name="Two-Sample Permutation Test",
43
+ statistic=diff,
44
+ p_value=p_val,
45
+ degrees_of_freedom=float(len(x1) + len(x2) - 2),
46
+ alpha=alpha,
47
+ is_significant=p_val < alpha,
48
+ effect_size=EffectSize(name="Mean Difference", value=diff),
49
+ interpretation=f"Permutation test ({g1} vs {g2}): diff={diff:.4f}, p={p_val:.4e}.",
50
+ )
51
+
52
+
53
+ saes.TestRegistry.register("permutation_mean", PermutationMeanTest)
54
+
55
+ # Instantiate from the registry or pass directly into AnalysisPipeline(force_test=...)
56
+ test = saes.TestRegistry.get("permutation_mean")
57
+ result = test.run({"A": np.array([1.0, 2.0, 3.0]), "B": np.array([4.0, 5.0, 6.0])})
58
+ print(result.summary())
59
+ ```
60
+
61
+ To publish the test as an auto-discovered package, declare the entry point in `pyproject.toml`:
62
+
63
+ ```toml
64
+ [project.entry-points."saes.tests"]
65
+ permutation_mean = "my_pkg.tests:PermutationMeanTest"
66
+ ```
67
+
68
+ ---
69
+
70
+ ## 2. Registering a Custom Table Renderer (e.g., Typst)
71
+
72
+ Subclass `saes.TableRenderer` and register it in `saes.TableRendererRegistry` (or declare it under `[project.entry-points."saes.renderers"]`). Once registered, `saes.export_table(table, export_format="typst")` dispatches to it automatically:
73
+
74
+ ```python
75
+ import saes
76
+ from saes.domain.models import StatisticalTableResult
77
+
78
+
79
+ class TypstTableRenderer(saes.TableRenderer):
80
+ media_type = "text/plain"
81
+ extension = "typ"
82
+
83
+ def render(self, result: StatisticalTableResult, **kwargs: object) -> bytes:
84
+ cols = len(result.algorithms) + 1
85
+ header = ", ".join(f"[*{h}*]" for h in ["Instance", *result.algorithms])
86
+ body = []
87
+ for row in result.instance_rows:
88
+ vals = [f"[{row.instance}]"] + [
89
+ f"[{row.cells[alg].formatted}]" for alg in result.algorithms
90
+ ]
91
+ body.append(" " + ", ".join(vals) + ",")
92
+ typst = f"#table(\n columns: {cols},\n {header},\n" + "\n".join(body) + "\n)\n"
93
+ return typst.encode("utf-8")
94
+
95
+
96
+ saes.TableRendererRegistry.register("typst", TypstTableRenderer)
97
+
98
+ dataset = saes.load("datasets/swarmintelligence.csv")
99
+ table = saes.generate_table(dataset, metric="HV")
100
+ typst_bytes = saes.export_table(table, export_format="typst")
101
+ ```
102
+
103
+ ---
104
+
105
+ ## 3. Registering a Custom Plotter
106
+
107
+ With `saes[viz]` installed, subclass `saes.visualization.base.Plotter` and register it in `saes.PlotterRegistry` (or expose it under `[project.entry-points."saes.plotters"]`) so it becomes immediately available through `saes.plot(dataset, plot_type="my_plot")` and `saes.export_plot(...)`.
108
+
109
+ ---
110
+
111
+ ## 4. Authoring a Full Domain Plugin (`saes.SAESPlugin`)
112
+
113
+ Domain-specific data types (such as multi-objective Pareto fronts, anytime convergence trajectories, or ML cross-validation runners) can extend SAES **without adding dependencies or domain coupling to `saes` core** by implementing `saes.SAESPlugin`:
114
+
115
+ ```python
116
+ from saes import PluginManifest, SAESPlugin
117
+
118
+
119
+ class MyDomainPlugin(SAESPlugin):
120
+ @property
121
+ def manifest(self) -> PluginManifest:
122
+ return PluginManifest(
123
+ id="my_domain",
124
+ name="SAES My Domain",
125
+ version="0.1.0",
126
+ description="Domain-specific analytics bridging into canonical saes.Dataset workflows.",
127
+ capabilities=("custom_analytics",),
128
+ )
129
+
130
+ def get_api_router(self):
131
+ # Optional FastAPI APIRouter auto-mounted at /api/v1/plugins/my_domain
132
+ return None
133
+ ```
134
+
135
+ Register the package entry point in `pyproject.toml`:
136
+
137
+ ```toml
138
+ [project.entry-points."saes.plugins"]
139
+ my_domain = "my_domain_pkg.plugin:MyDomainPlugin"
140
+ ```
141
+
142
+ Once installed, `saes` discovers the plugin automatically:
143
+
144
+ ```python
145
+ import saes
146
+
147
+ print(saes.plugins.list_installed())
148
+ plugin_api = saes.plugins.get_namespace("my_domain")
149
+ ```
150
+
151
+ When running the optional REST server (`saes-api`), `GET /api/v1/plugins` advertises all discovered plugins and `create_app()` automatically mounts every plugin's optional `APIRouter` under `/api/v1/plugins/<plugin_id>`.
152
+
153
+ ### Built-in Reference Plugin: `saes.plugins.pareto`
154
+
155
+ > See the dedicated [Pareto Fronts & EAF User Guide](user-guide/pareto-plugin.md) for complete input dataset specifications (multi-file `FUN.*.tsv`, tidy CSV, `.pf` reference fronts, jMetal ZIP), mathematical definitions, and REST endpoints.
156
+
157
+ To dogfood the `SAESPlugin` protocol in a real scientific domain without coupling `saes.stats` or `Dataset` to multi-objective optimization, SAES ships **`saes.plugins.pareto`** registered via the exact same `[project.entry-points."saes.plugins"]` mechanism available to third-party packages:
158
+
159
+ - Loads multi-run Pareto fronts and reference fronts (tidy CSV, jMetal/PlatEMO `FUN.*.tsv` directories, `.pf` files, ZIP bundles).
160
+ - Computes exact 2D **Empirical Attainment Functions (EAF)**, median/IQR attainment surfaces, spatial $\Delta\text{EAF}$ difference surfaces, KS-EAF permutation hypothesis tests, and set coverage $C(A, B)$.
161
+ - Exports publication figures (PDF/SVG/PNG) and interactive Plotly charts (`attainment`, `runs`, `representative`, `eaf-diff`, `small-multiples`, `3d`, `pcp`).
162
+ - Bridges back to `saes` core via `fronts.to_indicators_dataset(indicators=["HV", "IGD+", "EPS"]) -> saes.Dataset`.
163
+
164
+ ```python
165
+ import saes
166
+ from saes.plugins import pareto
167
+
168
+ fronts = pareto.create_demo_collection(n_runs=12, seed=42)
169
+ diff = pareto.eaf_difference(fronts, instance="ZDT1", algo_a="NSGA-II", algo_b="MOEA/D")
170
+ print(diff.summary())
171
+
172
+ dataset = fronts.to_indicators_dataset(indicators=["HV", "IGD+", "EPS"])
173
+ print(saes.statistics.friedman_nemenyi(dataset, metric="IGD+").summary())
174
+ ```
@@ -65,6 +65,14 @@ Evaluating stochastic algorithms across multiple problem instances introduces we
65
65
 
66
66
  [:octicons-arrow-right-24: Visualizations & Tables](user-guide/visualization-and-tables.md)
67
67
 
68
+ - :material-puzzle-outline:{ .lg .middle } **PEP Plugin System & Built-in Pareto/EAF Analytics**
69
+
70
+ ---
71
+
72
+ Extend SAES via standard Python `entry_points` (`saes.plugins`), demonstrated by the built-in `saes.plugins.pareto` plugin (exact 2D EAFs, KS-EAF permutation tests, $C(A, B)$ coverage, and quality indicator extraction to `saes.Dataset`).
73
+
74
+ [:octicons-arrow-right-24: Pareto & EAF Guide](user-guide/pareto-plugin.md) · [:octicons-arrow-right-24: Plugins API](extensibility.md)
75
+
68
76
  </div>
69
77
 
70
78
  ## Installation
@@ -0,0 +1,225 @@
1
+ # Pareto Fronts & Empirical Attainment Functions (`saes.plugins.pareto`)
2
+
3
+ SAES ships a built-in domain plugin — **`saes.plugins.pareto`** — registered via the exact same PEP `importlib.metadata.entry_points` protocol (`saes.plugins`) available to third-party packages. It provides multi-objective Pareto front analytics, exact 2D **Empirical Attainment Functions (EAF)**, **KS-EAF permutation testing**, set coverage $C(A, B)$, and a seamless bridge that converts raw approximation fronts into canonical 6-column **`saes.Dataset`** tables.
4
+
5
+ ```mermaid
6
+ flowchart LR
7
+ RAW["Raw Pareto Fronts<br/>Multi-file FUN.*.tsv · Tidy CSV · jMetal ZIP · .pf Reference"] --> FC["FrontCollection<br/>saes.plugins.pareto"]
8
+ FC --> EAF["Exact 2D EAF & Attainment Surfaces<br/>50% Median · 25–75% IQR · ΔEAF · KS-EAF Test"]
9
+ FC --> COV["Coverage C(A, B) &<br/>Representative Runs (Best / Med / Worst)"]
10
+ FC --> IND["Quality Indicators<br/>HV (2D/3D) · IGD+ · IGD · EPS · GD · Spacing"]
11
+ IND -->|to_indicators_dataset| DS["Canonical saes.Dataset<br/>Friedman · Bayesian · TOST · LaTeX"]
12
+ ```
13
+
14
+ ---
15
+
16
+ ## 1. Input Dataset Formats
17
+
18
+ Unlike core SAES scalar benchmarks (6 fixed columns: `algorithm, instance, metric, run_id, value, maximize`), a **Pareto Front Study** stores collections of $m$-dimensional objective vectors ($m \ge 2$) across independent runs, algorithms, and problem instances, optionally paired with a **Reference Pareto Front** per instance.
19
+
20
+ === "Tidy Multi-Run CSV"
21
+
22
+ Store all runs, algorithms, and instances in a single long-format CSV file.
23
+
24
+ - **Required**: `algorithm` plus **2 or more numeric objective columns** (e.g., `f1, f2` or `f1, f2, f3`).
25
+ - **Optional**: `instance` (defaults to `"Problem"`), `run_id` (or `run` / `iteration`, defaults to `0`).
26
+ - **Reference Fronts**: rows with `algorithm` equal to `Reference`, `PF`, or `TrueFront` are automatically promoted to `reference_fronts[instance]`, or you can pass an external `.pf` / `.csv` file via `reference_front=...`.
27
+
28
+ ```csv
29
+ algorithm,instance,run_id,f1,f2
30
+ NSGA-II,ZDT1,0,0.05,0.82
31
+ NSGA-II,ZDT1,0,0.25,0.54
32
+ NSGA-II,ZDT1,1,0.08,0.79
33
+ MOEA/D,ZDT1,0,0.02,0.88
34
+ MOEA/D,ZDT1,1,0.04,0.84
35
+ Reference,ZDT1,0,0.00,1.00
36
+ Reference,ZDT1,0,0.25,0.50
37
+ Reference,ZDT1,0,1.00,0.00
38
+ ```
39
+
40
+ ```python
41
+ from saes.plugins import pareto
42
+
43
+ fronts = pareto.load_csv("fronts.csv", reference_front="ZDT1.pf")
44
+ ```
45
+
46
+ === "jMetal / PlatEMO Directory Tree"
47
+
48
+ Point SAES directly at a standard multi-objective experiment folder (or upload it as a `.zip` archive in the REST API / UI):
49
+
50
+ ```text
51
+ experiment/
52
+ ├── NSGA-II/
53
+ │ └── ZDT1/
54
+ │ ├── FUN.0.tsv
55
+ │ ├── FUN.1.tsv
56
+ │ └── ...
57
+ ├── MOEAD/
58
+ │ └── ZDT1/
59
+ │ ├── FUN.0.tsv
60
+ │ └── ...
61
+ └── reference_fronts/
62
+ └── ZDT1.pf
63
+ ```
64
+
65
+ Each `FUN.<run>.tsv` / `.csv` / `.txt` and `.pf` file contains $m \ge 2$ numeric columns delimited by tabs, spaces, or commas (optional header row auto-detected).
66
+
67
+ ```python
68
+ from saes.plugins import pareto
69
+
70
+ fronts = pareto.load_directory("experiment/", reference_dir="experiment/reference_fronts/")
71
+ # Or from a ZIP archive:
72
+ fronts = pareto.load_zip("experiment.zip")
73
+ ```
74
+
75
+ === "In-Memory NumPy Arrays"
76
+
77
+ Integrate directly with `jMetalPy`, `pymoo`, or `DEAP` without writing intermediate files:
78
+
79
+ ```python
80
+ import numpy as np
81
+ from saes.plugins import pareto
82
+
83
+ fronts = pareto.FrontCollection.from_arrays(
84
+ {
85
+ "NSGA-II": [run0_arr, run1_arr, run2_arr],
86
+ "MOEA/D": [moead0_arr, moead1_arr, moead2_arr],
87
+ },
88
+ instance="ZDT1",
89
+ reference_front=true_pf_arr,
90
+ objective_names=("f1", "f2"),
91
+ minimize=(True, True),
92
+ )
93
+ ```
94
+
95
+ !!! tip "Non-dominated filtering & mixed objective directions"
96
+ Full populations (including dominated points) are accepted safely — `filter_nondominated()` removes dominated and duplicate solutions using an exact $O(N \log N)$ sweep in 2D and exact vectorized checks for $m \ge 3$. Maximization objectives are supported via `minimize=(False, True, ...)`.
97
+
98
+ ---
99
+
100
+ ## 2. Statistical Methodology
101
+
102
+ ### Empirical Attainment Functions (EAF) & Attainment Surfaces
103
+
104
+ Given $n$ independent non-dominated approximation sets $A_1, \dots, A_n \subset \mathbb{R}^2$ (in minimization space), the **Empirical Attainment Function** (Grunert da Fonseca et al., 2001; López-Ibáñez et al., 2010) generalizes the univariate ECDF to multi-objective sets:
105
+
106
+ $$
107
+ \hat{\alpha}_n(z) = \frac{1}{n} \sum_{r=1}^{n} \mathbb{I}(A_r \preceq z)
108
+ $$
109
+
110
+ where $A_r \preceq z$ denotes that at least one objective vector $a \in A_r$ weakly dominates $z$.
111
+
112
+ - **0 % (Best attainment surface, $k=1$)**: boundary attained by at least 1 run (the accumulated non-dominated union).
113
+ - **25 % – 75 % (Interquartile attainment band)**: multi-objective analog of a boxplot IQR, summarizing stochastic variability across runs without overplotting.
114
+ - **50 % (Median attainment surface, $k = \lceil 0.5 n \rceil$)**: the typical front achieved in at least half of all independent runs.
115
+ - **100 % (Worst attainment surface, $k=n$)**: region guaranteed to be attained in every single run.
116
+
117
+ ### Spatial EAF Differences ($\Delta\text{EAF}$) & KS-EAF Permutation Test
118
+
119
+ To compare two stochastic optimizers $A$ ($n_A$ runs) and $B$ ($n_B$ runs) across objective space, SAES computes:
120
+
121
+ $$
122
+ \Delta\text{EAF}(z) = \hat{\alpha}_A(z) - \hat{\alpha}_B(z) \in [-1, 1]
123
+ $$
124
+
125
+ Positive regions ($\Delta\text{EAF}(z) > 0$) indicate objective regions attained more frequently by $A$; negative regions favor $B$. Formal hypothesis testing ($H_0: F_A = F_B$) uses the two-sample Kolmogorov–Smirnov EAF statistic (Fonseca et al., 2005):
126
+
127
+ $$
128
+ T_{\text{obs}} = \sup_{z} \left| \hat{\alpha}_A(z) - \hat{\alpha}_B(z) \right|
129
+ $$
130
+
131
+ evaluated via deterministic Monte Carlo permutations ($B$ shuffles of run labels with fixed `seed`) using the exact Phipson–Smyth estimator $p = \frac{1 + \#\{b : T_b \ge T_{\text{obs}}\}}{B + 1}$.
132
+
133
+ ### Set Coverage $C(A, B)$ & Quality Indicators
134
+
135
+ - **Set Coverage** (Zitzler & Thiele, 1999): $C(A, B) = \frac{|\{b \in B \mid \exists a \in A : a \preceq b\}|}{|B|} \in [0, 1]$, aggregated across all pairwise run combinations $(A_i, B_j)$.
136
+ - **Hypervolume (`HV`)**: exact $O(N \log N)$ sweep for $m=2$, exact $z$-slice decomposition for $m=3$, and deterministic Monte Carlo for $m \ge 4$ (higher is better).
137
+ - **Pareto-compliant `IGD+`** (Ishibuchi et al., 2015), classical `IGD`, `GD`, unary **Additive $\varepsilon$-indicator (`EPS`)**, and Schott's **`Spacing`** (lower is better).
138
+
139
+ ---
140
+
141
+ ## 3. End-to-End Python Walkthrough
142
+
143
+ ```python
144
+ import saes
145
+ from saes.plugins import pareto
146
+
147
+ # 1. Verify automatic PEP entry-point discovery
148
+ assert saes.plugins.is_installed("pareto")
149
+
150
+ # 2. Load the built-in multi-objective benchmark demo (ZDT1, ZDT2, ZDT3, 3D DTLZ2)
151
+ fronts = pareto.create_demo_collection(n_runs=12, seed=42)
152
+
153
+ # 3. Exact 2D Attainment Surfaces (25%, 50% median, 75%)
154
+ att = pareto.attainment(fronts, instance="ZDT1", levels=(0.25, 0.50, 0.75))
155
+ print(att.summary())
156
+
157
+ # 4. Pairwise EAF Difference & KS-EAF permutation test
158
+ diff = pareto.eaf_difference(
159
+ fronts,
160
+ instance="ZDT1",
161
+ algo_a="NSGA-II",
162
+ algo_b="MOEA/D",
163
+ n_permutations=500,
164
+ seed=42,
165
+ )
166
+ print(diff.summary())
167
+
168
+ # 5. Coverage C(A, B) & Best/Median/Worst Representative Runs
169
+ cov = pareto.coverage(fronts, instance="ZDT1")
170
+ print(cov.summary())
171
+
172
+ # 6. Publication-grade Matplotlib (PDF/SVG/PNG) & interactive Plotly figures
173
+ # Modes: 'attainment', 'runs', 'representative', 'eaf-diff', 'small-multiples', '3d', 'pcp'
174
+ # Full ChartWorkbench styling parity (title/legend/font/labels/bold/grid/dark_theme/width_px/height_px)
175
+ # and reference-only rendering (algorithms=[], show_reference=True).
176
+ pdf_bytes, _, _ = pareto.export_plot(
177
+ fronts,
178
+ instance="ZDT1",
179
+ mode="attainment",
180
+ algorithms=["NSGA-II", "MOEA/D"],
181
+ show_reference=True,
182
+ legend_placement="top",
183
+ title_mode="full",
184
+ font_size=13,
185
+ font_family="Times New Roman, Times, serif",
186
+ label_mode="all",
187
+ bold_mode="title-axes",
188
+ show_grid=True,
189
+ paper_format="golden",
190
+ palette="academic",
191
+ export_format="pdf",
192
+ )
193
+
194
+ # 7. Seamless bridge to Core SAES statistical suite (Friedman, Bayesian, TOST, LaTeX)
195
+ dataset = fronts.to_indicators_dataset(indicators=["HV", "IGD+", "IGD", "EPS", "Spacing"])
196
+ assert saes.validate(dataset).is_valid
197
+ cd = saes.statistics.friedman_nemenyi(dataset, metric="IGD+")
198
+ print(cd.summary())
199
+ ```
200
+
201
+ ---
202
+
203
+ ## 4. Visualization Modes & REST API
204
+
205
+ All 7 visualization modes share SAES's `PAPER_FORMAT_PRESETS` (`single-col`, `golden`, `double-col`, `square`, `compact`) and scientific palettes (`academic`, `nature`, `colorblind`, `viridis`, `set2`):
206
+
207
+ | Mode | Objectives | Description |
208
+ | :--- | :---: | :--- |
209
+ | `attainment` | 2D | Reference front + 50 % median attainment surface + 25 %–75 % IQR shaded band (+ optional 0 %/100 % envelopes) |
210
+ | `runs` | 2D | Overlay individual approximation fronts of 1 or multiple algorithms with adjustable opacity |
211
+ | `representative` | 2D | Faint background runs + bold best, median & worst run (ranked by IGD+) + accumulated ND union |
212
+ | `eaf-diff` | 2D | Mirrored two-panel $\Delta\text{EAF}(A - B)$ spatial dominance heatmaps + KS-EAF permutation $p$-value |
213
+ | `small-multiples` | 2D | Clean per-algorithm facet grid with shared axes and reference front |
214
+ | `3d` | $\ge 3$D | Interactive 3D scatter projection (Plotly) / static 3D Axes export (Matplotlib) |
215
+ | `pcp` | $\ge 2$D | Normalized Parallel Coordinates Plot relative to ideal/nadir bounds (ideal for Many-Objective) |
216
+
217
+ When running `saes-api` (`:8060`), `saes.plugins.pareto` is auto-mounted at **`/api/v1/plugins/pareto`**:
218
+
219
+ - `GET /api/v1/plugins` — Advertises active plugins (triggers the **Benchmarks | Pareto & EAF** mode switcher in `saes-ui`).
220
+ - `POST /api/v1/plugins/pareto/collections/create-multi` — Guided multi-file uploader (multiple `FUN.*` run files per algorithm + optional `.pf` reference front).
221
+ - `POST /api/v1/plugins/pareto/collections/upload` — Tidy CSV or jMetal/PlatEMO ZIP upload.
222
+ - `POST /api/v1/plugins/pareto/collections/demo` — Generates the bundled ZDT1–3 & DTLZ2 demo suite.
223
+ - `POST /api/v1/plugins/pareto/collections/{name}/plot` & `/export-plot` — Interactive Plotly JSON and 300-DPI PNG / vector SVG / PDF exports.
224
+ - `POST /api/v1/plugins/pareto/collections/{name}/attainment`, `/eaf-diff`, `/coverage` — Typed JSON statistical endpoints.
225
+ - `POST /api/v1/plugins/pareto/collections/{name}/to-dataset` — Persists computed quality indicators directly into SAES dataset storage for immediate analysis in Core SAES.
@@ -124,6 +124,7 @@ nav:
124
124
  - Blocked Omnibus & Post-Hoc Tests: user-guide/blocked-and-posthoc.md
125
125
  - Bayesian Inference, MDES & TOST: user-guide/bayesian-and-equivalence.md
126
126
  - Visualization, Tables & FAIR Packs: user-guide/visualization-and-tables.md
127
+ - Pareto Fronts & EAF Plugin: user-guide/pareto-plugin.md
127
128
  - Tutorials:
128
129
  - Multi-Objective Metaheuristics Benchmark: tutorials/metaheuristics-benchmark.md
129
130
  - ML Cross-Validation & Equivalence: tutorials/ml-crossvalidation.md
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "saes"
7
- version = "2.0.0"
7
+ version = "2.1.0"
8
8
  description = "Stochastic Algorithm Evaluation Suite - Scientific Python library for statistical benchmarking"
9
9
  readme = "README.md"
10
10
  license = { text = "GPL-3.0-or-later" }
@@ -92,6 +92,9 @@ all = [
92
92
  [project.scripts]
93
93
  saes-api = "saes.server.app:main"
94
94
 
95
+ [project.entry-points."saes.plugins"]
96
+ pareto = "saes.plugins.pareto.plugin:ParetoPlugin"
97
+
95
98
  [tool.hatch.build.targets.wheel]
96
99
  packages = ["src/saes"]
97
100
 
@@ -2,6 +2,7 @@
2
2
 
3
3
  from typing import Any
4
4
 
5
+ import saes.plugins as plugins
5
6
  from saes._version import __version__ as __version__
6
7
  from saes.api import (
7
8
  analyze,
@@ -64,6 +65,7 @@ from saes.domain.models import (
64
65
  ValidationReport,
65
66
  WinTieLossCell,
66
67
  )
68
+ from saes.plugins.registry import PluginManifest, PluginRegistry, SAESPlugin
67
69
  from saes.reports.renderers import TableRenderer, TableRendererRegistry
68
70
  from saes.stats.base import StatisticalTest
69
71
  from saes.stats.registry import TestRegistry
@@ -112,6 +114,10 @@ __all__ = [
112
114
  "TableRenderer",
113
115
  "TableRendererRegistry",
114
116
  "PlotterRegistry",
117
+ "PluginManifest",
118
+ "SAESPlugin",
119
+ "PluginRegistry",
120
+ "plugins",
115
121
  "SAESError",
116
122
  "InputError",
117
123
  "ValidationError",
@@ -0,0 +1,54 @@
1
+ """SAES Python plugin system and built-in reference plugins (e.g. ``saes.plugins.pareto``).
2
+
3
+ Exposes the PEP ``importlib.metadata.entry_points`` plugin discovery API directly on the
4
+ ``saes.plugins`` package namespace so both ``saes.plugins.list_installed()`` and
5
+ ``from saes.plugins import pareto`` work seamlessly without module shadowing.
6
+ """
7
+
8
+ from __future__ import annotations
9
+
10
+ from saes.plugins.registry import (
11
+ ENTRYPOINT_PLOTTERS,
12
+ ENTRYPOINT_PLUGINS,
13
+ ENTRYPOINT_RENDERERS,
14
+ ENTRYPOINT_TESTS,
15
+ PluginManifest,
16
+ PluginRegistry,
17
+ SAESPlugin,
18
+ )
19
+
20
+ # Ergonomic package-level shortcuts delegating to PluginRegistry
21
+ register = PluginRegistry.register
22
+ unregister = PluginRegistry.unregister
23
+ reset = PluginRegistry.reset
24
+ discover = PluginRegistry.discover
25
+ discover_tests = PluginRegistry.discover_tests
26
+ discover_renderers = PluginRegistry.discover_renderers
27
+ discover_plotters = PluginRegistry.discover_plotters
28
+ list_installed = PluginRegistry.list_installed
29
+ is_installed = PluginRegistry.is_installed
30
+ get = PluginRegistry.get
31
+ get_namespace = PluginRegistry.get_namespace
32
+ mount_api_routers = PluginRegistry.mount_api_routers
33
+
34
+ __all__ = [
35
+ "ENTRYPOINT_PLUGINS",
36
+ "ENTRYPOINT_TESTS",
37
+ "ENTRYPOINT_RENDERERS",
38
+ "ENTRYPOINT_PLOTTERS",
39
+ "PluginManifest",
40
+ "SAESPlugin",
41
+ "PluginRegistry",
42
+ "register",
43
+ "unregister",
44
+ "reset",
45
+ "discover",
46
+ "discover_tests",
47
+ "discover_renderers",
48
+ "discover_plotters",
49
+ "list_installed",
50
+ "is_installed",
51
+ "get",
52
+ "get_namespace",
53
+ "mount_api_routers",
54
+ ]