@@ -10,7 +10,7 @@ Gaggle supports configuration via environment variables to customize its behavio
1010
1111- ** Description** : Directory path for caching downloaded Kaggle datasets
1212- ** Type** : String (path)
13- - ** Default** : ` $XDG_CACHE_HOME/gaggle_cache ` (typically ` ~/.cache/gaggle_cache ` )
13+ - ** Default** : ` $XDG_CACHE_HOME/gaggle ` (typically ` ~/.cache/gaggle ` )
1414- ** Example** :
1515 ``` bash
1616 export GAGGLE_CACHE_DIR=" /var/cache/gaggle"
@@ -144,9 +144,10 @@ These settings control the wait behavior when a download is already in progress.
144144 - ** Type** : Boolean (` 1` , ` true` , ` yes` , ` on` to enable)
145145 - ** Default** : ` false`
146146 - ** Effects** :
147- - gaggle_download(...) fails if the dataset isn’t cached.
148- - Version checks use cached ` .downloaded` metadata when available; otherwise return " unknown" .
149- - Search and metadata calls will still attempt network; consider avoiding them in offline mode.
147+ - ` gaggle_download(...)` fails if the dataset isn’t cached.
148+ - ` gaggle_version_info` reports ` latest_version` as " unknown" if no cache metadata exists.
149+ - ` gaggle_is_current` and other version checks use cached ` .downloaded` metadata when available.
150+ - ` gaggle_search` and ` gaggle_info` also fail fast in offline mode (no network attempts).
150151 - ** Example** :
151152 ` ` ` bash
152153 export GAGGLE_OFFLINE=1
@@ -187,7 +188,7 @@ export GAGGLE_HTTP_TIMEOUT=120 # 2 minutes
187188export GAGGLE_HTTP_RETRY_ATTEMPTS=5 # Retry up to 5 times
188189export GAGGLE_HTTP_RETRY_DELAY_MS=2000 # 2 second initial delay
189190export GAGGLE_HTTP_RETRY_MAX_DELAY_MS=30000 # Cap backoff at 30s
190- export GAGGLE_LOG_LEVEL=WARN # Production logging (planned)
191+ export GAGGLE_LOG_LEVEL=WARN # Production logging
191192
192193## Set Kaggle credentials
193194export KAGGLE_USERNAME="your-username"
@@ -202,7 +203,7 @@ export KAGGLE_KEY="your-api-key"
202203` ` ` bash
203204# # Development setup with verbose logging
204205export GAGGLE_CACHE_DIR=" ./dev-cache"
205- export GAGGLE_LOG_LEVEL=DEBUG # # Detailed debug logs (planned)
206+ export GAGGLE_LOG_LEVEL=DEBUG # # Detailed debug logs
206207export GAGGLE_HTTP_TIMEOUT=10 ## Shorter timeout for dev
207208export GAGGLE_HTTP_RETRY_ATTEMPTS=1 ## Fail fast in development
208209export GAGGLE_HTTP_RETRY_DELAY_MS=250 ## Quick retry
@@ -230,10 +231,11 @@ export GAGGLE_HTTP_RETRY_MAX_DELAY_MS=60000 ## Cap at 60s
230231export GAGGLE_OFFLINE=1
231232
232233# Attempt to download a dataset (will fail if not cached)
233- gaggle download username/dataset-name
234+ SELECT gaggle_download( ' username/dataset-name' ) ;
234235
235- # Querying metadata or searching will still attempt network access
236- gaggle info username/dataset-name
236+ # Querying metadata or searching will fail fast in offline mode
237+ SELECT gaggle_info(' username/dataset-name' );
238+ SELECT gaggle_search(' keyword' , 1, 10);
237239` ` `
238240
239241# ## Configuration Verification
@@ -253,16 +255,19 @@ SELECT gaggle_search('housing', 1, 10);
253255
254256-- Get dataset metadata
255257SELECT gaggle_info(' username/dataset-name' );
258+
259+ -- Retrieve last error string (or NULL if none)
260+ SELECT gaggle_last_error ();
256261` ` `
257262
258263# ## Retry Policy Details
259264
260265Gaggle implements retries with exponential backoff for HTTP requests. The number of attempts, initial delay, and
261266maximum delay can be tuned with the environment variables above.
262267
263- # ## Logging Levels (planned)
268+ # ## Logging Levels
264269
265- Detailed logging control via ` GAGGLE_LOG_LEVEL` is planned but not yet implemented.
270+ Detailed logging control via ` GAGGLE_LOG_LEVEL` is implemented.
266271
267272# ## Notes
268273
0 commit comments