Spectral-resonance mechanism research package: home of the Attested Multi-Source Collector (AMSC) framework — Mathematical Provenance Record v1 on-disk format, descriptor TOML loader, six adapters (html/json/csv/netcdf/geotiff/literature), universal catalog bridge with register_attested_root cross-package overlay, and schema-gap-driven trigger. Pure Python.
Project description
srmech
Status: v0.1.0 (Phase 2 bootstrap — Task #197 of the AMSC-to-srmech refactor)
srmech (spectral-resonance mechanism) is a research package. As of v0.1.0 it ships the Attested Multi-Source Collector (AMSC) framework — the Mathematical Provenance Record (MPR) v1 on-disk format, descriptor TOML loader, six fetch/parse adapters, and a universal catalog bridge surface that downstream packages register their own catalog SSOTs with at import time.
The package was extracted from ephemerides-spectral's _research/ mirror in Task #197 so that other spectral-research packages can consume the AMSC framework without depending on ephemerides-spectral. The catalog SSOTs themselves do NOT migrate — each downstream package registers its own root via srmech.amsc.catalog.register_attested_root(path, source=...).
Public API
from srmech.amsc import (
MPRRecord, MPR_SCHEMA_VERSION, read_ndjson, write_ndjson, sha256_bytes,
Descriptor, load_descriptor, discover_descriptors, render_template, descriptor_hash,
list_attested_sources, get_attested_dataset, get_attested_descriptor,
attestation_audit, register_attested_root, list_registered_roots,
use_local_kernel, clear_local_kernel, get_local_kernel_state,
)
Cross-package catalog registration
The load-bearing API for cross-package use:
from pathlib import Path
from srmech.amsc import catalog as _amsc_catalog
_amsc_catalog.register_attested_root(
Path(__file__).resolve().parent / "_research" / "attested",
source="ephemerides-spectral",
)
Call this once at package-import time. Subsequent list_attested_sources(), get_attested_dataset(), etc. enumerate the union of srmech's own amsc/attested/ plus every registered root, in registration order. Duplicate source_key resolves first-registered-wins with a warning.
Adapter classes
Six adapters cover the realistic source space:
| adapter | class | network? |
|---|---|---|
html_scraper |
fetched | yes (BeautifulSoup) |
json_api |
fetched | yes (paginated JSON) |
csv_bulk |
fetched | yes (CSV/XYZ bulk) |
netcdf_grid |
fetched | stub (gated behind extras) |
geotiff_bbox |
fetched | stub (gated behind extras) |
literature_curated |
curated | no (NDJSON committed directly) |
The curated class never touches the network: rows are committed as data-only NDJSON and srmech synthesises full MPR attestation blocks at read time from each row's per-row DOI.
Install
pip install srmech # core (no jsonschema, no network adapters)
pip install srmech[validation] # adds jsonschema for strict data-block validation
pip install srmech[collectors] # adds requests + beautifulsoup4 for fetched adapters
pip install srmech[dev] # everything
License
GPL-3.0-or-later. See LICENSE.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file srmech-0.1.0.tar.gz.
File metadata
- Download URL: srmech-0.1.0.tar.gz
- Upload date:
- Size: 43.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e0f3c94d8642df0278397293336f3d6895b01055a64c8dbc391ef5269b1cd28
|
|
| MD5 |
073989cf4b3c7a5efc94429eb23a42ba
|
|
| BLAKE2b-256 |
2a6178260d9586af6424f5652fd40692c42a81e66aef95655e606b7b548bc66b
|
Provenance
The following attestation bundles were made for srmech-0.1.0.tar.gz:
Publisher:
srmech-publish.yml on lemonforest/mlehaptics
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
srmech-0.1.0.tar.gz -
Subject digest:
1e0f3c94d8642df0278397293336f3d6895b01055a64c8dbc391ef5269b1cd28 - Sigstore transparency entry: 1526248381
- Sigstore integration time:
-
Permalink:
lemonforest/mlehaptics@f8b44a955d749bc585926347de55af022ba68bd8 -
Branch / Tag:
refs/tags/srmech-v0.1.0 - Owner: https://github.com/lemonforest
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
srmech-publish.yml@f8b44a955d749bc585926347de55af022ba68bd8 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file srmech-0.1.0-py3-none-any.whl.
File metadata
- Download URL: srmech-0.1.0-py3-none-any.whl
- Upload date:
- Size: 44.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
84e6b9fba7fa2c627a47378cf61a611fe5f6ee7a48acab43bbd3774d0f983958
|
|
| MD5 |
2be35b76fe7b80f6718dda9a017efdff
|
|
| BLAKE2b-256 |
3f822036afd9f6d4346f9f230360f09f1217ad78031970141d87779335f8af64
|
Provenance
The following attestation bundles were made for srmech-0.1.0-py3-none-any.whl:
Publisher:
srmech-publish.yml on lemonforest/mlehaptics
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
srmech-0.1.0-py3-none-any.whl -
Subject digest:
84e6b9fba7fa2c627a47378cf61a611fe5f6ee7a48acab43bbd3774d0f983958 - Sigstore transparency entry: 1526248621
- Sigstore integration time:
-
Permalink:
lemonforest/mlehaptics@f8b44a955d749bc585926347de55af022ba68bd8 -
Branch / Tag:
refs/tags/srmech-v0.1.0 - Owner: https://github.com/lemonforest
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
srmech-publish.yml@f8b44a955d749bc585926347de55af022ba68bd8 -
Trigger Event:
workflow_dispatch
-
Statement type: