groupoid 0.1.0.dev2__tar.gz → 0.1.0.dev5__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 (100) hide show
  1. groupoid-0.1.0.dev5/.github/dependabot.yml +87 -0
  2. groupoid-0.1.0.dev5/.github/scripts/install_torch_cpu.sh +25 -0
  3. groupoid-0.1.0.dev5/.github/workflows/auto-tag-release.yml +91 -0
  4. {groupoid-0.1.0.dev2 → groupoid-0.1.0.dev5}/.github/workflows/ci.yml +33 -26
  5. {groupoid-0.1.0.dev2 → groupoid-0.1.0.dev5}/.github/workflows/docs-deploy.yml +8 -7
  6. groupoid-0.1.0.dev5/.github/workflows/release.yml +222 -0
  7. groupoid-0.1.0.dev5/.zenodo.json +39 -0
  8. groupoid-0.1.0.dev5/CHANGELOG.md +209 -0
  9. groupoid-0.1.0.dev5/CITATION.cff +35 -0
  10. groupoid-0.1.0.dev5/CONTRIBUTING.md +141 -0
  11. groupoid-0.1.0.dev5/CORRECTION_NOTICE.md +147 -0
  12. groupoid-0.1.0.dev5/LIMITATIONS.md +114 -0
  13. {groupoid-0.1.0.dev2 → groupoid-0.1.0.dev5}/PKG-INFO +62 -45
  14. groupoid-0.1.0.dev5/PROBLEMS.md +149 -0
  15. {groupoid-0.1.0.dev2 → groupoid-0.1.0.dev5}/README.md +60 -43
  16. {groupoid-0.1.0.dev2 → groupoid-0.1.0.dev5}/SECURITY.md +10 -0
  17. groupoid-0.1.0.dev5/STATUS.md +92 -0
  18. {groupoid-0.1.0.dev2 → groupoid-0.1.0.dev5}/codemeta.json +2 -2
  19. {groupoid-0.1.0.dev2 → groupoid-0.1.0.dev5}/docs/api.md +16 -2
  20. {groupoid-0.1.0.dev2 → groupoid-0.1.0.dev5}/docs/index.md +27 -22
  21. groupoid-0.1.0.dev5/docs/quickstart.md +100 -0
  22. groupoid-0.1.0.dev5/docs/theory.md +200 -0
  23. groupoid-0.1.0.dev5/experiments/PREREGISTRATION.md +154 -0
  24. groupoid-0.1.0.dev5/experiments/README.md +68 -0
  25. groupoid-0.1.0.dev5/experiments/RESULTS.md +163 -0
  26. groupoid-0.1.0.dev5/experiments/analyze.py +261 -0
  27. groupoid-0.1.0.dev5/experiments/results.json +12615 -0
  28. groupoid-0.1.0.dev5/experiments/run_benchmark.py +213 -0
  29. {groupoid-0.1.0.dev2 → groupoid-0.1.0.dev5}/groupoid/__init__.py +19 -3
  30. groupoid-0.1.0.dev5/groupoid/aggregation.py +380 -0
  31. groupoid-0.1.0.dev5/groupoid/cohomology.py +170 -0
  32. groupoid-0.1.0.dev5/groupoid/groupoid.py +120 -0
  33. {groupoid-0.1.0.dev2 → groupoid-0.1.0.dev5}/groupoid/optimizer.py +64 -8
  34. groupoid-0.1.0.dev5/groupoid/transport.py +187 -0
  35. {groupoid-0.1.0.dev2 → groupoid-0.1.0.dev5}/groupoid.egg-info/PKG-INFO +62 -45
  36. {groupoid-0.1.0.dev2 → groupoid-0.1.0.dev5}/groupoid.egg-info/SOURCES.txt +15 -0
  37. {groupoid-0.1.0.dev2 → groupoid-0.1.0.dev5}/pyproject.toml +2 -2
  38. groupoid-0.1.0.dev5/scripts/bind_release_sbom.py +198 -0
  39. groupoid-0.1.0.dev5/tests/test_cohomology_cocycle.py +169 -0
  40. groupoid-0.1.0.dev5/tests/test_coverage_gaps.py +186 -0
  41. {groupoid-0.1.0.dev2 → groupoid-0.1.0.dev5}/tests/test_defensive_paths.py +12 -0
  42. {groupoid-0.1.0.dev2 → groupoid-0.1.0.dev5}/tests/test_imports.py +9 -1
  43. groupoid-0.1.0.dev5/tests/test_integration.py +208 -0
  44. groupoid-0.1.0.dev5/tests/test_optimizer_validation.py +141 -0
  45. groupoid-0.1.0.dev5/tests/test_pipeline_integration.py +89 -0
  46. groupoid-0.1.0.dev5/tests/test_release_sbom_binding.py +156 -0
  47. groupoid-0.1.0.dev5/tests/test_release_workflow_integrity.py +100 -0
  48. groupoid-0.1.0.dev5/tests/test_scientific_corrections.py +552 -0
  49. groupoid-0.1.0.dev5/tests/theory/test_mathematical_invariants.py +120 -0
  50. groupoid-0.1.0.dev2/.github/dependabot.yml +0 -29
  51. groupoid-0.1.0.dev2/.github/workflows/release.yml +0 -107
  52. groupoid-0.1.0.dev2/.zenodo.json +0 -39
  53. groupoid-0.1.0.dev2/CHANGELOG.md +0 -92
  54. groupoid-0.1.0.dev2/CITATION.cff +0 -35
  55. groupoid-0.1.0.dev2/CONTRIBUTING.md +0 -93
  56. groupoid-0.1.0.dev2/LIMITATIONS.md +0 -78
  57. groupoid-0.1.0.dev2/PROBLEMS.md +0 -104
  58. groupoid-0.1.0.dev2/STATUS.md +0 -75
  59. groupoid-0.1.0.dev2/docs/quickstart.md +0 -114
  60. groupoid-0.1.0.dev2/docs/theory.md +0 -107
  61. groupoid-0.1.0.dev2/groupoid/aggregation.py +0 -234
  62. groupoid-0.1.0.dev2/groupoid/cohomology.py +0 -99
  63. groupoid-0.1.0.dev2/groupoid/groupoid.py +0 -85
  64. groupoid-0.1.0.dev2/groupoid/transport.py +0 -188
  65. groupoid-0.1.0.dev2/tests/test_cohomology_cocycle.py +0 -245
  66. groupoid-0.1.0.dev2/tests/test_coverage_gaps.py +0 -240
  67. groupoid-0.1.0.dev2/tests/test_integration.py +0 -253
  68. groupoid-0.1.0.dev2/tests/theory/test_mathematical_invariants.py +0 -166
  69. {groupoid-0.1.0.dev2 → groupoid-0.1.0.dev5}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  70. {groupoid-0.1.0.dev2 → groupoid-0.1.0.dev5}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  71. {groupoid-0.1.0.dev2 → groupoid-0.1.0.dev5}/.github/ISSUE_TEMPLATE/mathematical_correction.md +0 -0
  72. {groupoid-0.1.0.dev2 → groupoid-0.1.0.dev5}/.gitignore +0 -0
  73. {groupoid-0.1.0.dev2 → groupoid-0.1.0.dev5}/.pre-commit-config.yaml +0 -0
  74. {groupoid-0.1.0.dev2 → groupoid-0.1.0.dev5}/LICENSE +0 -0
  75. {groupoid-0.1.0.dev2 → groupoid-0.1.0.dev5}/REPRODUCE.md +0 -0
  76. {groupoid-0.1.0.dev2 → groupoid-0.1.0.dev5}/benchmarks/__init__.py +0 -0
  77. {groupoid-0.1.0.dev2 → groupoid-0.1.0.dev5}/benchmarks/conftest.py +0 -0
  78. {groupoid-0.1.0.dev2 → groupoid-0.1.0.dev5}/benchmarks/test_karcher_benchmark.py +0 -0
  79. {groupoid-0.1.0.dev2 → groupoid-0.1.0.dev5}/docs/overrides/404.html +0 -0
  80. {groupoid-0.1.0.dev2 → groupoid-0.1.0.dev5}/examples/README.md +0 -0
  81. {groupoid-0.1.0.dev2 → groupoid-0.1.0.dev5}/examples/__init__.py +0 -0
  82. {groupoid-0.1.0.dev2 → groupoid-0.1.0.dev5}/examples/synthetic_curve_demo.py +0 -0
  83. {groupoid-0.1.0.dev2 → groupoid-0.1.0.dev5}/groupoid/laplacian.py +0 -0
  84. {groupoid-0.1.0.dev2 → groupoid-0.1.0.dev5}/groupoid/manifold.py +0 -0
  85. {groupoid-0.1.0.dev2 → groupoid-0.1.0.dev5}/groupoid/persistence.py +0 -0
  86. {groupoid-0.1.0.dev2 → groupoid-0.1.0.dev5}/groupoid/sheaf.py +0 -0
  87. {groupoid-0.1.0.dev2 → groupoid-0.1.0.dev5}/groupoid.egg-info/dependency_links.txt +0 -0
  88. {groupoid-0.1.0.dev2 → groupoid-0.1.0.dev5}/groupoid.egg-info/requires.txt +0 -0
  89. {groupoid-0.1.0.dev2 → groupoid-0.1.0.dev5}/groupoid.egg-info/top_level.txt +0 -0
  90. {groupoid-0.1.0.dev2 → groupoid-0.1.0.dev5}/mkdocs.yml +0 -0
  91. {groupoid-0.1.0.dev2 → groupoid-0.1.0.dev5}/scripts/reproduce_sheaf_laplacian.py +0 -0
  92. {groupoid-0.1.0.dev2 → groupoid-0.1.0.dev5}/setup.cfg +0 -0
  93. {groupoid-0.1.0.dev2 → groupoid-0.1.0.dev5}/tests/__init__.py +0 -0
  94. {groupoid-0.1.0.dev2 → groupoid-0.1.0.dev5}/tests/test_aggregation_disconnected.py +0 -0
  95. {groupoid-0.1.0.dev2 → groupoid-0.1.0.dev5}/tests/test_persistence.py +0 -0
  96. {groupoid-0.1.0.dev2 → groupoid-0.1.0.dev5}/tests/test_persistence_dimension_labels.py +0 -0
  97. {groupoid-0.1.0.dev2 → groupoid-0.1.0.dev5}/tests/test_sheaf_laplacian.py +0 -0
  98. {groupoid-0.1.0.dev2 → groupoid-0.1.0.dev5}/tests/test_smoke.py +0 -0
  99. {groupoid-0.1.0.dev2 → groupoid-0.1.0.dev5}/tests/test_transport_validation.py +0 -0
  100. {groupoid-0.1.0.dev2 → groupoid-0.1.0.dev5}/tests/theory/__init__.py +0 -0
@@ -0,0 +1,87 @@
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
+ day: "monday"
15
+ # Pin the run to a predictable local hour. With no time/timezone,
16
+ # Dependabot fires at its default slot in UTC, which lands in the middle
17
+ # of the night for the maintainer. Adjust `timezone` to your actual IANA
18
+ # zone if America/New_York is not yours.
19
+ time: "09:00"
20
+ timezone: "America/New_York"
21
+ open-pull-requests-limit: 5
22
+ # Manage DIRECT dependencies only — the ones declared in pyproject.toml.
23
+ # GROUPOID ships no committed/compiled lockfile, so this is currently a
24
+ # no-op (Dependabot already only edits the pyproject declarations). It is
25
+ # kept for consistency and as a guard: should a compiled lock ever be added,
26
+ # its transitive pins must advance by recompiling the lock, not by standalone
27
+ # Dependabot line-edits. Transitive CVEs are NOT lost: Dependabot *security*
28
+ # updates patch vulnerable dependencies regardless of this allow filter.
29
+ allow:
30
+ - dependency-type: "direct"
31
+ # numpy 2.x is a verified runtime incompatibility, not a routine bump:
32
+ # geomstats (a required runtime dependency) fails at import under
33
+ # numpy>=2.0 because `numpy.trapz` was removed, so the tested
34
+ # numpy>=1.24,<2.0 contract in pyproject.toml cannot widen (see closed
35
+ # PR #57). Scoped by version, not a blanket numpy ignore: compatible
36
+ # numpy 1.x version updates and 1.x security updates still flow.
37
+ ignore:
38
+ - dependency-name: "numpy"
39
+ versions: [">=2.0.0"]
40
+ groups:
41
+ # Batch updates by area into a single PR per group to limit noise instead
42
+ # of one PR per package.
43
+ runtime:
44
+ patterns:
45
+ - "torch"
46
+ - "geomstats"
47
+ - "pymanopt"
48
+ - "ripser"
49
+ - "persim"
50
+ - "POT"
51
+ - "networkx"
52
+ - "einops"
53
+ - "numpy"
54
+ - "scipy"
55
+ - "pydantic"
56
+ - "loguru"
57
+ dev:
58
+ patterns:
59
+ - "pytest*"
60
+ - "ruff"
61
+ - "black"
62
+ - "mypy"
63
+ - "hypothesis"
64
+ - "bandit"
65
+ - "pip-audit"
66
+ - "pre-commit"
67
+ docs:
68
+ patterns: ["mkdocs*", "mkdocstrings*"]
69
+ # Fallback batcher. With `allow: direct` and the groups above, this should
70
+ # stay empty; if a future declared dep is not matched above, this keeps it
71
+ # to a single PR instead of one-per-package.
72
+ other:
73
+ patterns: ["*"]
74
+
75
+ # GitHub Actions used in the workflows (keeps action versions current).
76
+ - package-ecosystem: "github-actions"
77
+ directory: "/"
78
+ schedule:
79
+ interval: "weekly"
80
+ day: "monday"
81
+ time: "09:00"
82
+ timezone: "America/New_York"
83
+ open-pull-requests-limit: 5
84
+ groups:
85
+ # Batch all action bumps into a single weekly PR instead of one each.
86
+ actions:
87
+ patterns: ["*"]
@@ -0,0 +1,25 @@
1
+ #!/usr/bin/env bash
2
+ # Installs CPU-only torch from the PyTorch index with retries.
3
+ #
4
+ # That index (download.pytorch.org/whl/cpu, Cloudflare R2-backed as
5
+ # download-r2.pytorch.org) intermittently drops the TLS handshake
6
+ # (SSLV3_ALERT_HANDSHAKE_FAILURE) from GitHub-hosted runners. pip's own
7
+ # built-in retries reuse the same connection pool within one process and
8
+ # do not help here; a fresh `pip install` invocation gets a fresh TLS
9
+ # connection and has in practice succeeded where the retries within a
10
+ # single invocation did not. Five attempts with linear backoff (10s, 20s,
11
+ # 30s, 40s) before giving up.
12
+ set -euo pipefail
13
+
14
+ max_attempts=5
15
+ attempt=1
16
+ until pip install torch --index-url https://download.pytorch.org/whl/cpu; do
17
+ if [ "${attempt}" -ge "${max_attempts}" ]; then
18
+ echo "::error::torch install failed after ${max_attempts} attempts" >&2
19
+ exit 1
20
+ fi
21
+ sleep_seconds=$((attempt * 10))
22
+ echo "torch install attempt ${attempt}/${max_attempts} failed; retrying in ${sleep_seconds}s" >&2
23
+ sleep "${sleep_seconds}"
24
+ attempt=$((attempt + 1))
25
+ done
@@ -0,0 +1,91 @@
1
+ name: Auto Tag Release
2
+
3
+ # Creates the tag for a release-cut merge to main, then explicitly dispatches
4
+ # release.yml (build, attestations, PyPI publish, signing, GitHub Release)
5
+ # against that tag.
6
+ #
7
+ # The dispatch is explicit, not a tag-push trigger, because GitHub suppresses
8
+ # push-triggered workflow runs caused by a GITHUB_TOKEN-authored push: pushing
9
+ # the tag here does NOT cause release.yml's `on.push.tags` trigger to fire.
10
+ # workflow_dispatch is the documented exception to that suppression, which is
11
+ # why this workflow calls `gh workflow run` instead of relying on the tag
12
+ # push itself. (An earlier version of this workflow assumed the tag push
13
+ # alone would trigger release.yml; it did not, and no release was produced
14
+ # for v0.1.0.dev4 until this was fixed and the release re-run manually.)
15
+ #
16
+ # release.yml's own `push.tags` trigger remains as a fallback/manual path
17
+ # (a human pushing a tag with their own credentials is not subject to this
18
+ # suppression), alongside its `workflow_dispatch` trigger for republishing an
19
+ # existing tag to PyPI only.
20
+ #
21
+ # If a version needs a tag this workflow's format check rejects (see below),
22
+ # tag it manually -- this automation only ever creates a tag when one is
23
+ # missing, so a pre-existing manual tag always takes precedence and this
24
+ # workflow becomes a no-op for that version.
25
+
26
+ on:
27
+ push:
28
+ branches: [main]
29
+ paths:
30
+ - pyproject.toml
31
+
32
+ permissions:
33
+ contents: read
34
+
35
+ jobs:
36
+ tag:
37
+ runs-on: ubuntu-latest
38
+ permissions:
39
+ contents: write # push the tag
40
+ actions: write # dispatch release.yml via `gh workflow run`
41
+ steps:
42
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
43
+ with:
44
+ fetch-depth: 0 # need full tag history to check for an existing tag
45
+
46
+ - name: Create the release tag if this version doesn't have one yet, and dispatch the release
47
+ env:
48
+ GH_TOKEN: ${{ github.token }}
49
+ run: |
50
+ set -euo pipefail
51
+
52
+ version=$(grep -m1 '^version = "' pyproject.toml | sed -E 's/version = "(.*)"/\1/')
53
+ if [ -z "${version}" ]; then
54
+ echo "::error::could not extract a version from pyproject.toml"
55
+ exit 1
56
+ fi
57
+
58
+ # PEP 440-ish release/pre-release only: X.Y.Z, optionally with
59
+ # .devN / aN / bN / rcN. No local version segment (+...), no
60
+ # anything else. A version that doesn't match this is presumably
61
+ # intentional and unusual enough to want a human tagging it by
62
+ # hand rather than this automation guessing.
63
+ if ! echo "${version}" | grep -Eq '^[0-9]+\.[0-9]+\.[0-9]+(\.dev[0-9]+|a[0-9]+|b[0-9]+|rc[0-9]+)?$'; then
64
+ echo "::error::version '${version}' is not a recognized release format (expected X.Y.Z, optionally with .devN/aN/bN/rcN, no local metadata); refusing to tag automatically. Tag it manually if this is intentional."
65
+ exit 1
66
+ fi
67
+
68
+ tag="v${version}"
69
+
70
+ if git rev-parse "refs/tags/${tag}" >/dev/null 2>&1; then
71
+ echo "Tag ${tag} already exists; nothing to do."
72
+ exit 0
73
+ fi
74
+
75
+ if ! grep -qF "[${version}]" CHANGELOG.md; then
76
+ echo "::error::CHANGELOG.md has no [${version}] heading; refusing to tag an undocumented release. Add the changelog section as part of the version-bump PR."
77
+ exit 1
78
+ fi
79
+
80
+ echo "Version ${version} has no matching tag; creating ${tag}."
81
+ git config user.name "github-actions[bot]"
82
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
83
+ git tag -a "${tag}" -m "Release ${tag}"
84
+ git push origin "refs/tags/${tag}"
85
+
86
+ echo "Dispatching release.yml for ${tag}."
87
+ gh workflow run release.yml \
88
+ --repo "${GITHUB_REPOSITORY}" \
89
+ --ref "${tag}" \
90
+ -f "ref=${tag}" \
91
+ -f "create_github_release=true"
@@ -13,8 +13,8 @@ jobs:
13
13
  lint:
14
14
  runs-on: ubuntu-latest
15
15
  steps:
16
- - uses: actions/checkout@v6
17
- - uses: actions/setup-python@v6
16
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
17
+ - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
18
18
  with:
19
19
  python-version: "3.11"
20
20
  - name: Install dependencies
@@ -25,7 +25,7 @@ jobs:
25
25
  # Linting only against `ruff black mypy` left numpy/pydantic uninstalled,
26
26
  # so --strict raised disallow_subclassing_any on the BaseModel subclass.
27
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
28
+ .github/scripts/install_torch_cpu.sh
29
29
  pip install -e ".[dev]"
30
30
  - name: Run ruff
31
31
  run: ruff check .
@@ -40,14 +40,14 @@ jobs:
40
40
  matrix:
41
41
  python-version: ["3.10", "3.11", "3.12"]
42
42
  steps:
43
- - uses: actions/checkout@v6
44
- - uses: actions/setup-python@v6
43
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
44
+ - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
45
45
  with:
46
46
  python-version: ${{ matrix.python-version }}
47
47
  - name: Install dependencies
48
48
  run: |
49
49
  python -m pip install --upgrade pip
50
- pip install torch --index-url https://download.pytorch.org/whl/cpu
50
+ .github/scripts/install_torch_cpu.sh
51
51
  pip install -e ".[dev]"
52
52
  - name: Run tests with coverage gate
53
53
  run: >-
@@ -58,8 +58,8 @@ jobs:
58
58
  security:
59
59
  runs-on: ubuntu-latest
60
60
  steps:
61
- - uses: actions/checkout@v6
62
- - uses: actions/setup-python@v6
61
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
62
+ - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
63
63
  with:
64
64
  python-version: "3.11"
65
65
  - name: Install dependencies
@@ -69,7 +69,7 @@ jobs:
69
69
  # packages GROUPOID actually depends on. The previous `safety` step
70
70
  # installed only the tools and never the project, so it audited the
71
71
  # wrong environment. CPU torch keeps the install lean.
72
- pip install torch --index-url https://download.pytorch.org/whl/cpu
72
+ .github/scripts/install_torch_cpu.sh
73
73
  pip install -e .
74
74
  pip install bandit pip-audit
75
75
  # Pin setuptools LAST. torch requires setuptools<82 and pulls in a
@@ -83,20 +83,27 @@ jobs:
83
83
  - name: Audit dependencies for known vulnerabilities (pip-audit)
84
84
  # pip-audit (OSV-backed, maintained) replaces the deprecated `safety check`
85
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
86
+ # HARD gate: any advisory with a fix version fails the job. Two documented
87
+ # exceptions, both disclosed in SECURITY.md:
88
+ # - CVE-2025-3000 (torch): no fixed release exists upstream, and OSV
89
+ # expresses the affected range (listed versions up to v2.6.0) as a
90
+ # Git/commit boundary pip-audit cannot version-resolve, so it
91
+ # conservatively flags the installed torch. The torch.load / JIT
92
+ # deserialization path is not exercised by GROUPOID. Revisit the ignore
93
+ # once upstream publishes a fixed release.
94
+ # - PYSEC-2026-3447 (CVE-2026-59890, setuptools <83): the fix (83.0.0) is
95
+ # unreachable while torch requires setuptools<82 (see the install step
96
+ # above). The flaw is a macOS-only (APFS/HFS+) Unicode-normalization
97
+ # bypass of MANIFEST.in exclude rules when building sdists; all CI and
98
+ # release builds run on ubuntu-latest. Drop the ignore once torch
99
+ # permits setuptools>=83.
100
+ run: pip-audit --ignore-vuln CVE-2025-3000 --ignore-vuln PYSEC-2026-3447
94
101
 
95
102
  pre-commit:
96
103
  runs-on: ubuntu-latest
97
104
  steps:
98
- - uses: actions/checkout@v6
99
- - uses: actions/setup-python@v6
105
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
106
+ - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
100
107
  with:
101
108
  python-version: "3.11"
102
109
  - name: Install pre-commit
@@ -107,14 +114,14 @@ jobs:
107
114
  benchmark:
108
115
  runs-on: ubuntu-latest
109
116
  steps:
110
- - uses: actions/checkout@v6
111
- - uses: actions/setup-python@v6
117
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
118
+ - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
112
119
  with:
113
120
  python-version: "3.11"
114
121
  - name: Install dependencies
115
122
  run: |
116
123
  python -m pip install --upgrade pip
117
- pip install torch --index-url https://download.pytorch.org/whl/cpu
124
+ .github/scripts/install_torch_cpu.sh
118
125
  pip install -e ".[dev]"
119
126
  # Benchmarks run for information only. There is no regression gate:
120
127
  # timing baselines recorded on one machine are not comparable to a
@@ -128,7 +135,7 @@ jobs:
128
135
  pytest benchmarks/ -v --benchmark-json=benchmark_results.json || true
129
136
  - name: Upload benchmark results
130
137
  if: always()
131
- uses: actions/upload-artifact@v7
138
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
132
139
  with:
133
140
  name: benchmark-results
134
141
  path: benchmark_results.json
@@ -137,14 +144,14 @@ jobs:
137
144
  docs:
138
145
  runs-on: ubuntu-latest
139
146
  steps:
140
- - uses: actions/checkout@v6
141
- - uses: actions/setup-python@v6
147
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
148
+ - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
142
149
  with:
143
150
  python-version: "3.11"
144
151
  - name: Install dependencies
145
152
  run: |
146
153
  python -m pip install --upgrade pip
147
- pip install torch --index-url https://download.pytorch.org/whl/cpu
154
+ .github/scripts/install_torch_cpu.sh
148
155
  pip install -e ".[docs]"
149
156
  - name: Build docs
150
157
  run: mkdocs build --strict
@@ -7,8 +7,6 @@ on:
7
7
 
8
8
  permissions:
9
9
  contents: read
10
- pages: write
11
- id-token: write
12
10
 
13
11
  concurrency:
14
12
  group: pages
@@ -18,27 +16,30 @@ jobs:
18
16
  build:
19
17
  runs-on: ubuntu-latest
20
18
  steps:
21
- - uses: actions/checkout@v6
22
- - uses: actions/setup-python@v6
19
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
20
+ - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
23
21
  with:
24
22
  python-version: "3.11"
25
23
  - name: Install dependencies
26
24
  run: |
27
25
  python -m pip install --upgrade pip
28
- pip install torch --index-url https://download.pytorch.org/whl/cpu
26
+ .github/scripts/install_torch_cpu.sh
29
27
  pip install -e ".[docs]"
30
28
  - name: Build docs
31
29
  run: mkdocs build --strict
32
- - uses: actions/upload-pages-artifact@v5
30
+ - uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5
33
31
  with:
34
32
  path: site/
35
33
 
36
34
  deploy:
37
35
  needs: build
38
36
  runs-on: ubuntu-latest
37
+ permissions:
38
+ pages: write
39
+ id-token: write
39
40
  environment:
40
41
  name: github-pages
41
42
  url: ${{ steps.deployment.outputs.page_url }}
42
43
  steps:
43
44
  - id: deployment
44
- uses: actions/deploy-pages@v5
45
+ uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5
@@ -0,0 +1,222 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v[0-9]*"
7
+ workflow_dispatch:
8
+ inputs:
9
+ ref:
10
+ description: "Existing tag/ref to build and publish (e.g. v0.1.0.dev1). Leave blank for a normal tag-triggered release."
11
+ required: false
12
+ default: ""
13
+ create_github_release:
14
+ description: "Also sign with Sigstore and create a GitHub Release (which triggers the Zenodo deposit) for this tag. Default false: PyPI publish only, for republishing an already-released tag without creating a duplicate GitHub Release. auto-tag-release.yml sets this true when it dispatches a new version's first release."
15
+ required: false
16
+ default: false
17
+ type: boolean
18
+
19
+ permissions:
20
+ contents: read
21
+
22
+ jobs:
23
+ # Privilege separation: this job holds the attestation credentials, so it
24
+ # must never install the built wheel or resolve its runtime dependency
25
+ # graph. SBOM generation (which does both) runs in the unprivileged `sbom`
26
+ # job; the SBOM attestation runs in `attest-sbom`, which installs nothing.
27
+ build:
28
+ runs-on: ubuntu-latest
29
+ permissions:
30
+ contents: read
31
+ id-token: write # provenance OIDC
32
+ attestations: write # actions/attest-build-provenance
33
+ steps:
34
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
35
+ with:
36
+ ref: ${{ github.event.inputs.ref || github.ref }}
37
+ fetch-depth: 0
38
+ - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
39
+ with:
40
+ python-version: "3.12"
41
+ cache: pip
42
+ - name: Install build tooling
43
+ run: python -m pip install --upgrade pip build
44
+ - name: Build sdist + wheel
45
+ run: python -m build
46
+ - name: Assert exactly one release wheel
47
+ shell: bash
48
+ run: |
49
+ set -euo pipefail
50
+ shopt -s nullglob
51
+ wheels=(dist/*.whl)
52
+ if (( ${#wheels[@]} != 1 )); then
53
+ echo "::error::expected exactly one release wheel, found ${#wheels[@]}"
54
+ exit 1
55
+ fi
56
+ - name: Provenance attestation (dist)
57
+ uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2
58
+ with:
59
+ subject-path: "dist/*"
60
+ - name: Upload dist artifacts
61
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
62
+ with:
63
+ name: release-dist
64
+ path: dist/
65
+
66
+ # Unprivileged by design: installing the wheel resolves and executes
67
+ # third-party package installs, so this job gets no id-token, no
68
+ # attestations, no write access of any kind.
69
+ sbom:
70
+ needs: build
71
+ runs-on: ubuntu-latest
72
+ permissions:
73
+ contents: read
74
+ steps:
75
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
76
+ with:
77
+ ref: ${{ github.event.inputs.ref || github.ref }}
78
+ - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
79
+ with:
80
+ python-version: "3.12"
81
+ cache: pip
82
+ - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
83
+ with:
84
+ name: release-dist
85
+ path: dist
86
+ - name: Generate CycloneDX SBOM from exact release wheel
87
+ shell: bash
88
+ run: |
89
+ set -euo pipefail
90
+ shopt -s nullglob
91
+ wheels=(dist/*.whl)
92
+ if (( ${#wheels[@]} != 1 )); then
93
+ echo "::error::expected exactly one release wheel, found ${#wheels[@]}"
94
+ exit 1
95
+ fi
96
+ wheel="${wheels[0]}"
97
+
98
+ python -m pip install --upgrade pip cyclonedx-bom
99
+
100
+ # Keep build tooling out of the analyzed environment. pip's --python
101
+ # option installs the exact wheel and its resolved runtime graph into
102
+ # a venv that was created without pip.
103
+ python -m venv --without-pip .sbom-runtime
104
+ python -m pip --python .sbom-runtime install "$wheel"
105
+
106
+ cyclonedx-py environment .sbom-runtime/bin/python \
107
+ --pyproject pyproject.toml \
108
+ --mc-type library \
109
+ --output-reproducible \
110
+ --output-format JSON \
111
+ --output-file sbom.cdx.json
112
+ python scripts/bind_release_sbom.py --sbom sbom.cdx.json --wheel "$wheel"
113
+ - name: Independently verify SBOM root against exact wheel
114
+ shell: bash
115
+ run: |
116
+ set -euo pipefail
117
+ shopt -s nullglob
118
+ wheels=(dist/*.whl)
119
+ if (( ${#wheels[@]} != 1 )); then
120
+ echo "::error::expected exactly one release wheel, found ${#wheels[@]}"
121
+ exit 1
122
+ fi
123
+ python scripts/bind_release_sbom.py --verify-only --sbom sbom.cdx.json --wheel "${wheels[0]}"
124
+ - name: Upload SBOM artifact
125
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
126
+ with:
127
+ name: release-sbom
128
+ path: sbom.cdx.json
129
+
130
+ # The only privileged SBOM step. It consumes the already-built wheel and the
131
+ # already-verified SBOM; it installs no packages, resolves no dependencies,
132
+ # and executes no project code. The SBOM describes the installed wheel's
133
+ # runtime closure, so it is attested to the wheel subject only — never the
134
+ # sdist.
135
+ attest-sbom:
136
+ needs: [build, sbom]
137
+ runs-on: ubuntu-latest
138
+ permissions:
139
+ contents: read
140
+ id-token: write # attestation OIDC
141
+ attestations: write # actions/attest-sbom
142
+ steps:
143
+ - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
144
+ with:
145
+ name: release-dist
146
+ path: dist
147
+ - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
148
+ with:
149
+ name: release-sbom
150
+ path: .
151
+ - uses: actions/attest-sbom@c604332985a26aa8cf1bdc465b92731239ec6b9e # v4.1.0
152
+ with:
153
+ subject-path: "dist/*.whl"
154
+ sbom-path: "sbom.cdx.json"
155
+
156
+ publish-pypi:
157
+ # Publication waits for the full integrity chain: build provenance
158
+ # (build), SBOM generation + verification (sbom), and the wheel-bound
159
+ # SBOM attestation (attest-sbom).
160
+ needs: [build, sbom, attest-sbom]
161
+ runs-on: ubuntu-latest
162
+ permissions:
163
+ contents: read
164
+ id-token: write # PyPI Trusted Publishing OIDC
165
+ environment:
166
+ name: pypi
167
+ url: https://pypi.org/project/groupoid/
168
+ steps:
169
+ - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
170
+ with:
171
+ name: release-dist
172
+ path: dist
173
+ - name: Publish to PyPI (Trusted Publishing, OIDC)
174
+ uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # release/v1
175
+ with:
176
+ packages-dir: dist
177
+ print-hash: true
178
+ # Idempotent: a re-dispatch or an out-of-band manual republish of a
179
+ # version already on PyPI should not fail the job.
180
+ skip-existing: true
181
+
182
+ sign-and-release:
183
+ needs: [build, sbom, attest-sbom]
184
+ # On a real tag push, or an explicit request via create_github_release=true
185
+ # (see auto-tag-release.yml, which dispatches this workflow with that flag
186
+ # set for a version's first release, since GitHub suppresses push-triggered
187
+ # workflow runs caused by its own GITHUB_TOKEN). A plain workflow_dispatch
188
+ # republish (create_github_release left at its false default) must NOT
189
+ # create a duplicate GitHub Release or trigger a second Zenodo deposit.
190
+ if: github.event_name == 'push' || github.event.inputs.create_github_release == 'true'
191
+ runs-on: ubuntu-latest
192
+ permissions:
193
+ contents: write # create GitHub Release
194
+ id-token: write # Sigstore signing OIDC
195
+ steps:
196
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
197
+ - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
198
+ with:
199
+ name: release-dist
200
+ path: dist
201
+ - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
202
+ with:
203
+ name: release-sbom
204
+ path: .
205
+ - name: Sign artifacts with Sigstore
206
+ uses: sigstore/gh-action-sigstore-python@790bc6befb9d733738f18d8f895854b453640ec9 # v3.5.0
207
+ with:
208
+ inputs: |
209
+ dist/*.tar.gz
210
+ dist/*.whl
211
+ - name: Create GitHub Release
212
+ uses: softprops/action-gh-release@3d0d9888cb7fd7b750713d6e236d1fcb99157228 # v3.0.2
213
+ with:
214
+ # Explicit rather than relying on ref inference: on a tag push
215
+ # github.ref_name is already the tag, but being explicit keeps this
216
+ # correct regardless of trigger type.
217
+ tag_name: ${{ github.event.inputs.ref || github.ref_name }}
218
+ generate_release_notes: true
219
+ files: |
220
+ dist/*
221
+ sbom.cdx.json
222
+ *.sigstore.json
@@ -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.dev5",
5
+ "description": "<p>Pre-alpha research prototype exploring groupoid-based aggregation for federated learning on Riemannian manifolds. The supported point-valued aggregation path uses explicit invertible point actions, a cycle-basis holonomy defect diagnostic, the cellular sheaf Laplacian, and Karcher mean aggregation via geomstats. Tangent-vector parallel transport is provided separately through Schild and pole ladder utilities.</p><p><strong>Scientific correction in v0.1.0.dev5:</strong> earlier releases described the cycle-basis holonomy statistic as a first-cohomology (H^1) norm. The implementation actually computes the maximum Frobenius deviation of holonomy from identity over the particular NetworkX cycle basis. Exact zero has a flatness interpretation under explicit connectedness, completeness, invertibility, reciprocal opposite-edge registration when both directions are supplied, and complete evaluation of every cycle emitted by the NetworkX cycle-basis routine (an argument specific to the NetworkX Paton implementation exercised here, not to arbitrary cycle bases), but the nonzero magnitude is basis-dependent and is not invariant under arbitrary invertible changes of frame. The stored preregistered benchmark values are unchanged; the historical H2 rho and permutation p-value are reinterpreted as statistics for this fixed cycle-basis defect, not for a canonical H^1 norm. This version also withdraws register_transport_from_points from the supported point-valued aggregation path: its ambient square operator is assembled from transported tangent vectors and does not generally define the invertible manifold point action that aggregation requires. Tangent-vector ladder validation remains supported. The ambient tangent-matrix helper is restricted to vector-shaped point representations. Direct registered matrices are supported only under the explicit point-action contract documented in the repository, including reciprocal opposite arrows when both orientations are stored. See CORRECTION_NOTICE.md for the full correction record.</p><p>The earlier v0.1.0.dev0 version DOI 10.5281/zenodo.20563975 remains superseded and must not be cited for results. Exact historical versions should be cited by their version-specific DOI; project-level DOI metadata is maintained through the Zenodo version family.</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
+ "holonomy",
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.21230068",
30
+ "relation": "isNewVersionOf",
31
+ "scheme": "doi"
32
+ },
33
+ {
34
+ "identifier": "https://github.com/smaniches/GROUPOID",
35
+ "relation": "isSupplementTo",
36
+ "scheme": "url"
37
+ }
38
+ ]
39
+ }