{"id":46296630,"url":"https://github.com/ylecoyote/reproducible-manuscript-template","last_synced_at":"2026-03-04T10:02:34.938Z","repository":{"id":325211679,"uuid":"1100233606","full_name":"ylecoyote/reproducible-manuscript-template","owner":"ylecoyote","description":"Scientific manuscript verification framework ensuring reproducibility through contract-driven testing","archived":false,"fork":false,"pushed_at":"2025-11-20T06:21:00.000Z","size":122,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-22T20:05:42.449Z","etag":null,"topics":["computational-science","manuscript-verification","python","reproducible-research","research-software","scientific-computing","scientific-workflow","testing"],"latest_commit_sha":null,"homepage":"https://ylecoyote.github.io/reproducible-manuscript-template","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ylecoyote.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-20T02:37:07.000Z","updated_at":"2025-11-20T06:21:03.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ylecoyote/reproducible-manuscript-template","commit_stats":null,"previous_names":["ylecoyote/reproducible-manuscript-template"],"tags_count":1,"template":true,"template_full_name":null,"purl":"pkg:github/ylecoyote/reproducible-manuscript-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ylecoyote%2Freproducible-manuscript-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ylecoyote%2Freproducible-manuscript-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ylecoyote%2Freproducible-manuscript-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ylecoyote%2Freproducible-manuscript-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ylecoyote","download_url":"https://codeload.github.com/ylecoyote/reproducible-manuscript-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ylecoyote%2Freproducible-manuscript-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30078307,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T08:01:56.766Z","status":"ssl_error","status_checked_at":"2026-03-04T08:00:42.919Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["computational-science","manuscript-verification","python","reproducible-research","research-software","scientific-computing","scientific-workflow","testing"],"created_at":"2026-03-04T10:02:33.732Z","updated_at":"2026-03-04T10:02:34.865Z","avatar_url":"https://github.com/ylecoyote.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Reproducible Manuscript Template 🛡️\n\n\u003e **\"Unit Testing for Science\"**\n\n[![Pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit\u0026logoColor=white)](https://github.com/pre-commit/pre-commit)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![GitHub Pages](https://img.shields.io/badge/docs-GitHub%20Pages-blue)](https://ylecoyote.github.io/reproducible-manuscript-template)\n[![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)\n\n## The Problem\nIn scientific publishing, there is a dangerous gap between your **Code** (analysis scripts) and your **Text** (manuscript/README).\n\n1. You run an analysis and get `efficiency = 82.5%`.\n2. You write \"We achieved 82.5% efficiency\" in your LaTeX/Markdown manuscript.\n3. You improve the code, and the result changes to `84.1%`.\n4. **You forget to update the text.**\n5. *Result:* Internal inconsistency, reviewer confusion, or retraction.\n\n## The Solution\nThis repository treats your manuscript like software. It enforces a **Contract** between your data and your text.\n\n* **Single Source of Truth:** All numbers live in `numerical_claims.yaml`.\n* **Automated Verification:** A script checks your data/figures against the contract.\n* **Continuous Integration:** `git commit` is blocked if the numbers don't match.\n\n---\n\n## 🚀 Quick Start\n\n**New to this?** See the [complete tutorial](TUTORIAL.md) for a step-by-step walkthrough with examples.\n\n### 1. Install Dependencies\nYou need Python 3 and `pre-commit`.\n\n```bash\npip install pyyaml pandas pre-commit\npre-commit install\n```\n\n### 2. Define Your Contract\n\nEdit `numerical_claims.yaml`. This is where you state the results you expect to see in your paper.\n\n```yaml\nresults:\n  experiment_a:\n    mean_efficiency: 0.854\n    p_value: 0.04\n```\n\n### 3. Run the Verification\n\nRun the script manually to check the status of your repository:\n\n```bash\npython3 verify_manuscript.py\n```\n\n**Success Output:**\n\n```text\n================================================================================\nMANUSCRIPT VERIFICATION REPORT\n================================================================================\n\nRepository: /path/to/your/project\nChecks run: 2\nTime: 0.01s\n\n✅ ALL CHECKS PASSED\n\n   Passed:   2/2\n\nCategory: data\n  ✅ [DAT_001] Experiment A mean efficiency\n\nCategory: figures\n  ✅ [FIG_001] Figure package integrity\n\n================================================================================\n✨ SUCCESS: Manuscript is consistent.\n================================================================================\n```\n\n**Failure Output (The Safety Net):**\n\n```text\n================================================================================\nMANUSCRIPT VERIFICATION REPORT\n================================================================================\n\nRepository: /path/to/your/project\nChecks run: 2\nTime: 0.01s\n\n❌ VERIFICATION FAILED\n\n   Passed:   1/2\n   Errors:   1\n\nCategory: data\n  ❌ [DAT_001] Experiment A mean efficiency\n     Details: Calculated 0.821, Expected 0.854 (diff 0.0330)\n     Hint: Update numerical_claims.yaml or regenerate data\n\nCategory: figures\n  ✅ [FIG_001] Figure package integrity\n\n================================================================================\n⛔ FAILED: Critical inconsistencies detected.\n================================================================================\n```\n\n**Advanced Options:**\n\n```bash\n# Output JSON for CI/CD integration\npython3 verify_manuscript.py --json\n\n# Run only specific categories\npython3 verify_manuscript.py --only figures data\n\n# Combine flags\npython3 verify_manuscript.py --only figures --json\n```\n\n-----\n\n## 📂 Repository Structure\n\n```text\n.\n├── numerical_claims.yaml   # The Contract (Single Source of Truth)\n├── verify_manuscript.py    # The Enforcer (Verification Script)\n├── .pre-commit-config.yaml # The Automation (Git Hook)\n├── data/                   # Data files (raw, processed, results)\n├── scripts/                # Analysis code\n├── figures/                # Plots + JSON metadata\n└── docs/                   # Documentation\n    ├── index.md            # Project manifesto (GitHub Pages)\n    └── development/        # Design docs (for contributors)\n```\n\n  * `numerical_claims.yaml`: **The Brain.** The single source of truth for all numbers.\n  * `verify_manuscript.py`: **The Enforcer.** Generic framework that validates artifacts against the YAML.\n  * `data/`: Raw and processed data files (CSV, JSON, etc.).\n  * `scripts/`: Your analysis code. (Should output data/figures).\n  * `figures/`: Generated plots.\n      * *Best Practice:* Have your scripts output a sidecar JSON file (e.g., `fig1.json`) containing the raw numbers plotted. The verifier checks this metadata.\n\n## 🛡️ How to Customize\n\n### Adding a New Check\n\nOpen `verify_manuscript.py` and add a function with the `@framework.register_check` decorator:\n\n```python\n@framework.register_check(\n    id=\"MY_CHECK_001\",\n    name=\"P-value threshold check\",\n    category=\"statistics\",\n    severity=\"ERROR\"  # or \"WARNING\" or \"INFO\"\n)\ndef check_p_values(claims: Dict) -\u003e CheckResult:\n    \"\"\"Verify p-values meet significance threshold\"\"\"\n    # 1. Load your data\n    df = pd.read_csv(DATA_DIR / \"results.csv\")\n\n    # 2. Get expected value from YAML\n    expected = claims['results']['experiment_a']['p_value']\n    threshold = claims['tolerances'].get('p_value', 0.05)\n\n    # 3. Calculate actual value\n    actual_p = df['p_value'].min()\n\n    # 4. Compare\n    passed = actual_p \u003c threshold\n\n    # 5. Return result\n    return CheckResult(\n        id=\"MY_CHECK_001\",\n        name=\"P-value threshold check\",\n        category=\"statistics\",\n        severity=\"ERROR\",\n        passed=passed,\n        details=f\"Min p-value: {actual_p:.4f}, Threshold: {threshold:.4f}\",\n        hint=\"Review statistical analysis\" if not passed else \"\"\n    )\n```\n\n**Categories**: Group related checks (e.g., `\"data\"`, `\"figures\"`, `\"statistics\"`, `\"results\"`). This allows selective testing with `--only category`.\n\n**Severity Levels**:\n- `ERROR`: Critical issues that block manuscript submission\n- `WARNING`: Issues that should be fixed but don't block submission\n- `INFO`: Advisory notices (don't cause verification to fail)\n\n## 🤝 Contributing\n\nFork this template to create your own reproducible research repository. If you find a bug in the verification framework, pull requests are welcome.\n\n**For contributors**: See [docs/development/](docs/development/) for design rationale and architecture documentation.\n\n## License\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fylecoyote%2Freproducible-manuscript-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fylecoyote%2Freproducible-manuscript-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fylecoyote%2Freproducible-manuscript-template/lists"}