ProjectDrawdown / solutions

The mission of Project Drawdown is to help the world reach “Drawdown”— the point in the future when levels of greenhouse gases in the atmosphere stop climbing and start to steadily decline, thereby stopping catastrophic climate change — as quickly, safely, and equitably as possible.
https://www.drawdown.org/
Other
211 stars 91 forks source link

Fix of FaIR Deprecation Warning #511

Closed gerald-scharitzer closed 2 years ago

gerald-scharitzer commented 2 years ago

fair 1.6.4 resolves issue #443

Before

(pd-dev) $ pytest model/tests/test_co2calcs.py 
[...]
../../../apps/miniconda3/envs/pd-dev/lib/python3.9/site-packages/fair/RCPs/rcp3pd.py:4
  ~/apps/miniconda3/envs/pd-dev/lib/python3.9/site-packages/fair/RCPs/rcp3pd.py:4: DeprecationWarning: name rcp3pd will be deprecated in FaIR 2.0. Please use rcp26.
    warnings.warn('name rcp3pd will be deprecated in FaIR 2.0. Please use rcp26.',

../../../apps/miniconda3/envs/pd-dev/lib/python3.9/site-packages/fair/RCPs/rcp6.py:4
  ~/apps/miniconda3/envs/pd-dev/lib/python3.9/site-packages/fair/RCPs/rcp6.py:4: DeprecationWarning: name rcp6 will be deprecated in FaIR 2.0. Please use rcp60.
    warnings.warn('name rcp6 will be deprecated in FaIR 2.0. Please use rcp60.',
[...]
==== 31 passed, 1 skipped, 2 warnings in 1.87s ====

(pd-dev) $ pytest
[...]
==== 29 failed, 1321 passed, 12 skipped, 83 warnings in 753.45s (0:12:33) ====

Update (optional)

(pd-dev) $ conda env update -f environment.yml --prune
[...]
Installing collected packages: openpyxl, fair
  Attempting uninstall: openpyxl
    Found existing installation: openpyxl 3.0.7
    Uninstalling openpyxl-3.0.7:
      Successfully uninstalled openpyxl-3.0.7
  Attempting uninstall: fair
    Found existing installation: fair 1.6.3
    Uninstalling fair-1.6.3:
      Successfully uninstalled fair-1.6.3
Successfully installed fair-1.6.4 openpyxl-3.0.9
[...]

After

(pd-dev) $ pytest model/tests/test_co2calcs.py
[...]
model/tests/test_co2calcs.py ...............................s                                                                                                                                       [100%]

==== 31 passed, 1 skipped in 2.04s ====

(pd-dev) $ pytest
[...]
==== 29 failed, 1321 passed, 12 skipped, 83 warnings in 729.34s (0:12:09) ====