Skip to content

feat: add maptool tools and install subcommands - #529

Merged
fank merged 2 commits into
mainfrom
feat/maptool-tools-install
Jul 24, 2026
Merged

feat: add maptool tools and install subcommands#529
fank merged 2 commits into
mainfrom
feat/maptool-tools-install

Conversation

@fank

@fank fank commented Jul 24, 2026

Copy link
Copy Markdown
Member

Completes the three-command map toolchain CLI:

Command Status From
maptool tools This PR Compact status table
maptool doctor PR #528 Deep diagnostics + install guide
maptool install This PR Platform-specific install instructions

maptool tools

Quick snapshot of what's installed — sorted with required tools first:

$ ocap-webserver maptool tools
Tool               Status    Path
──────────────────────────────────────────────
pmtiles              missing  - [required]
tippecanoe           ok       /usr/bin/tippecanoe [required]
gdal_translate       missing  -
...
2 found, 8 missing (exit 1)

maptool install

Prints platform-specific install instructions (auto-detects OS, same output as what maptool doctor shows at the bottom when required tools are missing). Always exits 0.

$ ocap-webserver maptool install
Installation Instructions
═════════════════════════

Debian / Ubuntu / Pop!_OS / Mint
─────────────────────────────────
...

Files

File Purpose
internal/maptoolcli/tools.go Tools subcommand + table printer
internal/maptoolcli/install.go Install subcommand (wraps printInstallHelp)
internal/maptoolcli/tools_install_test.go 11 tests for both commands
internal/maptoolcli/maptool.go Registered tools and install in dispatch
cmd/ocap-webserver/cli.go Updated root help

fank added 2 commits July 24, 2026 19:10
Completes the original three-command proposal:
  ocap-webserver maptool tools    — compact status table
  ocap-webserver maptool doctor   — deep diagnostics (PR #528)
  ocap-webserver maptool install  — platform-specific install guide

maptool tools:
- Quick status table sorted: required first, then alphabetical
- Shows found/missing for all 10 tools with path and [required] tag
- Exits 0 if all required tools present, 1 otherwise

maptool install:
- Prints platform-specific install instructions (auto-detects OS)
- Reuses the install help infrastructure from doctor.go
- Always exits 0
@github-actions

Copy link
Copy Markdown

Merging this branch will increase overall coverage

Impacted Packages Coverage Δ 🤖
github.com/OCAP2/web/cmd/ocap-webserver 27.45% (ø)
github.com/OCAP2/web/internal/maptoolcli 92.82% (+0.48%) 👍

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/OCAP2/web/cmd/ocap-webserver/cli.go 100.00% (ø) 28 28 0
github.com/OCAP2/web/internal/maptoolcli/install.go 100.00% (+100.00%) 4 (+4) 4 (+4) 0 🌟
github.com/OCAP2/web/internal/maptoolcli/maptool.go 97.25% (+0.06%) 182 (+4) 177 (+4) 5 👍
github.com/OCAP2/web/internal/maptoolcli/tools.go 100.00% (+100.00%) 33 (+33) 33 (+33) 0 🌟

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/OCAP2/web/internal/maptoolcli/tools_install_test.go

@fank
fank merged commit 23ac19c into main Jul 24, 2026
2 checks passed
@fank
fank deleted the feat/maptool-tools-install branch July 24, 2026 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant