mapbox / mapbox/tilesets-cli

Enhancement: add return values to click commands

Open
#111 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
141
Forks
27
PR merge metrics
No merged PRs in 30d

Description

Return values in click do not hurt anything nor doe sit have any impact on regular CLI users. However, this would things much easier to work with if somebody wants to build another Click application on top of this.

My use case is that we will need to upload many small tileset with a similar recipe, so I am writing a script that calls this library to do so. I could use the API directly but I would use some of the nice stuff that has already been built in here (ex: upload progress, validation, conversion of files, error handling etc.). Right now I am able to invoke the commands properly (through `ctx.invoke`) without issue but I cannot really act on their result because they are only sent through echo and not returned.

If you think it is a good idea I can make a pull request to integrate that.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the Click command entry points and the ctx.invoke calls described in the issue, then inspect where command output is sent through echo. Done means callers can act on command return values while regular CLI output and existing behavior remain unchanged; verify the affected command flows with the repository's available tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.