Skip to content

Prepare scale-reference for open source - #1

Merged
YauhenBichel merged 1 commit into
mainfrom
chore/prepare-open-source
Sep 13, 2026
Merged

YauhenBichel merged 1 commit into
mainfrom
chore/prepare-open-source

Conversation

@YauhenBichel

Copy link
Copy Markdown
Member

Second of the three packages going public (photo-quality, scale-reference, health-data). This PR does not change the repository's visibility and does not publish anything.

Fixes from the pre-publish review

Problem Fix
The UK £1 was listed at 23.03 mm. The Royal Mint gives 23.43 mm. Corrected.
The £1 (12 sides) and the 20p (seven-sided equal-width curve) were marked exact, but an ellipse fit doesn't match a polygon exactly. Both are exact: false. The round coins and the sticker are unchanged.
getConfig() copied the catalog, but the entries were shared objects, so changing one diameter changed it for the whole app. Each default entry is frozen.
The refusal message said "square to the skin". "square to the subject".

exact isn't read anywhere in the code, and the MoleCare app only uses STICKER_10MM, so nothing in the app changes.

What a public package needs

  • README, written for everyone: the millimetres are estimates, not measurements, not validated for clinical use. There's a Limits section (height difference, tilt, lens distortion, detection, shape), and the reference table with sizes and exact.
  • CONTRIBUTING, with the firm rule: never present an estimate as a clinical measurement. It also covers adding a reference with its published source.
  • CODE_OF_CONDUCT and SECURITY, adapted from MoleCare's public repos.
  • publishConfig.access: public and neutral keywords.
  • CI: tests on Node 20 and 22, plus a check that the tarball contains only the expected files.
  • Release: trusted publishing from a GitHub Release. It's the same workflow as photo-quality (rn-photo-quality#1), whose CI already passed.

How it was checked

  • 19 tests (was 17). Both new cases fail on the old table.
  • Tarball check: 7 files, all expected.

Before the first release (needs the owner)

Same as photo-quality:

  1. Create the npm organisation molecare.
  2. Do the first npm publish --access public from a clean checkout.
  3. Add the trusted publisher: MoleCare / rn-scale-reference / release.yml / environment npm.
  4. Make the repository public.

🤖 Generated with Claude Code

Fixes found in the pre-publish review, and what a public package needs.

Fixes:
- The UK £1 was listed at 23.03 mm; the Royal Mint gives 23.43 mm. It is
  12-sided and the 20p is seven-sided, so an ellipse fit does not match
  them exactly: both are now `exact: false`. The round coins are unchanged.
- Default reference entries were shared objects: changing one diameter
  changed it for the whole app. Each entry is frozen now.
- Neutral wording ("square to the subject").

Public-package pieces:
- README rewritten: millimetres are estimates, not measurements, and are
  not validated for clinical use; a Limits section lists the error sources
  (height difference, tilt, lens distortion, detection, shape); the
  reference table with sizes and `exact`.
- CONTRIBUTING (the estimate-not-measurement rule, how to add a reference
  with its source), CODE_OF_CONDUCT, SECURITY for a public repository.
- publishConfig.access public; neutral keywords.
- CI (Node 20 and 22, tarball file check) and a release workflow that
  publishes with npm trusted publishing. Actions pinned by commit SHA.

Tests: 19 (was 17); both new cases fail on the old table.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@YauhenBichel
YauhenBichel merged commit 6783ad8 into main Sep 13, 2026
3 checks passed
@YauhenBichel
YauhenBichel deleted the chore/prepare-open-source branch September 13, 2026 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant