diff --git a/CHANGELOG.md b/CHANGELOG.md index 29d9052..82c837b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# 0.2.18 (2026-06-16) + +# Improvements + +- Warn about unknown labels in `--include` and `--exclude` options of `dtc auto-curate`. + + # 0.2.17 (2026-03-31) ## New features @@ -7,7 +14,7 @@ curated areas, if a matching records does not already exist. If `--jsonpath-spec JSONPATH_SPEC` is provided two records match if they are identical after all elements that match `JSONPATH_SPEC` are removed. If - `--jsonpath-spec` is not povided, two records match if they are identical. + `--jsonpath-spec` is not provided, two records match if they are identical. ## Improvements diff --git a/dump_things_pyclient/commands/dtc_plugins/auto_curate.py b/dump_things_pyclient/commands/dtc_plugins/auto_curate.py index 620cf12..a31e4e0 100644 --- a/dump_things_pyclient/commands/dtc_plugins/auto_curate.py +++ b/dump_things_pyclient/commands/dtc_plugins/auto_curate.py @@ -332,7 +332,9 @@ def auto_curate( session=session, ) + processed_labels = set() for label in all_labels: + processed_labels.add(label) if include and label not in include: logger.debug('ignoring non-included incoming label: %s', label) continue @@ -445,6 +447,14 @@ def auto_curate( if result != 0: return result + for label_set, option_name in ((set(include), 'include'), (set(exclude), 'exclude')): + unknown_labels = label_set - processed_labels + if unknown_labels: + console.print( + f'[yellow]Warning[/yellow]: non-existing labels in --{option_name}: ' + + ', '.join(f'"{label}"' for label in unknown_labels) + ) + if create_change_set: click.echo(str(create_change_set)) elif output is not None: diff --git a/pyproject.toml b/pyproject.toml index 330ae96..a5ce86f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "dump-things-pyclient" -version = "0.2.17" +version = "0.2.18" description = "A client library and CLI commands for dump-things-services" readme = "README.md" requires-python = ">=3.11" diff --git a/uv.lock b/uv.lock index 3f29c7c..2cec1a1 100644 --- a/uv.lock +++ b/uv.lock @@ -417,7 +417,7 @@ wheels = [ [[package]] name = "dump-things-pyclient" -version = "0.2.17" +version = "0.2.18" source = { virtual = "." } dependencies = [ { name = "click" },