Skip to main content

scitex-repro

SciTeX

Reproducibility utilities — RNG seeding, ID generation, timestamps, array hashing.

Full Documentation · uv pip install scitex-repro[all]

pypi python docs

tests install-check cov


Problem and Solution

# Problem Solution
1 "Seed everything" requires 5+ lines of boilerplate — random.seed() + np.random.seed() + torch.manual_seed() + torch.cuda.manual_seed_all() + tf.random.set_seed() + os.environ[PYTHONHASHSEED] RandomStateManager(seed=42) — one call seeds every framework detected in the env; .reset() rewinds mid-experiment
2 Experiment run directories collide — two parallel runs overwrite each other gen_ID() + hash_array() — unique directory names like 20260423_2155_abc12345; deterministic array fingerprints for integrity checks

Installation

pip install scitex-repro

Architecture

src/scitex_repro/
├── __init__.py              # public re-exports
├── _RandomStateManager.py   # cross-framework RNG seeding (random / numpy / torch / tf)
├── _gen_ID.py               # 20260423_2155_<hash> directory IDs
├── _gen_timestamp.py        # filesystem-safe timestamps
├── _hash_array.py           # deterministic NumPy / pandas fingerprints
└── _config.py               # env-var + config defaults

1 Interfaces

Python API
from scitex_repro import RandomStateManager, gen_ID, hash_array

# Cross-framework RNG seeding
rng = RandomStateManager(seed=42)
data = rng("data").random(100)
rng.verify(data, "my_data")
rng.reset()

# Deterministic IDs and array fingerprints
exp_id = gen_ID()                         # "20260423_2155_abc12345"
fingerprint = hash_array(data)

Demo

flowchart LR
    seed["seed=42"] --> rsm["RandomStateManager"]
    rsm --> py["random"]
    rsm --> np["numpy"]
    rsm --> torch["torch (cpu+cuda)"]
    rsm --> tf["tensorflow"]
    rsm --> hashenv["PYTHONHASHSEED"]
    rsm --> data["rng('data').random(100)"]
    data --> fp["hash_array(data)"]
    rsm --> id["gen_ID()"]
    id --> dir[("20260423_2155_abc12345/")]
    fp --> integrity[("array fingerprint")]

Quick Start

from scitex_repro import RandomStateManager, gen_ID, hash_array

rng = RandomStateManager(seed=42)
data = rng("data").random(100)
print(gen_ID(), hash_array(data))

Part of SciTeX

scitex-repro is part of SciTeX. Install via the umbrella with pip install scitex[repro] to use as scitex.repro (Python) or scitex repro ... (CLI).

Four Freedoms for Research

  1. The freedom to run your research anywhere — your machine, your terms.
  2. The freedom to study how every step works — from raw data to final manuscript.
  3. The freedom to redistribute your workflows, not just your papers.
  4. The freedom to modify any module and share improvements with the community.

AGPL-3.0 — because we believe research infrastructure deserves the same freedoms as the software it runs on.

License

AGPL-3.0-only (see LICENSE).


SciTeX

Metadata

Release files for scitex-repro 0.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for scitex-repro 0.1.7
File Size Uploaded Provenance
scitex_repro-0.1.7.tar.gz 8.6 MB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for scitex-repro 0.1.7
File Interpreter ABI Platform
scitex_repro-0.1.7-py3-none-any.whl Python 3 none any Details

Total release size: 16.9 MB

Release files / scitex_repro-0.1.7.tar.gz

Download URL scitex_repro-0.1.7.tar.gz
Size 8.6 MB
Tags Source
SHA-256 checksum
How to use checksums
e12679722563343e1fd02f84208ad85b78757a0e341a84bbf7d4b2d64afd3e2e
BLAKE2b-256 checksum
How to use checksums
25c001839f1112f650b9b4e2689523014e646afcdd1efcdd8c6eb1cd819aa7b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 20, 2026.

Transparency log

Release files / scitex_repro-0.1.7-py3-none-any.whl

Download URL scitex_repro-0.1.7-py3-none-any.whl
Size 8.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
47a10da1abba543400380f82d0dfaa734b2eb193a6cf022df9fcb3e561fca7e7
BLAKE2b-256 checksum
How to use checksums
d2888a862b257032d6d4156b40a52fc0a28fbc3fa52a81947ff7b1d7c0ecf91d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 20, 2026.

Transparency log

Security for scitex-repro 0.1.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for scitex_repro-0.1.7.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 20, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page