Metadata-Version: 2.4
Name: share-check
Version: 0.1.0
Summary: Pre-deposit scientific dataset linter and SHARE 2.0 (0-100) readiness auditor with zero runtime dependencies.
Author: ConductScience Foundation
Author-email: Shuhan He <foundation@conductscience.com>
License: MIT
Project-URL: Homepage, https://conductscience-foundation.github.io/share-check/
Project-URL: Repository, https://github.com/ConductScience-Foundation/share-check
Project-URL: Issues, https://github.com/ConductScience-Foundation/share-check/issues
Project-URL: ShareScore, https://sharescore.org
Keywords: open-science,fair-data,share-score,data-sharing,nih-dmsp,ro-crate,reproducibility
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Dynamic: license-file

<p align="center">
  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/ConductScience-Foundation/share-check/main/assets/banner-dark.svg">
    <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/ConductScience-Foundation/share-check/main/assets/banner-light.svg">
    <img alt="share-check — Pre-Deposit Scientific Dataset Linter and SHARE 2.0 Readiness Auditor" src="https://raw.githubusercontent.com/ConductScience-Foundation/share-check/main/assets/banner-light.svg" width="100%">
  </picture>
</p>

<p align="center">
  <a href="https://github.com/ConductScience-Foundation/share-check/actions/workflows/ci.yml"><img alt="CI Status" src="https://github.com/ConductScience-Foundation/share-check/actions/workflows/ci.yml/badge.svg"></a>
  <a href="https://pypi.org/project/share-check/"><img alt="PyPI" src="https://img.shields.io/pypi/v/share-check?color=1E42A8&labelColor=0F172A"></a>
  <img alt="Runtime Dependencies: 0" src="https://img.shields.io/badge/runtime%20deps-0%20(stdlib)-059669?labelColor=0F172A">
  <img alt="Python 3.10+" src="https://img.shields.io/badge/python-3.10%2B-1E42A8?labelColor=0F172A">
  <img alt="License MIT" src="https://img.shields.io/badge/license-MIT-0F172A?labelColor=0F172A">
</p>

<p align="center">
  <a href="https://conductscience-foundation.github.io/share-check/">Live Browser Linter</a> &middot;
  <a href="#quickstart">Quickstart</a> &middot;
  <a href="#before-vs-after">Before vs. After</a> &middot;
  <a href="#use-as-a-github-action">GitHub Action</a> &middot;
  <a href="#what-share-check-evaluates">25-Signal Matrix</a> &middot;
  <a href="https://sharescore.org">ShareScore</a>
</p>

# share-check

> **Point `share-check` at any local dataset folder before uploading to Zenodo, Dryad, OSF, Figshare, or GitHub -> get an instant SHARE 2.0 pre-deposit score (`0-100`), a prioritized `+4 pt` fix list, SHA-256 `datapackage.json` scaffolding, and a CI GitHub Action.** Pure Python 3.10+ stdlib (**0 runtime dependencies**), zero uploads, MIT licensed.

Built by **[Shuhan He](https://github.com/ShuhanCS)** (`https://github.com/ShuhanCS`) and **[ConductScience](https://conductscience.com)** (`https://conductscience.com`), published through **[ConductScience Foundation](https://github.com/ConductScience-Foundation)** (`https://conductsciencefoundation.org`).

<p align="center">
  <sub>ATTRIBUTED TO &amp; SUPPORTED BY</sub>
  <br/><br/>
  <a href="https://conductscience.com"><picture><source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/ConductScience-Foundation/share-check/main/assets/cs-badge-dark.svg"><img alt="ConductScience" src="https://raw.githubusercontent.com/ConductScience-Foundation/share-check/main/assets/cs-badge-light.svg" height="38" align="middle"></picture></a>&nbsp;&nbsp;&nbsp;<a href="https://github.com/ShuhanCS"><picture><source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/ConductScience-Foundation/share-check/main/assets/shuhancs-badge-dark.svg"><img alt="Shuhan He (@ShuhanCS)" src="https://raw.githubusercontent.com/ConductScience-Foundation/share-check/main/assets/shuhancs-badge-light.svg" height="38" align="middle"></picture></a>
</p>

---

## How It Works

<p align="center">
  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/ConductScience-Foundation/share-check/main/assets/workflow-dark.svg">
    <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/ConductScience-Foundation/share-check/main/assets/workflow-light.svg">
    <img alt="share-check Pre-Deposit Dataset Linting Workflow" src="https://raw.githubusercontent.com/ConductScience-Foundation/share-check/main/assets/workflow-light.svg" width="100%">
  </picture>
</p>

---

## Try It Live in Your Browser (Zero Install, Zero Upload)

**Live Browser Linter:** https://conductscience-foundation.github.io/share-check/

Select any local dataset folder in your browser (or click **Load Deposit-Ready Demo**) to inspect all 25 SHARE 2.0 signals locally, filter by status, copy your README badge, and download JSON or Markdown receipts without uploading a single byte:

<p align="center">
  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/ConductScience-Foundation/share-check/main/assets/ui-webapp-dark.png">
    <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/ConductScience-Foundation/share-check/main/assets/ui-webapp-light.png">
    <img alt="share-check Zero-Upload Browser Linter (Light and Dark Mode)" src="https://raw.githubusercontent.com/ConductScience-Foundation/share-check/main/assets/ui-webapp-light.png" width="96%">
  </picture>
</p>

---

## Before vs. After

| Raw Lab Folder (`4 / 100`) — Flagged Issues & `+4 pt` Fixes | Deposit-Ready Package (`92 / 100` Local Ceiling) |
| --- | --- |
| ![Raw Lab Folder 4/100](https://raw.githubusercontent.com/ConductScience-Foundation/share-check/main/assets/ui-before-light.png) | ![Deposit-Ready Package 92/100](https://raw.githubusercontent.com/ConductScience-Foundation/share-check/main/assets/ui-webapp-light.png) |

---

## Why `share-check`?

Researchers usually discover missing licenses, proprietary spreadsheets (`.xlsx`, `.mat`, `.sav`, `.pzfx`), opaque unindexed `.zip` blobs, generic filenames (`final_v2_new.xlsx`), or missing ORCID/funding metadata *after* minting a permanent DOI.

`share-check` catches those issues in under one second on your laptop or in CI, before you deposit:

- **Aligned with SHARE 2.0 (`25 signals x 4 points`, fixed denominator):** Never reweights missing signals. Repository-assigned deposit signals (`A1` access status, `A4` embargo) are honestly marked `not_evaluable` locally, giving a transparent local ceiling of **92 / 100**.
- **Concrete evidence & fix list:** Every signal cites the exact file matched (or the exact `+4 pts` action needed to pass).
- **1-command metadata scaffolding (`--init-metadata`):** Generates a Frictionless `datapackage.json` with SHA-256 checksums for every file plus a starter `CITATION.cff`.
- **Drop-in GitHub Action:** Gate research repository PRs with `--min-score` and publish a summary table into `$GITHUB_STEP_SUMMARY`.

---

## Quickstart

### Install CLI (Zero External Dependencies)

```bash
pip install share-check
```

Or install from source for development:

```bash
git clone https://github.com/ConductScience-Foundation/share-check.git
cd share-check
python -m pip install -e ".[dev]"
```

### Audit Any Local Dataset Folder

```bash
# Audit the bundled deposit-ready example (92/100):
share-check examples/strong_study

# Audit the bundled raw lab folder example (0-4/100):
share-check examples/needs_work_study

# Generate JSON receipt + Markdown report + README badge + CI score gate:
share-check ./my_dataset \
  --json share_receipt.json \
  --markdown SHARE_REPORT.md \
  --min-score 60

# Scaffold datapackage.json (with SHA-256 checksums) + CITATION.cff if missing:
share-check ./my_dataset --init-metadata
```

<details>
<summary>Inspect real terminal output &amp; JSON receipt format</summary>

```text
SHARE Pre-Deposit Audit  |  Score: 92/100 (local ceiling: 92/100)
Target: ./examples/strong_study  (5 files, 2,950 bytes)
Buckets: S=20/20  H=20/20  A=12/20  R=20/20  E=20/20
Inventory SHA-256: ea7a3c49d52ba76f...

Signal Audit (25 signals x 4 points, fixed denominator):
  S1 [PASS +4] Geographic context -- README.md (Geographic coverage)
  S2 [PASS +4] Temporal context -- README.md (2026-01-01 to 2026-01-14)
  ...
  A1 [REPO  0] Access status
  A2 [PASS +4] License clarity -- LICENSE
  A3 [PASS +4] License permissiveness -- LICENSE (CC-BY-4.0)
  A4 [REPO  0] No embargo
  A5 [PASS +4] Format openness -- All 3 files use open formats
  R1 [PASS +4] Documentation artifact -- README.md
  R2 [PASS +4] Analysis code -- 1 script/notebook file(s), e.g. scripts/compute_drift.py
  R3 [PASS +4] Package manifest -- datapackage.json
  R4 [PASS +4] Transparent packaging -- Files are directly inspectable
  R5 [PASS +4] Meaningful filenames -- All 3 data/code filenames are descriptive
```

</details>

---

## Use as a GitHub Action

Add this step to any scientific data or code repository workflow:

```yaml
- uses: actions/checkout@v4
- uses: ConductScience-Foundation/share-check@v0.1.0
  with:
    path: "."
    min-score: "60"
    markdown-out: "SHARE_REPORT.md"
```

---

## What `share-check` Evaluates

| Bucket | Local Signals Evaluated | Repository-Assigned at Deposit |
| --- | --- | --- |
| **S · Stewardship** (`20 pts`) | `S1` Geographic context, `S2` Temporal context, `S3` Contributor roles (CRediT), `S4` Subject keywords, `S5` Ethics/IRB/IACUC statement | None |
| **H · Harmonization** (`20 pts`) | `H1` Methods section, `H2` Author ORCID, `H3` Org ROR ID, `H4` References (DOIs), `H5` Description quality (>= 150 words) | None |
| **A · Access** (`20 pts`) | `A2` License clarity, `A3` Permissive license (CC0/CC-BY/MIT/Apache/BSD), `A5` Open file formats (flags `.xlsx`, `.sav`, `.mat`, `.pzfx`, `.czi`, etc.) | `A1` Access status, `A4` No embargo (`not_evaluable` locally) |
| **R · Reusability** (`20 pts`) | `R1` README/codebook, `R2` Analysis scripts/notebooks, `R3` Package manifest/checksums, `R4` Transparent packaging (flags unindexed `.zip`/`.rar`/`.7z`), `R5` Descriptive filenames | None |
| **E · Engagement** (`20 pts`) | `E1` Related paper/preprint DOI, `E2` Related repo/data URL, `E3` Funding/grant IDs, `E4` Version/changelog, `E5` Community standard (RO-Crate/Frictionless/BIDS/NWB/OME-TIFF) | None |

### Scope Boundary

- **In scope:** fast, deterministic, offline pre-deposit linting of local dataset folders, SHA-256 `datapackage.json` + `CITATION.cff` scaffolding, and CI quality gates.
- **Out of scope:** official post-deposit repository scoring or S-Index ranking (use https://github.com/ConductScience-Foundation/share-framework, https://github.com/ConductScience-Foundation/share-implementation, and https://sharescore.org).

---

## Running Tests

```bash
python -m pip install -e ".[dev]"
python -m pytest -v
```

---

## Attribution, Ecosystem Links & Citation

- **Repository:** https://github.com/ConductScience-Foundation/share-check
- **Live Browser Linter:** https://conductscience-foundation.github.io/share-check/
- **SHARE Framework (core scorer):** https://github.com/ConductScience-Foundation/share-framework
- **SHARE Implementation:** https://github.com/ConductScience-Foundation/share-implementation
- **SHARE Pledge Registry:** https://github.com/ConductScience-Foundation/share-pledges
- **ShareScore Live Platform:** https://sharescore.org
- **ConductScience:** https://conductscience.com
- **ConductScience Open Research:** https://conductscience.org
- **ConductScience Foundation:** https://conductsciencefoundation.org
- **Author:** Shuhan He (https://github.com/ShuhanCS, ORCID: https://orcid.org/0000-0002-9902-5077)
- **License:** MIT ([LICENSE](LICENSE))
- **Citation:** See [CITATION.cff](CITATION.cff).
