Metadata-Version: 2.4
Name: nuance-datacite
Version: 0.1.0
Summary: DataCite DOIs for NUANCE Center instruments and the data they collect, linked to NUScope seals
Author-email: Roberto dos Reis <robertomsreis@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/NUANCE-IT/NUANCE-Data-Cite
Project-URL: Repository, https://doi.datacite.org/repositories/nu.nuance
Keywords: DataCite,DOI,instrument PID,electron microscopy,NUANCE,provenance,FAIR
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.31
Requires-Dist: EMDataBridge>=0.1
Provides-Extra: dotenv
Requires-Dist: python-dotenv>=1.0; extra == "dotenv"
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: build; extra == "dev"
Requires-Dist: twine; extra == "dev"
Requires-Dist: python-dotenv>=1.0; extra == "dev"

# nuance-datacite

DataCite DOIs for **NUANCE Center instruments** and the **data they collect**, at Northwestern University
(DataCite repository [NU.NUANCE](https://doi.datacite.org/repositories/nu.nuance), prefix `10.82427`).

Created by Roberto dos Reis ([@rmsreis](https://github.com/rmsreis)), NUANCE Center.

```bash
pip install nuance-datacite
nuance-datacite instruments --check          # registry; --check asks DataCite which DOIs are public
nuance-datacite find --vendor Hitachi --model S-3400
nuance-datacite draft payload.json           # DRAFT DOI only (test DataCite unless configured)
```

- **Instrument registry** (`nuance_datacite.registry`): one entry per instrument DOI, with a rule that
  recognizes the instrument from file metadata (vendor, model, serial). NUScope records the matching DOI in
  every dataset's metadata and provenance, so the file's cryptographic seal covers it.
- **Dataset DOIs** (`nuance_datacite.payloads`): DataCite 4.5+ metadata linking the data to the instruments
  that collected it (`IsCollectedBy`), to the exact file (NUScope seal id and file SHA-256 as
  `alternateIdentifiers`), and to its creators (validated ORCID iDs, Northwestern ROR).
- **Safe client** (`nuance_datacite.DataCite`): drafts only; publishing (permanent) needs the DOI repeated as
  confirmation, and on production also `DATACITE_ALLOW_PRODUCTION_PUBLISH=1`.

Credentials are read from `DATACITE_REPOSITORY_ID`, `DATACITE_PASSWORD`, `DATACITE_PREFIX` and
`DATACITE_ENVIRONMENT` (`test` by default), from the environment or a `.env` file. Never commit them.

Add or override instruments with a JSON file at `$NUANCE_INSTRUMENTS` or `~/.nuance/instruments.json`
(same shape as `src/nuance_datacite/data/instruments.json`).
