Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR implements caching for the default client to improve performance by avoiding unnecessary client instantiation. The change adds LRU caching to the get_default_client() function with a cache size of 1.
- Adds
@lru_cache(maxsize=1)decorator to cache the default client instance - Imports
lru_cachefromfunctoolsmodule
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
fa08f5a to
d365767
Compare
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 12 out of 14 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
d365767 to
29ea2c9
Compare
Allow sequences of length 2 for dates even though it should *really* be a tuple. Contributes to #71. Signed-off-by: Oliver Sherouse <oliver@oliversherouse.com>
29ea2c9 to
12e8a4b
Compare
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 several major updates to the project’s packaging, development workflow, and codebase. The most significant changes are a migration from Poetry to PEP 621 and Hatchling for packaging, the adoption of
uvfor dependency management and publishing, and the modernization of type annotations throughout the code. It also adds new documentation for repository guidelines and improves test coverage for date formatting.Packaging and Dependency Management
pyproject.tomland switched the build backend to Hatchling, updating dependency and group specifications accordingly. (pyproject.toml) [1] [2]uvfor dependency installation, publishing, and workflow automation in CI files (publish.yaml,tests.yaml), and removed the.tool-versionsfile. [1] [2] [3] [4] [5]Development Workflow Modernization
AGENTS.mdwith repository guidelines covering project structure, build/test commands, coding style, testing, commit/PR practices, and documentation standards.Codebase Modernization
str | None), replaced legacyUnionandDicttypes, and updated imports for collections.abc. (wbdata/client.py,wbdata/cache.py) [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14]wbdata/cache.py) [1] [2] [3]lru_cachetoget_default_client, fixed pandas import fallback, and madeSearchResultinherit fromlistinstead ofList. (wbdata/__init__.py,wbdata/client.py) [1] [2] [3]Testing Improvements
tests/test_dates.py)tests/test_fetcher.py)These changes collectively modernize the project’s packaging and development practices, streamline dependency management, and improve code clarity and test coverage.
These changes contribute to #74 and #71