Caching improvements#159
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #159 +/- ##
=======================================
Coverage ? 77.05%
=======================================
Files ? 41
Lines ? 2628
Branches ? 265
=======================================
Hits ? 2025
Misses ? 550
Partials ? 53
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
This pull request introduces major improvements to how
oda_datamanages its caching system, providing a more robust, user-friendly, and transparent cache management experience. The cache is now stored in a standard per-user, per-version directory, with a unified API for inspecting, clearing, and migrating cache data. Existing caches are automatically migrated on first use, and new documentation thoroughly explains all cache operations, recovery, and migration scenarios.Key changes include:
New cache system and user API
CACHING.mdguide documenting the new cache system, including cache locations, configuration, Python API (oda_data.cache), migration from older versions, recovery from corrupt cache, and multi-process behavior. The document also covers legacy compatibility for standaloneoda_readerusers.oda_data.cachenamespace, providing type-safe, granular cache management functions (size,clear,invalidate,enable_cache,disable_cache,migrate, etc.) and allowing per-scope operations for advanced workflows.set_cache_root()or theODA_DATA_CACHE_DIRenvironment variable. [1] [2]Documentation and user guidance
README.mdto describe the new cache behavior, including how to recover from corrupt caches and the relationship between legacy helpers and the new API.CHANGELOG.md,docs/docs/changelog.md) with detailed release notes for version 2.6.0, summarizing the new cache system, migration process, API changes, and backward compatibility. [1] [2]Backward compatibility and migration
clear_cache,enable_cache,disable_cache) are preserved as thin wrappers over the new API, ensuring seamless upgrades for existing scripts. [1] [2] [3]These changes significantly improve cache reliability, transparency, and user control, making cache management easier and safer for all
oda_datausers.References: [1] [2] [3] [4]