Closed MrRoudyk closed 1 month ago
I am applying to this issue via OnlyDust platform.
I have experience with Python development and ML models in general.
Start by implementing functions to cache the latest version in a JSON file with a 24-hour TTL. I would modify the existing version check to retrieve the version from cacche first, only querying GitHub if the cache is missing or expired. I would use the appdirs library to manage the storage location for cross-platform compatibility.
I am applying to this issue via OnlyDust platform.
hello i would love to work on this issue
please kindly assign
I am applying to this issue via OnlyDust platform.
I am a full-stack developer, and would leverage on my background to;
I will take these few steps by way of summary to work on this issue within the possible limited time.
Add caching functions Store cached version with a 24-hour TTL Optimize Version Checking by modifying the check version to; ◦ Retrieve version from cache ◦ Query GitHub API only if cache is missing or expired Investigate and resolve the problem with aiohttp and fire_and_forget
@droserasprout Thank you for the feedback! I have made all the changes you suggested. Please take a look at the updated code.
Great, thanks!
I am applying to this issue via OnlyDust platform.
I'm a CS major with a lot of Python experience, and I've worked on a lot of projects that involved caching systems, performance optimisations, and API integrations. My expertise in software engineering best practices and principles allows me to tackle challenging issues like this one with effectiveness and maintainability.
I would first analyse the current version checking system and determine the best places to include the cache before implementing caching for the latest release version check. I would create a caching system with read and write functions and a 24-hour TTL, storing the version information in a platform-appropriate location using the appdirs library. The _check_version method would be changed to only call the GitHub API when absolutely necessary, instead of always attempting to retrieve the version from cache. I would see to it that the process's error handling and logging are done correctly. Testing would include misses, expirations, and cache hits, among other scenarios. Lastly, if the caching implementation is impacted by any possible issues with aiohttp and fire_and_forget, I would solve them.
Optimize Version Check with Caching
Summary: Enhances version checking by adding a caching mechanism, reducing dependency on real-time GitHub API calls.
Changes:
Caching Implementation:
_get_cached_version
,_read_cached_version
, and_write_cached_version
functions.version_info.json
with a 24-hour TTL.Optimized
_check_version
:Notes:
appdirs
library.Closes #1095