feat: make USDA API key optional#17
Merged
koen-vg merged 1 commit intoJul 1, 2026
Merged
Conversation
The USDA FoodData Central key was required at workflow startup (the secrets loader raised and the config schema demanded it), even though only the retrieve_usda_nutrition rule consumes it. That rule runs only when refreshing nutrition data after adding a food, so a default build now needs no credentials at all. - secrets loader gathers whatever credentials are configured without raising; the schema no longer requires credentials or usda.api_key - retrieve_usda_nutrition raises a clear error if the key is missing, but only when the rule actually runs - data.usda.retrieve_nutrition defaults to false, so the default DAG uses the bundled data/curated/nutrition.csv and omits the rule - drop the now-unneeded credentials stub in solve_namespace and the vestigial USDA_API_KEY stub in the CI dryrun job - update docs/comments to describe the current state
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.
The USDA FoodData Central key was required at workflow startup (the secrets loader raised and the config schema demanded it), even though only the retrieve_usda_nutrition rule consumes it. That rule runs only when refreshing nutrition data after adding a food, so a default build now needs no credentials at all.