Repository navigation
fix: show category cache rebuild notice - #106
Merged
Merged
Conversation
logger.info was never displayed (no logging config, WARNING default), so a 1-2 min categoryscheme download looked like a hang. Use logger.warning (stderr, all output modes), skip under --explain. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RCCNPJu2AbWwKkX6LjCj9A
|
[Medium impact] The PR appears safe to merge.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When the category cache has expired (7-day TTL),
siblingsandtreere-downloadcategoryscheme+categorisation. On Eurostat this took 1:56 forsiblings NAMA_10_GDP, with nothing printed in a pipe or in-o json/-o csvmode: it looked like a hang.The notice already existed in
load_categories(), but aslogger.info. The CLI does not configure logging, so Python's WARNING default hides it (effective level 30, no handlers).Change
src/opensdmx/categories.py: notice nowlogger.warning(stderr, every output mode, stdout stays clean), skipped under--explain. Text no longer says "first run", since it also fires on expiry.tests/test_categories.py: two tests (notice shown at WARNING; not shown under--explain). Both fail without the fix.Provider-agnostic: affects every provider with a category tree, INPS hub included.
Checks
OPENSDMX_CATEGORIES_CACHE_TTL=0 opensdmx -o json siblings EXR --provider ecb-> notice on stderr, valid JSON on stdout--explainon Eurostat: plan only, no notice🤖 Generated with Claude Code