Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: v1.0 refactor & rewrite #69

Merged
merged 1 commit into from
Jan 31, 2024
Merged

feat: v1.0 refactor & rewrite #69

merged 1 commit into from
Jan 31, 2024

Conversation

OliverSherouse
Copy link
Owner

No description provided.

@OliverSherouse OliverSherouse linked an issue Jan 22, 2024 that may be closed by this pull request
@OliverSherouse OliverSherouse marked this pull request as draft January 22, 2024 21:01
@OliverSherouse OliverSherouse self-assigned this Jan 22, 2024
The 1.0 release of wbdata is not quite a full rewrite, but is pretty
much the next best thing. The architecture has been reworked, function
and argument names have been changed to be more consistent and clear,
and a few dependencies have been added for better and more reliable
functionality.

Features:

* Date arguments can now be strings, not just datetime.datetime objects.
  Strings can be in the year, month, or quarter formats used by the
  World Bank API or in any other format that can be handled by
  [dateparser][https://dateparser.readthedocs.io/en/latest/].
* Default cache behavior can be configured with environment variables,
  including the path, TTL, and max number of items to cache. See Cache
  Module documentation for details.
* Users can now create Client objects if they want to set cache behavior
  programmatically have multiple caches, or supply their own requests
  Session.
* Caching is now provided using the shelved_cache and cachetools
  libraries. Since a lot of annoying bugs seemed to come from wbdata's
  home-rolled cache implementation, this should be a good
  quality-of-life improvement for many people.
* Type annotations are available.

Breaking API Changes:

* Supported version of Python are now 3.8+.
* All of the metadata retrieval functions have been renamed to their
  plural forms to reflect the fact that they always return a sequence:
* The functions search_countries and search_indicators have been
  removed. Searching by name is now available using the query
  parameter of the get_countries and get_indicators functions.
* The parameter data_date has been renamed date.
* The parameter convert_dates has been renamed parse_dates.
* The parameter cache with a default value True has been replaced with
  a parameter skip_cache with a default value of False.
@OliverSherouse OliverSherouse added this to the 1.0 milestone Jan 26, 2024
@OliverSherouse OliverSherouse marked this pull request as ready for review January 26, 2024 19:49
@OliverSherouse OliverSherouse merged commit 61a6c2d into master Jan 31, 2024
18 checks passed
@OliverSherouse OliverSherouse deleted the refactor branch January 31, 2024 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AttributeError: module 'collections' has no attribute 'Sequence' Error Automatically Delete Corrupted Cache
1 participant