docs: make data PR prompt self-contained
Browse files
README.md
CHANGED
|
@@ -201,14 +201,28 @@ electronmicroscopy/quantem.widget.
|
|
| 201 |
1. Confirm `hf auth whoami` prints a username. If it fails, stop and ask me
|
| 202 |
to create a Write token and run `hf auth login`, or export `HF_TOKEN`.
|
| 203 |
Do not run an interactive login yourself or write the token into a repo.
|
| 204 |
-
2.
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
|
| 211 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 212 |
5. Give me the Community URL. Do not merge. Open a GitHub PR only if a named
|
| 213 |
loader is also needed in `quantem.widget.datasets`; that PR waits until
|
| 214 |
this Hugging Face PR merges. A new widget is discuss-first.
|
|
|
|
| 201 |
1. Confirm `hf auth whoami` prints a username. If it fails, stop and ask me
|
| 202 |
to create a Write token and run `hf auth login`, or export `HF_TOKEN`.
|
| 203 |
Do not run an interactive login yourself or write the token into a repo.
|
| 204 |
+
2. Download the checker and template, then copy the template into the folder:
|
| 205 |
+
|
| 206 |
+
hf download bobleesj/quantem-data --repo-type dataset \
|
| 207 |
+
--include "check_meta/**" --include "templates/meta.json" \
|
| 208 |
+
--local-dir ./quantem-data-tools
|
| 209 |
+
cp ./quantem-data-tools/templates/meta.json <folder>/meta.json
|
| 210 |
+
|
| 211 |
+
3. Fill every required field in `<folder>/meta.json` from the files and the
|
| 212 |
+
permission lines above. Read shape and dtype from the array or EMD. Omit
|
| 213 |
+
optional values when unknown; do not invent them. Do not put a local path
|
| 214 |
+
or credential in `meta.json`. Validate it:
|
| 215 |
+
|
| 216 |
+
export PYTHONPATH="$PWD/quantem-data-tools${PYTHONPATH:+:$PYTHONPATH}"
|
| 217 |
+
python -m check_meta <folder>
|
| 218 |
+
|
| 219 |
+
Stop unless validation prints `ok`.
|
| 220 |
+
4. Open the Community pull request:
|
| 221 |
+
|
| 222 |
+
hf upload bobleesj/quantem-data <folder> \
|
| 223 |
+
widget-tutorials/<widget-or-shared>/<name>/<size>/ \
|
| 224 |
+
--repo-type dataset --create-pr \
|
| 225 |
+
--commit-message "add <widget> <name> <size> tutorial data"
|
| 226 |
5. Give me the Community URL. Do not merge. Open a GitHub PR only if a named
|
| 227 |
loader is also needed in `quantem.widget.datasets`; that PR waits until
|
| 228 |
this Hugging Face PR merges. A new widget is discuss-first.
|