groupoid 0.1.0.dev1__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.
- groupoid-0.1.0.dev1/.github/ISSUE_TEMPLATE/bug_report.md +36 -0
- groupoid-0.1.0.dev1/.github/ISSUE_TEMPLATE/feature_request.md +27 -0
- groupoid-0.1.0.dev1/.github/ISSUE_TEMPLATE/mathematical_correction.md +27 -0
- groupoid-0.1.0.dev1/.github/dependabot.yml +29 -0
- groupoid-0.1.0.dev1/.github/workflows/ci.yml +150 -0
- groupoid-0.1.0.dev1/.github/workflows/docs-deploy.yml +44 -0
- groupoid-0.1.0.dev1/.gitignore +23 -0
- groupoid-0.1.0.dev1/.pre-commit-config.yaml +40 -0
- groupoid-0.1.0.dev1/.zenodo.json +39 -0
- groupoid-0.1.0.dev1/CHANGELOG.md +77 -0
- groupoid-0.1.0.dev1/CITATION.cff +35 -0
- groupoid-0.1.0.dev1/CONTRIBUTING.md +93 -0
- groupoid-0.1.0.dev1/LICENSE +191 -0
- groupoid-0.1.0.dev1/LIMITATIONS.md +78 -0
- groupoid-0.1.0.dev1/PKG-INFO +258 -0
- groupoid-0.1.0.dev1/PROBLEMS.md +104 -0
- groupoid-0.1.0.dev1/README.md +193 -0
- groupoid-0.1.0.dev1/REPRODUCE.md +78 -0
- groupoid-0.1.0.dev1/SECURITY.md +33 -0
- groupoid-0.1.0.dev1/STATUS.md +74 -0
- groupoid-0.1.0.dev1/benchmarks/__init__.py +0 -0
- groupoid-0.1.0.dev1/benchmarks/conftest.py +1 -0
- groupoid-0.1.0.dev1/benchmarks/test_karcher_benchmark.py +18 -0
- groupoid-0.1.0.dev1/codemeta.json +31 -0
- groupoid-0.1.0.dev1/docs/api.md +57 -0
- groupoid-0.1.0.dev1/docs/index.md +122 -0
- groupoid-0.1.0.dev1/docs/overrides/404.html +4 -0
- groupoid-0.1.0.dev1/docs/quickstart.md +114 -0
- groupoid-0.1.0.dev1/docs/theory.md +107 -0
- groupoid-0.1.0.dev1/examples/README.md +34 -0
- groupoid-0.1.0.dev1/examples/__init__.py +0 -0
- groupoid-0.1.0.dev1/examples/synthetic_curve_demo.py +148 -0
- groupoid-0.1.0.dev1/groupoid/__init__.py +31 -0
- groupoid-0.1.0.dev1/groupoid/aggregation.py +234 -0
- groupoid-0.1.0.dev1/groupoid/cohomology.py +99 -0
- groupoid-0.1.0.dev1/groupoid/groupoid.py +85 -0
- groupoid-0.1.0.dev1/groupoid/laplacian.py +201 -0
- groupoid-0.1.0.dev1/groupoid/manifold.py +71 -0
- groupoid-0.1.0.dev1/groupoid/optimizer.py +208 -0
- groupoid-0.1.0.dev1/groupoid/persistence.py +195 -0
- groupoid-0.1.0.dev1/groupoid/sheaf.py +84 -0
- groupoid-0.1.0.dev1/groupoid/transport.py +188 -0
- groupoid-0.1.0.dev1/groupoid.egg-info/PKG-INFO +258 -0
- groupoid-0.1.0.dev1/groupoid.egg-info/SOURCES.txt +63 -0
- groupoid-0.1.0.dev1/groupoid.egg-info/dependency_links.txt +1 -0
- groupoid-0.1.0.dev1/groupoid.egg-info/requires.txt +46 -0
- groupoid-0.1.0.dev1/groupoid.egg-info/top_level.txt +1 -0
- groupoid-0.1.0.dev1/mkdocs.yml +48 -0
- groupoid-0.1.0.dev1/pyproject.toml +145 -0
- groupoid-0.1.0.dev1/scripts/reproduce_sheaf_laplacian.py +109 -0
- groupoid-0.1.0.dev1/setup.cfg +4 -0
- groupoid-0.1.0.dev1/tests/__init__.py +0 -0
- groupoid-0.1.0.dev1/tests/test_aggregation_disconnected.py +61 -0
- groupoid-0.1.0.dev1/tests/test_cohomology_cocycle.py +245 -0
- groupoid-0.1.0.dev1/tests/test_coverage_gaps.py +240 -0
- groupoid-0.1.0.dev1/tests/test_defensive_paths.py +135 -0
- groupoid-0.1.0.dev1/tests/test_imports.py +62 -0
- groupoid-0.1.0.dev1/tests/test_integration.py +253 -0
- groupoid-0.1.0.dev1/tests/test_persistence.py +137 -0
- groupoid-0.1.0.dev1/tests/test_persistence_dimension_labels.py +333 -0
- groupoid-0.1.0.dev1/tests/test_sheaf_laplacian.py +100 -0
- groupoid-0.1.0.dev1/tests/test_smoke.py +162 -0
- groupoid-0.1.0.dev1/tests/test_transport_validation.py +80 -0
- groupoid-0.1.0.dev1/tests/theory/__init__.py +0 -0
- groupoid-0.1.0.dev1/tests/theory/test_mathematical_invariants.py +166 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug Report
|
|
3
|
+
about: Report a bug in GROUPOID
|
|
4
|
+
title: "[BUG] "
|
|
5
|
+
labels: bug
|
|
6
|
+
assignees: ''
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Description
|
|
10
|
+
|
|
11
|
+
A clear description of the bug.
|
|
12
|
+
|
|
13
|
+
## Steps to Reproduce
|
|
14
|
+
|
|
15
|
+
1. ...
|
|
16
|
+
2. ...
|
|
17
|
+
3. ...
|
|
18
|
+
|
|
19
|
+
## Expected Behavior
|
|
20
|
+
|
|
21
|
+
What you expected to happen.
|
|
22
|
+
|
|
23
|
+
## Actual Behavior
|
|
24
|
+
|
|
25
|
+
What actually happened.
|
|
26
|
+
|
|
27
|
+
## Environment
|
|
28
|
+
|
|
29
|
+
- OS:
|
|
30
|
+
- Python version:
|
|
31
|
+
- GROUPOID version:
|
|
32
|
+
- Relevant dependencies:
|
|
33
|
+
|
|
34
|
+
## Additional Context
|
|
35
|
+
|
|
36
|
+
Any additional information, stack traces, or screenshots.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature Request
|
|
3
|
+
about: Suggest a new feature for GROUPOID
|
|
4
|
+
title: "[FEATURE] "
|
|
5
|
+
labels: enhancement
|
|
6
|
+
assignees: ''
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Summary
|
|
10
|
+
|
|
11
|
+
A concise description of the feature.
|
|
12
|
+
|
|
13
|
+
## Motivation
|
|
14
|
+
|
|
15
|
+
Why is this feature needed? What problem does it solve?
|
|
16
|
+
|
|
17
|
+
## Proposed Solution
|
|
18
|
+
|
|
19
|
+
How should this feature work?
|
|
20
|
+
|
|
21
|
+
## Alternatives Considered
|
|
22
|
+
|
|
23
|
+
What other approaches did you consider?
|
|
24
|
+
|
|
25
|
+
## Additional Context
|
|
26
|
+
|
|
27
|
+
Any additional information or references.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Mathematical Correction
|
|
3
|
+
about: Report a mathematical error or suggest a correction
|
|
4
|
+
title: "[MATH] "
|
|
5
|
+
labels: mathematical
|
|
6
|
+
assignees: ''
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Location
|
|
10
|
+
|
|
11
|
+
Which module, function, or documentation page contains the error?
|
|
12
|
+
|
|
13
|
+
## Description of Error
|
|
14
|
+
|
|
15
|
+
Describe the mathematical error precisely.
|
|
16
|
+
|
|
17
|
+
## Correct Statement
|
|
18
|
+
|
|
19
|
+
Provide the correct mathematical statement with proof or reference.
|
|
20
|
+
|
|
21
|
+
## References
|
|
22
|
+
|
|
23
|
+
Cite relevant papers, textbooks, or other sources.
|
|
24
|
+
|
|
25
|
+
## Impact
|
|
26
|
+
|
|
27
|
+
How does this error affect the correctness of computations?
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Dependabot configuration.
|
|
2
|
+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
|
|
3
|
+
#
|
|
4
|
+
# Opens reviewable update PRs (never auto-merged) so security and version bumps
|
|
5
|
+
# are surfaced proactively, rather than relying on a manual read of the CI
|
|
6
|
+
# dependency-audit output. Complements the CI dependency-vulnerability scan.
|
|
7
|
+
version: 2
|
|
8
|
+
updates:
|
|
9
|
+
# Python dependencies declared in pyproject.toml.
|
|
10
|
+
- package-ecosystem: "pip"
|
|
11
|
+
directory: "/"
|
|
12
|
+
schedule:
|
|
13
|
+
interval: "weekly"
|
|
14
|
+
open-pull-requests-limit: 5
|
|
15
|
+
groups:
|
|
16
|
+
# Batch low-risk minor/patch bumps into a single PR to limit noise; majors
|
|
17
|
+
# (which can ship breaking changes) stay as individual, separately
|
|
18
|
+
# reviewable PRs.
|
|
19
|
+
python-minor-and-patch:
|
|
20
|
+
update-types:
|
|
21
|
+
- "minor"
|
|
22
|
+
- "patch"
|
|
23
|
+
|
|
24
|
+
# GitHub Actions used in the workflows (keeps action versions current).
|
|
25
|
+
- package-ecosystem: "github-actions"
|
|
26
|
+
directory: "/"
|
|
27
|
+
schedule:
|
|
28
|
+
interval: "weekly"
|
|
29
|
+
open-pull-requests-limit: 5
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
lint:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
- uses: actions/setup-python@v5
|
|
18
|
+
with:
|
|
19
|
+
python-version: "3.11"
|
|
20
|
+
- name: Install dependencies
|
|
21
|
+
run: |
|
|
22
|
+
python -m pip install --upgrade pip
|
|
23
|
+
# Install the project so `mypy --strict` type-checks against the real
|
|
24
|
+
# numpy / pydantic stubs (NDArray dtype args, the BaseModel base class).
|
|
25
|
+
# Linting only against `ruff black mypy` left numpy/pydantic uninstalled,
|
|
26
|
+
# so --strict raised disallow_subclassing_any on the BaseModel subclass.
|
|
27
|
+
# Consistent with the test / security / docs jobs. CPU torch keeps it lean.
|
|
28
|
+
pip install torch --index-url https://download.pytorch.org/whl/cpu
|
|
29
|
+
pip install -e ".[dev]"
|
|
30
|
+
- name: Run ruff
|
|
31
|
+
run: ruff check .
|
|
32
|
+
- name: Run black check
|
|
33
|
+
run: black --check .
|
|
34
|
+
- name: Run mypy (strict)
|
|
35
|
+
run: mypy --strict groupoid/ --ignore-missing-imports
|
|
36
|
+
|
|
37
|
+
test:
|
|
38
|
+
runs-on: ubuntu-latest
|
|
39
|
+
strategy:
|
|
40
|
+
matrix:
|
|
41
|
+
python-version: ["3.10", "3.11", "3.12"]
|
|
42
|
+
steps:
|
|
43
|
+
- uses: actions/checkout@v4
|
|
44
|
+
- uses: actions/setup-python@v5
|
|
45
|
+
with:
|
|
46
|
+
python-version: ${{ matrix.python-version }}
|
|
47
|
+
- name: Install dependencies
|
|
48
|
+
run: |
|
|
49
|
+
python -m pip install --upgrade pip
|
|
50
|
+
pip install torch --index-url https://download.pytorch.org/whl/cpu
|
|
51
|
+
pip install -e ".[dev]"
|
|
52
|
+
- name: Run tests with coverage gate
|
|
53
|
+
run: >-
|
|
54
|
+
pytest tests/ -v --tb=short -x
|
|
55
|
+
--cov=groupoid --cov-branch
|
|
56
|
+
--cov-report=term-missing --cov-fail-under=100
|
|
57
|
+
|
|
58
|
+
security:
|
|
59
|
+
runs-on: ubuntu-latest
|
|
60
|
+
steps:
|
|
61
|
+
- uses: actions/checkout@v4
|
|
62
|
+
- uses: actions/setup-python@v5
|
|
63
|
+
with:
|
|
64
|
+
python-version: "3.11"
|
|
65
|
+
- name: Install dependencies
|
|
66
|
+
run: |
|
|
67
|
+
python -m pip install --upgrade pip
|
|
68
|
+
# Install the project's real runtime closure so pip-audit scans the
|
|
69
|
+
# packages GROUPOID actually depends on. The previous `safety` step
|
|
70
|
+
# installed only the tools and never the project, so it audited the
|
|
71
|
+
# wrong environment. CPU torch keeps the install lean.
|
|
72
|
+
pip install torch --index-url https://download.pytorch.org/whl/cpu
|
|
73
|
+
pip install -e .
|
|
74
|
+
pip install bandit pip-audit
|
|
75
|
+
# Pin setuptools LAST. torch requires setuptools<82 and pulls in a
|
|
76
|
+
# runner-bundled setuptools that can predate the PYSEC-2025-49 fix
|
|
77
|
+
# (78.1.1); upgrading before `pip install -e .` is simply undone by torch.
|
|
78
|
+
# The window >=78.1.1,<82 clears the advisory while staying
|
|
79
|
+
# dependency-consistent with torch (verified: pip check clean).
|
|
80
|
+
python -m pip install --upgrade "setuptools>=78.1.1,<82"
|
|
81
|
+
- name: Run bandit
|
|
82
|
+
run: bandit -r groupoid/ -c pyproject.toml
|
|
83
|
+
- name: Audit dependencies for known vulnerabilities (pip-audit)
|
|
84
|
+
# pip-audit (OSV-backed, maintained) replaces the deprecated `safety check`
|
|
85
|
+
# (deprecated in safety 3.x in favour of the account-gated `safety scan`).
|
|
86
|
+
# HARD gate: any advisory with a fix version fails the job. The single
|
|
87
|
+
# documented exception is CVE-2025-3000 (torch): no fixed release exists
|
|
88
|
+
# upstream, and OSV expresses the affected range (listed versions up to
|
|
89
|
+
# v2.6.0) as a Git/commit boundary pip-audit cannot version-resolve, so it
|
|
90
|
+
# conservatively flags the installed torch. Disclosed in SECURITY.md; the
|
|
91
|
+
# torch.load / JIT deserialization path is not exercised by GROUPOID. Revisit
|
|
92
|
+
# the ignore once upstream publishes a fixed release.
|
|
93
|
+
run: pip-audit --ignore-vuln CVE-2025-3000
|
|
94
|
+
|
|
95
|
+
pre-commit:
|
|
96
|
+
runs-on: ubuntu-latest
|
|
97
|
+
steps:
|
|
98
|
+
- uses: actions/checkout@v4
|
|
99
|
+
- uses: actions/setup-python@v5
|
|
100
|
+
with:
|
|
101
|
+
python-version: "3.11"
|
|
102
|
+
- name: Install pre-commit
|
|
103
|
+
run: pip install pre-commit
|
|
104
|
+
- name: Run pre-commit
|
|
105
|
+
run: pre-commit run --all-files
|
|
106
|
+
|
|
107
|
+
benchmark:
|
|
108
|
+
runs-on: ubuntu-latest
|
|
109
|
+
steps:
|
|
110
|
+
- uses: actions/checkout@v4
|
|
111
|
+
- uses: actions/setup-python@v5
|
|
112
|
+
with:
|
|
113
|
+
python-version: "3.11"
|
|
114
|
+
- name: Install dependencies
|
|
115
|
+
run: |
|
|
116
|
+
python -m pip install --upgrade pip
|
|
117
|
+
pip install torch --index-url https://download.pytorch.org/whl/cpu
|
|
118
|
+
pip install -e ".[dev]"
|
|
119
|
+
# Benchmarks run for information only. There is no regression gate:
|
|
120
|
+
# timing baselines recorded on one machine are not comparable to a
|
|
121
|
+
# different CI runner, so gating CI against such a baseline would be a
|
|
122
|
+
# meaningless pass/fail. The benchmark JSON is uploaded as an artifact
|
|
123
|
+
# for inspection. A real cross-run regression gate can be added later
|
|
124
|
+
# (e.g. github-action-benchmark with continuous baselines), at which
|
|
125
|
+
# point a committed, machine-tagged baseline becomes meaningful.
|
|
126
|
+
- name: Run benchmarks (informational only, not a gate)
|
|
127
|
+
run: |
|
|
128
|
+
pytest benchmarks/ -v --benchmark-json=benchmark_results.json || true
|
|
129
|
+
- name: Upload benchmark results
|
|
130
|
+
if: always()
|
|
131
|
+
uses: actions/upload-artifact@v4
|
|
132
|
+
with:
|
|
133
|
+
name: benchmark-results
|
|
134
|
+
path: benchmark_results.json
|
|
135
|
+
if-no-files-found: ignore
|
|
136
|
+
|
|
137
|
+
docs:
|
|
138
|
+
runs-on: ubuntu-latest
|
|
139
|
+
steps:
|
|
140
|
+
- uses: actions/checkout@v4
|
|
141
|
+
- uses: actions/setup-python@v5
|
|
142
|
+
with:
|
|
143
|
+
python-version: "3.11"
|
|
144
|
+
- name: Install dependencies
|
|
145
|
+
run: |
|
|
146
|
+
python -m pip install --upgrade pip
|
|
147
|
+
pip install torch --index-url https://download.pytorch.org/whl/cpu
|
|
148
|
+
pip install -e ".[docs]"
|
|
149
|
+
- name: Build docs
|
|
150
|
+
run: mkdocs build --strict
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
name: Deploy Docs
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
pages: write
|
|
11
|
+
id-token: write
|
|
12
|
+
|
|
13
|
+
concurrency:
|
|
14
|
+
group: pages
|
|
15
|
+
cancel-in-progress: false
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
build:
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v4
|
|
22
|
+
- uses: actions/setup-python@v5
|
|
23
|
+
with:
|
|
24
|
+
python-version: "3.11"
|
|
25
|
+
- name: Install dependencies
|
|
26
|
+
run: |
|
|
27
|
+
python -m pip install --upgrade pip
|
|
28
|
+
pip install torch --index-url https://download.pytorch.org/whl/cpu
|
|
29
|
+
pip install -e ".[docs]"
|
|
30
|
+
- name: Build docs
|
|
31
|
+
run: mkdocs build --strict
|
|
32
|
+
- uses: actions/upload-pages-artifact@v3
|
|
33
|
+
with:
|
|
34
|
+
path: site/
|
|
35
|
+
|
|
36
|
+
deploy:
|
|
37
|
+
needs: build
|
|
38
|
+
runs-on: ubuntu-latest
|
|
39
|
+
environment:
|
|
40
|
+
name: github-pages
|
|
41
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
42
|
+
steps:
|
|
43
|
+
- id: deployment
|
|
44
|
+
uses: actions/deploy-pages@v4
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
__pycache__/
|
|
2
|
+
*.py[cod]
|
|
3
|
+
*$py.class
|
|
4
|
+
*.egg-info/
|
|
5
|
+
dist/
|
|
6
|
+
build/
|
|
7
|
+
*.egg
|
|
8
|
+
.eggs/
|
|
9
|
+
*.so
|
|
10
|
+
.mypy_cache/
|
|
11
|
+
.ruff_cache/
|
|
12
|
+
.pytest_cache/
|
|
13
|
+
.hypothesis/
|
|
14
|
+
htmlcov/
|
|
15
|
+
.coverage
|
|
16
|
+
site/
|
|
17
|
+
.env
|
|
18
|
+
*.log
|
|
19
|
+
benchmark_results.json
|
|
20
|
+
data/
|
|
21
|
+
.venv/
|
|
22
|
+
.venv-*/
|
|
23
|
+
venv/
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
3
|
+
rev: v4.5.0
|
|
4
|
+
hooks:
|
|
5
|
+
- id: trailing-whitespace
|
|
6
|
+
- id: end-of-file-fixer
|
|
7
|
+
- id: check-merge-conflict
|
|
8
|
+
|
|
9
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
10
|
+
rev: v0.3.0
|
|
11
|
+
hooks:
|
|
12
|
+
- id: ruff
|
|
13
|
+
args: [--fix]
|
|
14
|
+
|
|
15
|
+
- repo: https://github.com/psf/black
|
|
16
|
+
rev: 24.2.0
|
|
17
|
+
hooks:
|
|
18
|
+
- id: black
|
|
19
|
+
|
|
20
|
+
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
21
|
+
rev: v1.8.0
|
|
22
|
+
hooks:
|
|
23
|
+
- id: mypy
|
|
24
|
+
# Scope to the package, matching the CI lint job (`mypy groupoid/`). The
|
|
25
|
+
# tests are not type-annotated to the package's standard, and numpy-stub
|
|
26
|
+
# inference on test helpers (e.g. matmul of rotation matrices) is noisy.
|
|
27
|
+
files: ^groupoid/
|
|
28
|
+
# Pin numpy to the project's supported range so the hook type-checks
|
|
29
|
+
# against the same stubs as runtime/CI. Unbounded numpy>=1.24 resolves to
|
|
30
|
+
# numpy 2.x, whose stubs type e.g. np.linalg.inv as floating[Any] and
|
|
31
|
+
# disagree with the project's numpy<2.0 (pinned for geomstats).
|
|
32
|
+
additional_dependencies: ["pydantic>=2.0", "numpy>=1.24,<2.0"]
|
|
33
|
+
args: [--ignore-missing-imports]
|
|
34
|
+
|
|
35
|
+
- repo: https://github.com/PyCQA/bandit
|
|
36
|
+
rev: 1.7.7
|
|
37
|
+
hooks:
|
|
38
|
+
- id: bandit
|
|
39
|
+
args: [-c, pyproject.toml]
|
|
40
|
+
additional_dependencies: ["bandit[toml]"]
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"upload_type": "software",
|
|
3
|
+
"title": "GROUPOID: Groupoid-based aggregation for federated learning on Riemannian manifolds",
|
|
4
|
+
"version": "0.1.0.dev1",
|
|
5
|
+
"description": "<p>Pre-alpha research prototype exploring groupoid-based aggregation for federated learning on Riemannian manifolds. Implements transport groupoid morphisms, first cohomology (H^1) for consistency detection, the cellular sheaf Laplacian for spectral analysis, parallel transport (Schild's and pole ladders), and Karcher mean aggregation via geomstats.</p><p><strong>Erratum / supersession notice:</strong> this version (v0.1.0.dev1) corrects mathematical bugs present in the earlier v0.1.0.dev0 snapshot (version DOI 10.5281/zenodo.20563975): the sheaf (connection) Laplacian is now a verified positive-semidefinite operator with a transport-consistent kernel; persistence diagrams retain the homology-dimension label so H0 and H1 are no longer conflated; and H^1 cohomology raises on incomplete cocycles instead of forming partial holonomy. The v0.1.0.dev0 version DOI must not be cited for results. Cite the concept DOI (10.5281/zenodo.20563974), which always resolves to the latest corrected version, or this version or later.</p>",
|
|
6
|
+
"creators": [
|
|
7
|
+
{
|
|
8
|
+
"name": "Maniches, Santiago",
|
|
9
|
+
"affiliation": "TOPOLOGICA LLC",
|
|
10
|
+
"orcid": "0009-0005-6480-1987"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"license": "Apache-2.0",
|
|
14
|
+
"keywords": [
|
|
15
|
+
"federated learning",
|
|
16
|
+
"Riemannian geometry",
|
|
17
|
+
"groupoid",
|
|
18
|
+
"sheaf theory",
|
|
19
|
+
"cohomology",
|
|
20
|
+
"topological data analysis"
|
|
21
|
+
],
|
|
22
|
+
"related_identifiers": [
|
|
23
|
+
{
|
|
24
|
+
"identifier": "10.5281/zenodo.20563974",
|
|
25
|
+
"relation": "isVersionOf",
|
|
26
|
+
"scheme": "doi"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"identifier": "10.5281/zenodo.20563975",
|
|
30
|
+
"relation": "isNewVersionOf",
|
|
31
|
+
"scheme": "doi"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"identifier": "https://github.com/smaniches/GROUPOID",
|
|
35
|
+
"relation": "isSupplementTo",
|
|
36
|
+
"scheme": "url"
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to GROUPOID are documented in this file.
|
|
4
|
+
|
|
5
|
+
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and
|
|
6
|
+
this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
|
|
7
|
+
(with PEP 440 identifiers for Python pre-releases).
|
|
8
|
+
|
|
9
|
+
## [Unreleased]
|
|
10
|
+
|
|
11
|
+
Nothing yet.
|
|
12
|
+
|
|
13
|
+
## [0.1.0.dev1] - 2026-06-16
|
|
14
|
+
|
|
15
|
+
First tag cut on mathematically corrected code. The earlier `v0.1.0.dev0` tag and
|
|
16
|
+
its Zenodo version DOI (`10.5281/zenodo.20563975`) predate the correctness fixes
|
|
17
|
+
below and are **superseded**; that snapshot must not be cited for results. The
|
|
18
|
+
concept DOI (`10.5281/zenodo.20563974`) resolves to this version.
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
- **Sheaf (connection) Laplacian** corrected to a positive-semidefinite operator
|
|
22
|
+
`L = delta^T delta` with a transport-consistent kernel, verified against an
|
|
23
|
+
independently constructed coboundary (#13, closes #8).
|
|
24
|
+
- **Persistence diagrams** now retain the homology-dimension label, so H0 and H1
|
|
25
|
+
bars are no longer conflated; `track_divergence` compares H0 against H0 only,
|
|
26
|
+
verified against an independent scipy minimum-spanning-tree reconstruction
|
|
27
|
+
(#21, closes #10).
|
|
28
|
+
- **Cohomology**: `compute_h1` raises `IncompleteCocycleError` naming the missing
|
|
29
|
+
edge instead of forming a meaningless partial holonomy, and disconnected-graph
|
|
30
|
+
transport is re-raised as an explicit domain error (#20).
|
|
31
|
+
- Benchmark CI regression check soft-skips on a missing JSON baseline instead of
|
|
32
|
+
failing the job (#15).
|
|
33
|
+
|
|
34
|
+
### Added
|
|
35
|
+
- 100% line + branch test coverage of the `groupoid` package on Python 3.10-3.12,
|
|
36
|
+
enforced in CI via `--cov-branch --cov-fail-under=100` (#18).
|
|
37
|
+
- Cold-clone reproducibility: a seeded determinism receipt and reproduction guide
|
|
38
|
+
(`REPRODUCE.md`), install cap, stub clarity, and a real CI gate (#16).
|
|
39
|
+
- Aggregation tests covering forward-edge traversal, weighted mean, and the
|
|
40
|
+
inconsistency flag (#17).
|
|
41
|
+
- Zenodo concept-DOI badge and `CITATION.cff` DOI metadata (#11).
|
|
42
|
+
- A `Documentation` project URL and keywords aligned across `pyproject.toml`,
|
|
43
|
+
`codemeta.json`, and `CITATION.cff` (#19).
|
|
44
|
+
- A consolidated `PROBLEMS.md` self-audit recording corrected bugs, known
|
|
45
|
+
limitations, and deferred work (#23).
|
|
46
|
+
- A `CHANGELOG.md` linked from package metadata (#24).
|
|
47
|
+
- A `.zenodo.json` so archival deposits carry curated metadata, a supersession
|
|
48
|
+
note for `v0.1.0.dev0`, and version-chain links to the concept and prior DOIs.
|
|
49
|
+
- Dependabot configuration for weekly `pip` and `github-actions` updates (#25).
|
|
50
|
+
|
|
51
|
+
### Changed
|
|
52
|
+
- Numpy array annotations parameterized to `NDArray[np.float64]`, with
|
|
53
|
+
`mypy --strict` enforced as a hard, gating CI step (#26).
|
|
54
|
+
|
|
55
|
+
### Security
|
|
56
|
+
- Replaced the deprecated soft `safety check` with a hard, gating `pip-audit`
|
|
57
|
+
step; the fix-less torch advisory CVE-2025-3000 is documented and explicitly
|
|
58
|
+
ignored with its rationale in `SECURITY.md` (#22).
|
|
59
|
+
|
|
60
|
+
## [0.1.0.dev0] - 2026-06-05
|
|
61
|
+
|
|
62
|
+
Initial pre-alpha research prototype. Core implementation of groupoid-based
|
|
63
|
+
aggregation for federated learning on Riemannian manifolds: the transport groupoid
|
|
64
|
+
(morphism composition and inverse), the Karcher mean via geomstats, H^1
|
|
65
|
+
cohomological consistency, the sheaf Laplacian, parallel transport (Schild's and
|
|
66
|
+
pole ladders), and persistence-based divergence tracking. Ships machine-readable
|
|
67
|
+
citation metadata (`CITATION.cff`, `codemeta.json` with ORCID). Pre-alpha: APIs
|
|
68
|
+
may change and the central hypothesis is not yet validated (see `STATUS.md` and
|
|
69
|
+
`LIMITATIONS.md`).
|
|
70
|
+
|
|
71
|
+
Date shown is the tag commit (`v0.1.0.dev0` -> 2a02954). `CITATION.cff` records
|
|
72
|
+
`date-released: 2026-05-25`, when the core implementation landed; the tag was
|
|
73
|
+
later placed on the metadata commit.
|
|
74
|
+
|
|
75
|
+
[Unreleased]: https://github.com/smaniches/GROUPOID/compare/v0.1.0.dev1...HEAD
|
|
76
|
+
[0.1.0.dev1]: https://github.com/smaniches/GROUPOID/compare/v0.1.0.dev0...v0.1.0.dev1
|
|
77
|
+
[0.1.0.dev0]: https://github.com/smaniches/GROUPOID/releases/tag/v0.1.0.dev0
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
message: "If you use this software, please cite it as below."
|
|
3
|
+
type: software
|
|
4
|
+
title: "GROUPOID: Groupoid-based aggregation for federated learning on Riemannian manifolds"
|
|
5
|
+
version: 0.1.0.dev1
|
|
6
|
+
date-released: 2026-06-16
|
|
7
|
+
license: Apache-2.0
|
|
8
|
+
repository-code: "https://github.com/smaniches/GROUPOID"
|
|
9
|
+
doi: 10.5281/zenodo.20563974
|
|
10
|
+
identifiers:
|
|
11
|
+
- type: doi
|
|
12
|
+
value: 10.5281/zenodo.20563974
|
|
13
|
+
description: "Concept DOI (all versions) — always resolves to the latest, mathematically corrected version. Cite this."
|
|
14
|
+
- type: doi
|
|
15
|
+
value: 10.5281/zenodo.20563975
|
|
16
|
+
description: "Version DOI (v0.1.0.dev0) — SUPERSEDED. This snapshot predates the sheaf-Laplacian PSD, persistence-dimension, and cohomology corrections; do not cite for results. Use v0.1.0.dev1 or later."
|
|
17
|
+
authors:
|
|
18
|
+
- family-names: Maniches
|
|
19
|
+
given-names: Santiago
|
|
20
|
+
email: santiago.maniches@gmail.com
|
|
21
|
+
affiliation: TOPOLOGICA LLC
|
|
22
|
+
orcid: "https://orcid.org/0009-0005-6480-1987"
|
|
23
|
+
keywords:
|
|
24
|
+
- federated learning
|
|
25
|
+
- Riemannian geometry
|
|
26
|
+
- groupoid
|
|
27
|
+
- sheaf theory
|
|
28
|
+
- cohomology
|
|
29
|
+
- topological data analysis
|
|
30
|
+
abstract: >-
|
|
31
|
+
Research prototype exploring groupoid-based aggregation for federated
|
|
32
|
+
learning on Riemannian manifolds. Implements transport groupoid
|
|
33
|
+
morphisms, first cohomology (H^1) for consistency detection,
|
|
34
|
+
cellular sheaf Laplacian for spectral analysis, and Karcher mean
|
|
35
|
+
aggregation via geomstats.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Contributing to GROUPOID
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing to GROUPOID. This document
|
|
4
|
+
describes the development workflow and guidelines for contributions.
|
|
5
|
+
|
|
6
|
+
## Development Setup
|
|
7
|
+
|
|
8
|
+
1. Fork and clone the repository:
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
git clone https://github.com/<your-username>/GROUPOID.git
|
|
12
|
+
cd GROUPOID
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
2. Install all dependencies:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
pip install -e ".[all]"
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
3. Install pre-commit hooks:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
pre-commit install
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Code Style
|
|
28
|
+
|
|
29
|
+
All code is formatted and checked by the following tools (enforced via
|
|
30
|
+
pre-commit hooks):
|
|
31
|
+
|
|
32
|
+
- **ruff**: Linting and import sorting
|
|
33
|
+
- **black**: Code formatting (line length 99)
|
|
34
|
+
- **mypy**: Static type checking
|
|
35
|
+
- **bandit**: Security analysis
|
|
36
|
+
|
|
37
|
+
Run all checks manually:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
pre-commit run --all-files
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Running Tests
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
# All tests
|
|
47
|
+
pytest tests/ -v
|
|
48
|
+
|
|
49
|
+
# Property-based tests only
|
|
50
|
+
pytest tests/theory/ -v
|
|
51
|
+
|
|
52
|
+
# Benchmarks
|
|
53
|
+
pytest benchmarks/ -v --benchmark-only
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Mathematical Contributions
|
|
57
|
+
|
|
58
|
+
Contributions involving mathematical claims (new algorithms, convergence
|
|
59
|
+
proofs, complexity bounds) must include:
|
|
60
|
+
|
|
61
|
+
- A proof or a citation to a peer-reviewed reference
|
|
62
|
+
- Property-based tests (using Hypothesis) that verify the claimed invariants
|
|
63
|
+
- Clear documentation of assumptions and limitations
|
|
64
|
+
|
|
65
|
+
If you find a mathematical error in the existing code or documentation,
|
|
66
|
+
please open an issue using the "Mathematical Correction" template.
|
|
67
|
+
|
|
68
|
+
## Pull Request Process
|
|
69
|
+
|
|
70
|
+
1. Create a feature branch from `main`.
|
|
71
|
+
2. Make your changes, ensuring all pre-commit hooks pass.
|
|
72
|
+
3. Add or update tests as appropriate.
|
|
73
|
+
4. Update documentation if your changes affect the public API.
|
|
74
|
+
5. Open a pull request against `main`.
|
|
75
|
+
6. Ensure CI passes (lint, test, security, docs build).
|
|
76
|
+
7. Address all review comments before merging.
|
|
77
|
+
|
|
78
|
+
## Issue Templates
|
|
79
|
+
|
|
80
|
+
When reporting bugs or requesting features, please use the appropriate
|
|
81
|
+
issue template:
|
|
82
|
+
|
|
83
|
+
- **Bug Report**: For reproducible bugs with steps, expected behavior,
|
|
84
|
+
and environment details.
|
|
85
|
+
- **Feature Request**: For new functionality with motivation and
|
|
86
|
+
proposed approach.
|
|
87
|
+
- **Mathematical Correction**: For errors in theorems, proofs, or
|
|
88
|
+
algorithms.
|
|
89
|
+
|
|
90
|
+
## License
|
|
91
|
+
|
|
92
|
+
By contributing to GROUPOID, you agree that your contributions will be
|
|
93
|
+
licensed under the Apache License, Version 2.0.
|