Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Every change needs a review from a maintainer.
* @YauhenBichel
40 changes: 40 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Bug report
description: An estimate or result that does not match the README.
labels: [bug]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time. **Never attach, paste or link a real photo of
a person's skin**, here or anywhere in this repository. The pixel sizes
and options you passed, and the result you got back, are enough.
Security problems go to info@molecare.co.uk instead (see SECURITY.md).
- type: textarea
id: what
attributes:
label: What happened
description: What you called, what you expected, and what came back (the result object is ideal).
validations:
required: true
- type: textarea
id: repro
attributes:
label: Smallest example
description: A few lines of code, with the reference object and options you used.
render: ts
validations:
required: true
- type: input
id: version
attributes:
label: Package version
placeholder: '1.0.0'
validations:
required: true
- type: input
id: runtime
attributes:
label: React Native or Expo version
placeholder: 'React Native 0.80, or Expo SDK 54'
validations:
required: true
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Report a security problem privately
url: https://github.com/MoleCare/rn-scale-reference/security/advisories/new
about: Please do not open a public issue for security problems.
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Feature request
description: An idea that would make the package more useful.
labels: [enhancement]
body:
- type: markdown
attributes:
value: |
This package estimates sizes and never presents an estimate as a clinical
measurement (see CONTRIBUTING.md). Ideas that label a size as worrying,
or hide the error in an estimate, will be declined. Better tilt handling,
uncertainty estimates and clearer messages are very welcome.
- type: textarea
id: problem
attributes:
label: The problem
description: What are you trying to do that is hard today?
validations:
required: true
- type: textarea
id: idea
attributes:
label: Your idea
description: How you would like it to work, ideally with the options or API you imagine.
- type: checkboxes
id: help
attributes:
label: Can you help?
options:
- label: I would like to open a pull request for this.
35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/reference_object.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: New reference object
description: Suggest a coin, card or sticker of known size.
labels: [reference-object]
body:
- type: markdown
attributes:
value: |
Every size in this package comes from a published source, so please
include one (a mint, standards body or manufacturer page).
- type: input
id: name
attributes:
label: Object
placeholder: 'Euro 1 cent coin'
validations:
required: true
- type: input
id: size
attributes:
label: Published size in millimetres
placeholder: '16.25 mm diameter'
validations:
required: true
- type: input
id: source
attributes:
label: Source for the size
placeholder: 'https://…'
validations:
required: true
- type: textarea
id: notes
attributes:
label: Anything that affects accuracy
description: Worn edges, several versions in circulation, shiny surfaces and so on.
13 changes: 13 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## What this changes

<!-- One change per pull request. What does a user notice? -->

## Checklist

- [ ] A test for the behaviour I changed (100% coverage stays)
- [ ] A line in the top section of `CHANGELOG.md`, if a user would notice
- [ ] Stateless: no module-level `let` or `var`, no caches, no `configure()`
- [ ] Results and tables stay `Object.freeze`d
- [ ] A new reference size cites its published source
- [ ] No real photos of people
- [ ] Estimates are still shown as estimates: no clinical wording, no false precision
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
22
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# @molecare/scale-reference

[![CI](https://github.com/MoleCare/rn-scale-reference/actions/workflows/ci.yml/badge.svg)](https://github.com/MoleCare/rn-scale-reference/actions/workflows/ci.yml)
[![npm](https://img.shields.io/npm/v/@molecare/scale-reference)](https://www.npmjs.com/package/@molecare/scale-reference)
![types included](https://img.shields.io/npm/types/@molecare/scale-reference)
[![licence](https://img.shields.io/badge/licence-Apache--2.0-blue)](LICENSE)

Estimate real-world sizes in a photo from an object of known size in the same
frame: a calibration sticker or a coin. Give it the ellipse your detector found
around the reference. It returns a scale, tells you when a photo can't be used,
Expand Down
Loading