Skip to content

Commit

Permalink
Clean up mbtiles tool output (#1048)
Browse files Browse the repository at this point in the history
* Now by default mbtiles will not print internal warnings (e.g. that
something is taking too long to execute)
* remove mbtiles --help test - not really needed, but adds complexity
because it has to be updated every time a version changes.
  • Loading branch information
nyurik authored Dec 8, 2023
1 parent dc5fef9 commit 7ab3f5e
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 25 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion mbtiles/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ lints.workspace = true

[package]
name = "mbtiles"
version = "0.8.2"
version = "0.8.3"
authors = ["Yuri Astrakhan <[email protected]>", "MapLibre contributors"]
description = "A simple low-level MbTiles access and processing library, with some tile format detection and other relevant heuristics."
keywords = ["mbtiles", "maps", "tiles", "mvt", "tilejson"]
Expand Down
6 changes: 3 additions & 3 deletions mbtiles/src/bin/mbtiles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub struct Args {

#[derive(Subcommand, PartialEq, Eq, Debug)]
enum Commands {
/// Show MBTiels file summary statistics
/// Show MBTiles file summary statistics
#[command(name = "summary", alias = "info")]
Summary { file: PathBuf },
/// Prints all values in the metadata table in a free-style, unstable YAML format
Expand All @@ -37,7 +37,7 @@ enum Commands {
/// Value to read
key: String,
},
/// Sets a single value in the MBTiles' file metadata table or deletes it if no value.
/// Sets a single value in the MBTiles metadata table or deletes it if no value.
#[command(name = "meta-set")]
MetaSetValue {
/// MBTiles file to modify
Expand Down Expand Up @@ -77,7 +77,7 @@ enum Commands {

#[tokio::main]
async fn main() {
let env = env_logger::Env::default().default_filter_or("info");
let env = env_logger::Env::default().default_filter_or("mbtiles=info");
env_logger::Builder::from_env(env)
.format_indent(None)
.format_module_path(false)
Expand Down
17 changes: 0 additions & 17 deletions tests/expected/mbtiles/help.txt

This file was deleted.

1 change: 0 additions & 1 deletion tests/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,6 @@ if [[ "$MBTILES_BIN" != "-" ]]; then

set -x

$MBTILES_BIN --help 2>&1 | tee "$TEST_OUT_DIR/help.txt"
$MBTILES_BIN summary ./tests/fixtures/mbtiles/world_cities.mbtiles 2>&1 | tee "$TEST_OUT_DIR/summary.txt"
$MBTILES_BIN meta-all --help 2>&1 | tee "$TEST_OUT_DIR/meta-all_help.txt"
$MBTILES_BIN meta-all ./tests/fixtures/mbtiles/world_cities.mbtiles 2>&1 | tee "$TEST_OUT_DIR/meta-all.txt"
Expand Down

0 comments on commit 7ab3f5e

Please sign in to comment.