`tag list | suggest | approve | reject` and `--tag` on product create/edit
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
Direzione di ricerca
Start by reading the CLI command structure and the existing product create, edit, list, and view implementations, then check how they handle RFC 9457 errors and --json. Implement the tag commands and product tag options against the specified endpoints, following their response and permission behavior. Add a CLI path to docs/using-source/create-a-data-product.md; done means the commands, options, and documentation cover the behaviors in this issue.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Pick, suggest and review the tags products carry.
Depends on source-cooperative/source.coop#648 for the /tags endpoints. Setting a product's tags already works: source-cooperative/source.coop#647 added tags to POST /products/{account_id} and PATCH /products/{account_id}/{product_id}.
tag commands
tag listanswersGET /tags: the approved tags, the listproduct list --tagsfilters on. Anyone may run it, signed in or not.tag list --pendinganswersGET /tags?pending=true: the tags awaiting review, with who suggested each and when. Only admins may list them.tag suggest <tag>answersPOST /tagswith{ "tag_id": "<tag>" }. The API trims and lowercases the tag, so print the tag it answers, not the one typed. A 201 means the tag was added and awaits review; a 200 means it already existed, which is not an error. A retry is therefore always safe.tag approve <tag>answersPATCH /tags/{tag_id}with{ "pending": false }. Admins only.tag reject <tag>answersDELETE /tags/{tag_id}, which takes the tag off every product carrying it.tag reject <tag> --replace-with <approved-tag>(ortag merge <tag> <approved-tag>) passes?replace_with=, which puts the approved tag in its place instead. Admins only. Both answer 409 for a tag that has already been approved, so they never strip an approved tag from products.
URL-encode the tag in the path: tags may hold spaces (sea%20ice).
Tags on products
product create --tag <tag>, repeatable, sendstagsas a list.product edit --tag <tag>(repeatable) replaces the product's tags with exactly those given;product edit --clear-tagssends"tags": []. Leaving both out sends notags, which keeps the product's tags as they are. If--add-tag/--remove-tagread better, they can compute the new list fromproduct view's, since the API only replaces the whole list.- A tag outside the approved list is refused with a 400 problem that names the unknown tags; print it and point at
tag suggest. A tag the product already carries is accepted even if it has since left the list.
Tags awaiting review show only to people who may edit the product, so product view shows them to the product's editors and to no one else.
As the epic says, the CLI validates nothing itself: it sends the request and shows the API's error. Errors are now RFC 9457 problems (source-cooperative/source-coop-cli#67), so a 400 lists each field's problem under errors. --json and the shared conveniences from #28 apply to tag list. Add a CLI path to the "Tags" part of docs.source.coop docs/using-source/create-a-data-product.md once these ship.
- Lingua principale
- Rust
- Stelle
- 2
- Fork
- 0
- Merge medio
- 1g 9h
- PR unite (30g)
- 22
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di source-cooperative/source-coop-cli
-
`service-account` commandsApertaenhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 28/100
source-cooperative/source-coop-cli#35 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 3/5 3-5 giorni Idoneità per principianti 22/100
source-cooperative/source-coop-cli#34 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 28/100
source-cooperative/source-coop-cli#33 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
source-cooperative/source-coop-cli#32 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 3/5 1-2 giorni Idoneità per principianti 28/100
source-cooperative/source-coop-cli#31 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di source-cooperative/source-coop-cli
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
I maintainer di solito rispondono entro 1 giorno
-
priority middle
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 62/100
KATO-Hiro/AtCoderClans#12940 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
I maintainer di solito rispondono entro 1 giorno
-
o8 next debug build aborts on Glass to Dark appearance switch (nil identifier messaged before check)Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
hurttlocker/o8#5112 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
I maintainer di solito rispondono entro 1 giorno