polyclustx 1.4.1__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.
- polyclustx-1.4.1/.readthedocs.yaml +17 -0
- polyclustx-1.4.1/LICENSE +133 -0
- polyclustx-1.4.1/MANIFEST.in +9 -0
- polyclustx-1.4.1/Makefile +119 -0
- polyclustx-1.4.1/PKG-INFO +427 -0
- polyclustx-1.4.1/README.md +373 -0
- polyclustx-1.4.1/docs/Makefile +23 -0
- polyclustx-1.4.1/docs/_ext/polyclustx_catalog.py +114 -0
- polyclustx-1.4.1/docs/_static/custom.css +36 -0
- polyclustx-1.4.1/docs/_templates/affiliations.html +13 -0
- polyclustx-1.4.1/docs/_templates/layout.html +10 -0
- polyclustx-1.4.1/docs/api/cli.rst +178 -0
- polyclustx-1.4.1/docs/api/core.rst +10 -0
- polyclustx-1.4.1/docs/api/data.rst +43 -0
- polyclustx-1.4.1/docs/api/display.rst +35 -0
- polyclustx-1.4.1/docs/api/experiment.rst +59 -0
- polyclustx-1.4.1/docs/api/metrics.rst +12 -0
- polyclustx-1.4.1/docs/api/models.rst +67 -0
- polyclustx-1.4.1/docs/api/preprocessing.rst +16 -0
- polyclustx-1.4.1/docs/api/visualization.rst +10 -0
- polyclustx-1.4.1/docs/background/algorithms.md +172 -0
- polyclustx-1.4.1/docs/catalog/datasets.rst +67 -0
- polyclustx-1.4.1/docs/catalog/models.rst +8 -0
- polyclustx-1.4.1/docs/conf.py +73 -0
- polyclustx-1.4.1/docs/contributing/datasets.md +109 -0
- polyclustx-1.4.1/docs/contributing/models.md +97 -0
- polyclustx-1.4.1/docs/index.rst +82 -0
- polyclustx-1.4.1/docs/make.bat +31 -0
- polyclustx-1.4.1/docs/requirements.txt +12 -0
- polyclustx-1.4.1/docs/user_guide/clustering_models.md +373 -0
- polyclustx-1.4.1/docs/user_guide/data.md +205 -0
- polyclustx-1.4.1/docs/user_guide/examples.rst +261 -0
- polyclustx-1.4.1/docs/user_guide/experiments.md +229 -0
- polyclustx-1.4.1/docs/user_guide/graphs.md +119 -0
- polyclustx-1.4.1/docs/user_guide/installation.rst +89 -0
- polyclustx-1.4.1/docs/user_guide/missing_views.md +81 -0
- polyclustx-1.4.1/docs/user_guide/quickstart.rst +118 -0
- polyclustx-1.4.1/docs/user_guide/workbench.md +273 -0
- polyclustx-1.4.1/examples/experiment_plan.yaml +27 -0
- polyclustx-1.4.1/notebooks/00_quickstart.ipynb +157 -0
- polyclustx-1.4.1/notebooks/01_data_and_preprocessing.ipynb +196 -0
- polyclustx-1.4.1/notebooks/02_lmgec_baseline.ipynb +176 -0
- polyclustx-1.4.1/notebooks/03_experiments_and_tuning.ipynb +213 -0
- polyclustx-1.4.1/notebooks/04_all_methods_comparison.ipynb +226 -0
- polyclustx-1.4.1/notebooks/05_search_strategies.ipynb +155 -0
- polyclustx-1.4.1/notebooks/06_polyclustx_feature_to_graph_study.ipynb +303 -0
- polyclustx-1.4.1/pyproject.toml +128 -0
- polyclustx-1.4.1/scripts/deploy_docs.py +37 -0
- polyclustx-1.4.1/setup.cfg +4 -0
- polyclustx-1.4.1/src/polyclustx/__init__.py +15 -0
- polyclustx-1.4.1/src/polyclustx/__main__.py +6 -0
- polyclustx-1.4.1/src/polyclustx/brand.py +31 -0
- polyclustx-1.4.1/src/polyclustx/cli.py +622 -0
- polyclustx-1.4.1/src/polyclustx/command.py +251 -0
- polyclustx-1.4.1/src/polyclustx/command_experiments.py +187 -0
- polyclustx-1.4.1/src/polyclustx/config.py +303 -0
- polyclustx-1.4.1/src/polyclustx/configs/default.yaml +29 -0
- polyclustx-1.4.1/src/polyclustx/configs/experiment.yaml +27 -0
- polyclustx-1.4.1/src/polyclustx/configs/minimal.yaml +7 -0
- polyclustx-1.4.1/src/polyclustx/configs/random_search.yaml +32 -0
- polyclustx-1.4.1/src/polyclustx/core/__init__.py +3 -0
- polyclustx-1.4.1/src/polyclustx/core/base_model.py +52 -0
- polyclustx-1.4.1/src/polyclustx/data/__init__.py +66 -0
- polyclustx-1.4.1/src/polyclustx/data/base.py +21 -0
- polyclustx-1.4.1/src/polyclustx/data/dataset.py +180 -0
- polyclustx-1.4.1/src/polyclustx/data/downloader.py +89 -0
- polyclustx-1.4.1/src/polyclustx/data/graphs.py +31 -0
- polyclustx-1.4.1/src/polyclustx/data/importers.py +281 -0
- polyclustx-1.4.1/src/polyclustx/data/missing.py +132 -0
- polyclustx-1.4.1/src/polyclustx/data/readers.py +95 -0
- polyclustx-1.4.1/src/polyclustx/data/registry.py +412 -0
- polyclustx-1.4.1/src/polyclustx/display/__init__.py +41 -0
- polyclustx-1.4.1/src/polyclustx/display/__main__.py +4 -0
- polyclustx-1.4.1/src/polyclustx/display/app.py +1640 -0
- polyclustx-1.4.1/src/polyclustx/display/artifacts.py +33 -0
- polyclustx-1.4.1/src/polyclustx/display/assets/borelli.png +0 -0
- polyclustx-1.4.1/src/polyclustx/display/assets/logo.png +0 -0
- polyclustx-1.4.1/src/polyclustx/display/assets/paris_cite.png +0 -0
- polyclustx-1.4.1/src/polyclustx/display/data_controls.py +67 -0
- polyclustx-1.4.1/src/polyclustx/display/exporting.py +75 -0
- polyclustx-1.4.1/src/polyclustx/display/graph_uploads.py +93 -0
- polyclustx-1.4.1/src/polyclustx/display/model_controls.py +205 -0
- polyclustx-1.4.1/src/polyclustx/display/preprocessing.py +106 -0
- polyclustx-1.4.1/src/polyclustx/display/profiles.py +162 -0
- polyclustx-1.4.1/src/polyclustx/display/projection.py +41 -0
- polyclustx-1.4.1/src/polyclustx/display/results.py +132 -0
- polyclustx-1.4.1/src/polyclustx/display/synthetic.py +173 -0
- polyclustx-1.4.1/src/polyclustx/display/theme.py +51 -0
- polyclustx-1.4.1/src/polyclustx/display/workspace.py +609 -0
- polyclustx-1.4.1/src/polyclustx/experiment/__init__.py +17 -0
- polyclustx-1.4.1/src/polyclustx/experiment/experiment.py +727 -0
- polyclustx-1.4.1/src/polyclustx/experiment/exports.py +205 -0
- polyclustx-1.4.1/src/polyclustx/experiment/grid_search.py +15 -0
- polyclustx-1.4.1/src/polyclustx/experiment/logger.py +145 -0
- polyclustx-1.4.1/src/polyclustx/experiment/markdown_export.py +519 -0
- polyclustx-1.4.1/src/polyclustx/experiment/optuna_search.py +94 -0
- polyclustx-1.4.1/src/polyclustx/experiment/random_search.py +576 -0
- polyclustx-1.4.1/src/polyclustx/experiment/result.py +570 -0
- polyclustx-1.4.1/src/polyclustx/metrics/__init__.py +21 -0
- polyclustx-1.4.1/src/polyclustx/metrics/clustering.py +535 -0
- polyclustx-1.4.1/src/polyclustx/metrics/evaluation.py +44 -0
- polyclustx-1.4.1/src/polyclustx/models/__init__.py +41 -0
- polyclustx-1.4.1/src/polyclustx/models/_common.py +148 -0
- polyclustx-1.4.1/src/polyclustx/models/_deep.py +67 -0
- polyclustx-1.4.1/src/polyclustx/models/_graphs.py +47 -0
- polyclustx-1.4.1/src/polyclustx/models/_torch_utils.py +37 -0
- polyclustx-1.4.1/src/polyclustx/models/completer/__init__.py +12 -0
- polyclustx-1.4.1/src/polyclustx/models/completer/completer.py +204 -0
- polyclustx-1.4.1/src/polyclustx/models/conan/__init__.py +12 -0
- polyclustx-1.4.1/src/polyclustx/models/conan/conan.py +137 -0
- polyclustx-1.4.1/src/polyclustx/models/dcp/__init__.py +12 -0
- polyclustx-1.4.1/src/polyclustx/models/dcp/dcp.py +31 -0
- polyclustx-1.4.1/src/polyclustx/models/dgf/__init__.py +12 -0
- polyclustx-1.4.1/src/polyclustx/models/dgf/dgf.py +205 -0
- polyclustx-1.4.1/src/polyclustx/models/g_comvkm/__init__.py +12 -0
- polyclustx-1.4.1/src/polyclustx/models/g_comvkm/g_comvkm.py +141 -0
- polyclustx-1.4.1/src/polyclustx/models/idec/__init__.py +12 -0
- polyclustx-1.4.1/src/polyclustx/models/idec/idec.py +147 -0
- polyclustx-1.4.1/src/polyclustx/models/lmgec/__init__.py +10 -0
- polyclustx-1.4.1/src/polyclustx/models/lmgec/lmgec.py +463 -0
- polyclustx-1.4.1/src/polyclustx/models/mflvc/__init__.py +12 -0
- polyclustx-1.4.1/src/polyclustx/models/mflvc/mflvc.py +191 -0
- polyclustx-1.4.1/src/polyclustx/models/multiview_kmeans/__init__.py +12 -0
- polyclustx-1.4.1/src/polyclustx/models/multiview_kmeans/multiview_kmeans.py +140 -0
- polyclustx-1.4.1/src/polyclustx/models/multiview_spectral/__init__.py +12 -0
- polyclustx-1.4.1/src/polyclustx/models/multiview_spectral/multiview_spectral.py +124 -0
- polyclustx-1.4.1/src/polyclustx/models/registry.py +167 -0
- polyclustx-1.4.1/src/polyclustx/models/scm/__init__.py +12 -0
- polyclustx-1.4.1/src/polyclustx/models/scm/scm.py +310 -0
- polyclustx-1.4.1/src/polyclustx/models/sgla/__init__.py +12 -0
- polyclustx-1.4.1/src/polyclustx/models/sgla/sgla.py +107 -0
- polyclustx-1.4.1/src/polyclustx/models/umc/__init__.py +12 -0
- polyclustx-1.4.1/src/polyclustx/models/umc/umc.py +191 -0
- polyclustx-1.4.1/src/polyclustx/preprocessing/__init__.py +10 -0
- polyclustx-1.4.1/src/polyclustx/preprocessing/features.py +382 -0
- polyclustx-1.4.1/src/polyclustx/preprocessing/fusion.py +42 -0
- polyclustx-1.4.1/src/polyclustx/preprocessing/graph_construction.py +0 -0
- polyclustx-1.4.1/src/polyclustx/progress.py +36 -0
- polyclustx-1.4.1/src/polyclustx/tracking.py +552 -0
- polyclustx-1.4.1/src/polyclustx/visualization/__init__.py +3 -0
- polyclustx-1.4.1/src/polyclustx/visualization/visualizer.py +309 -0
- polyclustx-1.4.1/src/polyclustx.egg-info/PKG-INFO +427 -0
- polyclustx-1.4.1/src/polyclustx.egg-info/SOURCES.txt +182 -0
- polyclustx-1.4.1/src/polyclustx.egg-info/dependency_links.txt +1 -0
- polyclustx-1.4.1/src/polyclustx.egg-info/entry_points.txt +16 -0
- polyclustx-1.4.1/src/polyclustx.egg-info/requires.txt +40 -0
- polyclustx-1.4.1/src/polyclustx.egg-info/top_level.txt +1 -0
- polyclustx-1.4.1/tests/__init__.py +0 -0
- polyclustx-1.4.1/tests/conftest.py +139 -0
- polyclustx-1.4.1/tests/helpers.py +21 -0
- polyclustx-1.4.1/tests/test_benchmark_datasets.py +84 -0
- polyclustx-1.4.1/tests/test_classical_multiview.py +106 -0
- polyclustx-1.4.1/tests/test_cli.py +149 -0
- polyclustx-1.4.1/tests/test_config.py +226 -0
- polyclustx-1.4.1/tests/test_contribution_examples.py +40 -0
- polyclustx-1.4.1/tests/test_data_contract.py +174 -0
- polyclustx-1.4.1/tests/test_dataloader.py +142 -0
- polyclustx-1.4.1/tests/test_dataset_variants.py +85 -0
- polyclustx-1.4.1/tests/test_display_collections.py +144 -0
- polyclustx-1.4.1/tests/test_display_comparisons.py +97 -0
- polyclustx-1.4.1/tests/test_display_exports_and_fits.py +117 -0
- polyclustx-1.4.1/tests/test_display_inputs.py +160 -0
- polyclustx-1.4.1/tests/test_display_result_names.py +73 -0
- polyclustx-1.4.1/tests/test_display_synthetic.py +22 -0
- polyclustx-1.4.1/tests/test_docs_deployment.py +50 -0
- polyclustx-1.4.1/tests/test_documented_workflows.py +58 -0
- polyclustx-1.4.1/tests/test_downloader.py +148 -0
- polyclustx-1.4.1/tests/test_experiment_reports.py +105 -0
- polyclustx-1.4.1/tests/test_experiments.py +378 -0
- polyclustx-1.4.1/tests/test_extended_models.py +131 -0
- polyclustx-1.4.1/tests/test_graph_inputs.py +64 -0
- polyclustx-1.4.1/tests/test_loss_comparison.py +33 -0
- polyclustx-1.4.1/tests/test_method_commands.py +126 -0
- polyclustx-1.4.1/tests/test_models.py +357 -0
- polyclustx-1.4.1/tests/test_new_deep_models.py +160 -0
- polyclustx-1.4.1/tests/test_new_model_integration.py +125 -0
- polyclustx-1.4.1/tests/test_optuna_and_command.py +105 -0
- polyclustx-1.4.1/tests/test_pytorch_models.py +243 -0
- polyclustx-1.4.1/tests/test_synthetic_graphs.py +77 -0
- polyclustx-1.4.1/tests/test_tracking.py +438 -0
- polyclustx-1.4.1/tests/test_training_progress.py +49 -0
- polyclustx-1.4.1/tests/test_unsupervised_experiments.py +64 -0
- polyclustx-1.4.1/tests/test_workbench.py +200 -0
- polyclustx-1.4.1/tests/test_workspace_batches.py +78 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Read the Docs configuration
|
|
2
|
+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html
|
|
3
|
+
|
|
4
|
+
version: 2
|
|
5
|
+
|
|
6
|
+
build:
|
|
7
|
+
os: ubuntu-24.04
|
|
8
|
+
tools:
|
|
9
|
+
python: "3.11"
|
|
10
|
+
|
|
11
|
+
sphinx:
|
|
12
|
+
configuration: docs/conf.py
|
|
13
|
+
fail_on_warning: true
|
|
14
|
+
|
|
15
|
+
python:
|
|
16
|
+
install:
|
|
17
|
+
- requirements: docs/requirements.txt
|
polyclustx-1.4.1/LICENSE
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025-2026 Abdelheq Mokhtari
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
23
|
+
------------------------------------------------------------------------
|
|
24
|
+
Third-party notices and asset exclusions
|
|
25
|
+
------------------------------------------------------------------------
|
|
26
|
+
|
|
27
|
+
# Algorithm references and notices
|
|
28
|
+
|
|
29
|
+
## Institutional marks
|
|
30
|
+
|
|
31
|
+
`src/polyclustx/display/assets/borelli.png` (Centre Borelli) and
|
|
32
|
+
`src/polyclustx/display/assets/paris_cite.png` (Université Paris Cité) were
|
|
33
|
+
supplied by the repository owner. They are reproduced unchanged to identify
|
|
34
|
+
research affiliations, not as a claim of institutional endorsement.
|
|
35
|
+
These marks are not licensed under the software's MIT license; rights remain
|
|
36
|
+
with their respective institutions. Reuse must follow institutional requirements:
|
|
37
|
+
|
|
38
|
+
- https://centreborelli.ens-paris-saclay.fr/fr
|
|
39
|
+
- https://u-paris.fr/charte-graphique-et-outils/
|
|
40
|
+
|
|
41
|
+
The separate PolyClustX project mark is an original AI-generated transparent
|
|
42
|
+
X-and-nodes design. It is not an institutional mark.
|
|
43
|
+
|
|
44
|
+
## Algorithm adaptations
|
|
45
|
+
|
|
46
|
+
CONAN, DGF and G-CoMVKM are framework-native adaptations informed by their
|
|
47
|
+
reference implementations. The copyright notices and MIT license below apply
|
|
48
|
+
to the respective derived portions:
|
|
49
|
+
|
|
50
|
+
- CONAN: https://github.com/Guanzhou-Ke/conan — Copyright (c) 2021 ihades
|
|
51
|
+
- DGF: https://github.com/HaoranZ99/DGF — Copyright (c) 2026 Haoran Zheng
|
|
52
|
+
- G-CoMVKM: https://github.com/KristinaP09/G-CoMVKM — Copyright (c) 2025 Kristina P. Sinaga
|
|
53
|
+
|
|
54
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
55
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
56
|
+
in the Software without restriction, including without limitation the rights
|
|
57
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
58
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
59
|
+
furnished to do so, subject to the following conditions:
|
|
60
|
+
|
|
61
|
+
The above copyright notice and this permission notice shall be included in all
|
|
62
|
+
copies or substantial portions of the Software.
|
|
63
|
+
|
|
64
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
65
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
66
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
67
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
68
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
69
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
70
|
+
SOFTWARE.
|
|
71
|
+
|
|
72
|
+
SGLA and UMC are independent implementations of their published formulations;
|
|
73
|
+
their unlicensed standalone source files, pretrained networks and datasets
|
|
74
|
+
are not redistributed. UMC deliberately operates on user-supplied features.
|
|
75
|
+
|
|
76
|
+
The Co-EM and co-training spectral estimators are framework-native PyTorch
|
|
77
|
+
adaptations informed by mvlearn (https://github.com/mvlearn/mvlearn).
|
|
78
|
+
COMPLETER's architecture and objective are adapted from the XLearning reference
|
|
79
|
+
(https://github.com/XLearning-SCU/2021-CVPR-Completer). Their MIT notices follow.
|
|
80
|
+
|
|
81
|
+
IDEC, DCP and MFLVC are reimplementations of their published clustering
|
|
82
|
+
objectives using polyclustx's shared building blocks. Original standalone scripts,
|
|
83
|
+
datasets and pretrained weights are not redistributed. Paper and reference
|
|
84
|
+
implementation links, scope and deliberate differences are documented in
|
|
85
|
+
docs/background/algorithms.md and docs/user_guide/clustering_models.md.
|
|
86
|
+
|
|
87
|
+
## mvlearn
|
|
88
|
+
|
|
89
|
+
The MIT License
|
|
90
|
+
|
|
91
|
+
Copyright (c) 2020 The mvlearn developers.
|
|
92
|
+
|
|
93
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
94
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
95
|
+
in the Software without restriction, including without limitation the rights
|
|
96
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
97
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
98
|
+
furnished to do so, subject to the following conditions:
|
|
99
|
+
|
|
100
|
+
The above copyright notice and this permission notice shall be included in all
|
|
101
|
+
copies or substantial portions of the Software.
|
|
102
|
+
|
|
103
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
104
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
105
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
106
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
107
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
108
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
109
|
+
SOFTWARE.
|
|
110
|
+
|
|
111
|
+
## COMPLETER
|
|
112
|
+
|
|
113
|
+
MIT License
|
|
114
|
+
|
|
115
|
+
Copyright (c) 2021 XLearning Group
|
|
116
|
+
|
|
117
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
118
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
119
|
+
in the Software without restriction, including without limitation the rights
|
|
120
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
121
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
122
|
+
furnished to do so, subject to the following conditions:
|
|
123
|
+
|
|
124
|
+
The above copyright notice and this permission notice shall be included in all
|
|
125
|
+
copies or substantial portions of the Software.
|
|
126
|
+
|
|
127
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
128
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
129
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
130
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
131
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
132
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
133
|
+
SOFTWARE.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
include README.md LICENSE .readthedocs.yaml
|
|
2
|
+
include Makefile
|
|
3
|
+
recursive-include scripts *.py
|
|
4
|
+
recursive-include notebooks *.ipynb
|
|
5
|
+
recursive-include docs *.rst *.md *.py *.txt *.css *.html Makefile make.bat
|
|
6
|
+
prune docs/_build
|
|
7
|
+
recursive-include examples *.yaml
|
|
8
|
+
recursive-include tests *.py
|
|
9
|
+
recursive-include src/polyclustx/display/assets *.png
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
.PHONY: help guide cli run search list-datasets list-models \
|
|
2
|
+
install test lint fix format build docs docs-build docs-serve docs-deploy clean version bump release
|
|
3
|
+
|
|
4
|
+
PYTHON ?= python
|
|
5
|
+
PORT ?= 8000
|
|
6
|
+
RTD_PROJECT ?= polyclustx
|
|
7
|
+
RTD_VERSION ?= latest
|
|
8
|
+
|
|
9
|
+
# ── Help ──────────────────────────────────────────────────────────
|
|
10
|
+
|
|
11
|
+
help: ## Show this list of targets
|
|
12
|
+
@grep -hE '^[a-zA-Z_-]+:.*?## ' $(MAKEFILE_LIST) \
|
|
13
|
+
| awk 'BEGIN {FS = ":.*?## "}; {printf " %-16s %s\n", $$1, $$2}'
|
|
14
|
+
|
|
15
|
+
# ── Development ───────────────────────────────────────────────────
|
|
16
|
+
|
|
17
|
+
install: ## Install the complete package, including the interface
|
|
18
|
+
$(PYTHON) -m pip install .
|
|
19
|
+
|
|
20
|
+
test: ## Run the test suite
|
|
21
|
+
$(PYTHON) -m pytest $(ARGS)
|
|
22
|
+
|
|
23
|
+
lint: ## Lint with ruff
|
|
24
|
+
$(PYTHON) -m ruff check src/ tests/
|
|
25
|
+
|
|
26
|
+
fix: ## Auto-fix lint issues
|
|
27
|
+
$(PYTHON) -m ruff check --fix src/ tests/
|
|
28
|
+
|
|
29
|
+
format: ## Format code (Black-compatible)
|
|
30
|
+
$(PYTHON) -m ruff format src/ tests/
|
|
31
|
+
|
|
32
|
+
build: ## Build wheel and sdist
|
|
33
|
+
$(PYTHON) -m build
|
|
34
|
+
|
|
35
|
+
docs: docs-build ## Alias for docs-build
|
|
36
|
+
|
|
37
|
+
docs-build: ## Install documentation tools and build HTML
|
|
38
|
+
$(PYTHON) -m pip install -r docs/requirements.txt
|
|
39
|
+
$(PYTHON) -m sphinx -W --keep-going -b html docs docs/_build/html
|
|
40
|
+
|
|
41
|
+
docs-serve: ## Serve existing HTML without rebuilding at http://127.0.0.1:8000
|
|
42
|
+
@test -f docs/_build/html/index.html || { echo "Run make docs-build first."; exit 1; }
|
|
43
|
+
$(PYTHON) -m http.server $(PORT) --directory docs/_build/html --bind 127.0.0.1
|
|
44
|
+
|
|
45
|
+
docs-deploy: ## Trigger Read the Docs; requires READTHEDOCS_TOKEN in the environment
|
|
46
|
+
$(PYTHON) scripts/deploy_docs.py --project $(RTD_PROJECT) --version $(RTD_VERSION)
|
|
47
|
+
|
|
48
|
+
clean: ## Remove build, cache and docs artifacts
|
|
49
|
+
rm -rf build dist src/polyclustx.egg-info docs/_build .pytest_cache .ruff_cache .coverage htmlcov test-results.xml
|
|
50
|
+
find src tests docs scripts -name __pycache__ -type d -prune -exec rm -rf {} +
|
|
51
|
+
|
|
52
|
+
# ── CLI helpers ───────────────────────────────────────────────────
|
|
53
|
+
|
|
54
|
+
guide: ## Show short command-line help
|
|
55
|
+
@$(PYTHON) -m polyclustx.command
|
|
56
|
+
|
|
57
|
+
cli: ## Forward arguments, e.g. make cli ARGS="models idec"
|
|
58
|
+
@$(PYTHON) -m polyclustx.command $(ARGS)
|
|
59
|
+
|
|
60
|
+
run: ## Run a model: make run DATASET=acm MODEL=lmgec ARGS="--runs 3"
|
|
61
|
+
@$(PYTHON) -m polyclustx.command run $(DATASET) --model $(or $(MODEL),multiview_kmeans) $(ARGS)
|
|
62
|
+
|
|
63
|
+
search: ## Tune a model: pass --strategy and --vary through ARGS
|
|
64
|
+
@$(PYTHON) -m polyclustx.command search $(DATASET) --model $(or $(MODEL),multiview_kmeans) $(ARGS)
|
|
65
|
+
|
|
66
|
+
list-datasets: ## List dataset families
|
|
67
|
+
@$(PYTHON) -m polyclustx.command datasets
|
|
68
|
+
|
|
69
|
+
list-models: ## List registered models
|
|
70
|
+
@$(PYTHON) -m polyclustx.command models
|
|
71
|
+
|
|
72
|
+
# ── Release ───────────────────────────────────────────────────────
|
|
73
|
+
|
|
74
|
+
version: ## Show the current library version
|
|
75
|
+
@$(PYTHON) -m polyclustx --version
|
|
76
|
+
|
|
77
|
+
bump: ## Bump version using commitizen (updates version files)
|
|
78
|
+
@echo "Bumping version with commitizen..."
|
|
79
|
+
cz bump
|
|
80
|
+
@echo ""
|
|
81
|
+
@echo "Version bumped. Files updated:"
|
|
82
|
+
@echo " - pyproject.toml (project.version + tool.commitizen.version)"
|
|
83
|
+
@echo " - src/polyclustx/__init__.py (__version__)"
|
|
84
|
+
@echo ""
|
|
85
|
+
@echo "Run make release to merge into main and push tags."
|
|
86
|
+
|
|
87
|
+
release: ## Full release: bump -> merge develop -> main, push tags
|
|
88
|
+
@echo "Starting release process..."
|
|
89
|
+
|
|
90
|
+
@if [ "$$(git branch --show-current)" != "develop" ]; then \
|
|
91
|
+
echo "Error: You must run this from the develop branch"; \
|
|
92
|
+
exit 1; \
|
|
93
|
+
fi
|
|
94
|
+
|
|
95
|
+
@if [ -n "$$(git status --porcelain)" ]; then \
|
|
96
|
+
echo "Error: Working tree is dirty. Commit or stash changes first."; \
|
|
97
|
+
exit 1; \
|
|
98
|
+
fi
|
|
99
|
+
|
|
100
|
+
@echo "Bumping version (commitizen -> version files)"
|
|
101
|
+
cz bump
|
|
102
|
+
|
|
103
|
+
@echo "Switching to main"
|
|
104
|
+
git checkout main
|
|
105
|
+
|
|
106
|
+
@echo "Pulling latest main"
|
|
107
|
+
git pull origin main
|
|
108
|
+
|
|
109
|
+
@echo "Merging develop"
|
|
110
|
+
git merge --no-ff develop -m "release: merge develop into main"
|
|
111
|
+
|
|
112
|
+
@echo "Pushing changes"
|
|
113
|
+
git push origin main
|
|
114
|
+
git push origin develop
|
|
115
|
+
git push origin --tags
|
|
116
|
+
|
|
117
|
+
@echo ""
|
|
118
|
+
@echo "Release completed successfully"
|
|
119
|
+
@$(PYTHON) -m polyclustx --version
|