bobleesj commited on
Commit
421d286
·
verified ·
1 Parent(s): ab12b62

docs: make data PR prompt self-contained

Browse files
Files changed (1) hide show
  1. README.md +22 -8
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. Copy `templates/meta.json`. Fill its required fields from the files and
205
- the permission lines above. Read shape and dtype from the array or EMD.
206
- Omit optional values when unknown; do not invent them. Do not put a local
207
- filesystem path or credential in `meta.json`.
208
- 3. Download `check_meta/` and `templates/meta.json` as described above. Run
209
- `python -m check_meta <folder>`. Stop unless it prints `ok`.
210
- 4. Upload with `hf upload ... --repo-type dataset --create-pr`, using the
211
- target path above and a concise commit message.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.