pydeflate 1.4.0__tar.gz → 1.4.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (22) hide show
  1. {pydeflate-1.4.0 → pydeflate-1.4.2}/PKG-INFO +7 -7
  2. {pydeflate-1.4.0 → pydeflate-1.4.2}/pydeflate/__init__.py +1 -1
  3. {pydeflate-1.4.0 → pydeflate-1.4.2}/pydeflate/get_data/exchange_data.py +19 -12
  4. {pydeflate-1.4.0 → pydeflate-1.4.2}/pyproject.toml +8 -8
  5. {pydeflate-1.4.0 → pydeflate-1.4.2}/LICENSE +0 -0
  6. {pydeflate-1.4.0 → pydeflate-1.4.2}/README.md +0 -0
  7. {pydeflate-1.4.0 → pydeflate-1.4.2}/pydeflate/.pydeflate_data/README.md +0 -0
  8. {pydeflate-1.4.0 → pydeflate-1.4.2}/pydeflate/deflate/__init__.py +0 -0
  9. {pydeflate-1.4.0 → pydeflate-1.4.2}/pydeflate/deflate/deflate.py +0 -0
  10. {pydeflate-1.4.0 → pydeflate-1.4.2}/pydeflate/deflate/deflator.py +0 -0
  11. {pydeflate-1.4.0 → pydeflate-1.4.2}/pydeflate/get_data/__init__.py +0 -0
  12. {pydeflate-1.4.0 → pydeflate-1.4.2}/pydeflate/get_data/deflate_data.py +0 -0
  13. {pydeflate-1.4.0 → pydeflate-1.4.2}/pydeflate/get_data/imf_data.py +0 -0
  14. {pydeflate-1.4.0 → pydeflate-1.4.2}/pydeflate/get_data/oecd_data.py +0 -0
  15. {pydeflate-1.4.0 → pydeflate-1.4.2}/pydeflate/get_data/wb_data.py +0 -0
  16. {pydeflate-1.4.0 → pydeflate-1.4.2}/pydeflate/pydeflate_config.py +0 -0
  17. {pydeflate-1.4.0 → pydeflate-1.4.2}/pydeflate/settings/emu.json +0 -0
  18. {pydeflate-1.4.0 → pydeflate-1.4.2}/pydeflate/settings/oecd_codes.json +0 -0
  19. {pydeflate-1.4.0 → pydeflate-1.4.2}/pydeflate/tools/__init__.py +0 -0
  20. {pydeflate-1.4.0 → pydeflate-1.4.2}/pydeflate/tools/exchange.py +0 -0
  21. {pydeflate-1.4.0 → pydeflate-1.4.2}/pydeflate/tools/update_data.py +0 -0
  22. {pydeflate-1.4.0 → pydeflate-1.4.2}/pydeflate/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pydeflate
3
- Version: 1.4.0
3
+ Version: 1.4.2
4
4
  Summary: Package to convert current prices figures to constant prices and vice versa
5
5
  License: MIT
6
6
  Author: Jorge Rivera
@@ -15,13 +15,13 @@ Classifier: Programming Language :: Python :: 3
15
15
  Classifier: Programming Language :: Python :: 3.10
16
16
  Classifier: Programming Language :: Python :: 3.11
17
17
  Classifier: Programming Language :: Python :: 3.12
18
- Requires-Dist: bblocks (>=1.3,<2.0)
19
- Requires-Dist: country-converter (>=1,<2)
20
- Requires-Dist: numpy (>=1.26,<2.0)
21
- Requires-Dist: oda-reader (>=0.2.1,<0.3.0)
18
+ Requires-Dist: bblocks (>=1.3)
19
+ Requires-Dist: country-converter (>=1)
20
+ Requires-Dist: numpy (>=1.2)
21
+ Requires-Dist: oda-reader (>=0.2)
22
22
  Requires-Dist: pandas (>=2,<3)
23
- Requires-Dist: pyarrow (>=15.0,<17.0)
24
- Requires-Dist: requests (>=2.28.2,<3.0.0)
23
+ Requires-Dist: pyarrow (>=15.0)
24
+ Requires-Dist: requests (>=2.28.2)
25
25
  Requires-Dist: xlrd (>=2.0.1,<3.0.0)
26
26
  Description-Content-Type: text/markdown
27
27
 
@@ -1,5 +1,5 @@
1
1
  __author__ = """Jorge Rivera"""
2
- __version__ = "1.4.0"
2
+ __version__ = "1.4.2"
3
3
 
4
4
  from pydeflate.deflate.deflate import deflate
5
5
  from pydeflate.tools.exchange import exchange
@@ -175,18 +175,25 @@ class ExchangeOECD(Exchange):
175
175
  oecd_data.update_dac1()
176
176
 
177
177
  def load_data(self, **kwargs) -> None:
178
- """Load the DAC1 data, which is the source for the OECD exchange rates."""
179
- # avoid infinite recursion
180
- if self._load_try_count < 1:
181
- try:
182
- self._data = pd.read_feather(PYDEFLATE_PATHS.data / "dac1.feather")
183
- except FileNotFoundError:
184
- logger.info("OECD Data not found, downloading...")
185
- self._load_try_count = +1
186
- self.update()
187
- self.load_data()
188
- else:
189
- raise FileNotFoundError("Could not load OECD data")
178
+ """Load the OECD DAC price deflators data.
179
+
180
+ If the data is not found, it will be downloaded.
181
+ DAC deflators are transformed into price deflators by using the
182
+ implied exchange rate information from the OECD DAC data.
183
+
184
+ The deflators that are loaded is therefore *not* the DAC deflator,
185
+ but the price deflator used to produce the DAC deflators.
186
+
187
+ """
188
+ try:
189
+ self._data = pd.read_feather(
190
+ PYDEFLATE_PATHS.data / "pydeflate_dac1.feather"
191
+ )
192
+ except FileNotFoundError:
193
+ logger.info("Data not found, downloading...")
194
+ self.update()
195
+ self.load_data()
196
+ return
190
197
 
191
198
  def usd_exchange_rate(self, direction: str = "lcu_usd") -> pd.DataFrame:
192
199
  """Get the exchange rate of a currency to USD (or vice versa)
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "pydeflate"
3
- version = "1.4.0"
3
+ version = "1.4.2"
4
4
  description = "Package to convert current prices figures to constant prices and vice versa"
5
5
  authors = ["Jorge Rivera <jorge.rivera@one.org>"]
6
6
  license = "MIT"
@@ -21,21 +21,21 @@ packages = [
21
21
 
22
22
  [tool.poetry.dependencies]
23
23
  python = "^3.10"
24
- numpy = "^1.26"
24
+ numpy = ">=1.2"
25
25
  pandas = "^2"
26
26
  xlrd = "^2.0.1"
27
- country-converter = "^1"
28
- requests = "^2.28.2"
29
- pyarrow = ">=15.0,<17.0"
30
- bblocks = "^1.3"
31
- oda-reader = "^0.2.1"
27
+ country-converter = ">=1"
28
+ requests = ">=2.28.2"
29
+ pyarrow = ">=15.0"
30
+ bblocks = ">=1.3"
31
+ oda-reader = ">=0.2"
32
32
 
33
33
 
34
34
  [tool.poetry.dev-dependencies]
35
35
  bump2version = "^1.0.1"
36
36
  black = "^24"
37
37
  pytest = "^8"
38
- pytest-cov = "^4.0.0"
38
+ pytest-cov = "^5.0.0"
39
39
  pytest-mock = "^3.10.0"
40
40
 
41
41
 
File without changes
File without changes
File without changes