From 3596fce5a9e91fc32763806915c1e80d216035d4 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 6 Apr 2020 08:26:40 +0000 Subject: [PATCH 1/3] Bump units from `1149a0a` to `9471509` Bumps [units](https://github.com/IAMconsortium/units) from `1149a0a` to `9471509`. - [Release notes](https://github.com/IAMconsortium/units/releases) - [Commits](https://github.com/IAMconsortium/units/compare/1149a0a9b1aeecb528b41e57523c27215f0479ef...947150975d6f56bf016716d43005dbb8501b50ab) Signed-off-by: dependabot-preview[bot] --- units | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/units b/units index 1149a0a9b..947150975 160000 --- a/units +++ b/units @@ -1 +1 @@ -Subproject commit 1149a0a9b1aeecb528b41e57523c27215f0479ef +Subproject commit 947150975d6f56bf016716d43005dbb8501b50ab From 46fcb3b081b061a9ee0d52986fb298ffbad1d6e5 Mon Sep 17 00:00:00 2001 From: Daniel Huppmann Date: Mon, 6 Apr 2020 11:43:27 +0200 Subject: [PATCH 2/3] update path to `definitions.txt` after units-repo refactoring --- pyam/units.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyam/units.py b/pyam/units.py index 7c8c8fc97..b7c0c2fd9 100644 --- a/pyam/units.py +++ b/pyam/units.py @@ -9,8 +9,8 @@ # get application pint.UnitRegistry and load energy-units _REGISTRY = pint.get_application_registry() -file = Path(__file__).parents[1] / 'units' / 'definitions.txt' -_REGISTRY.load_definitions(str(file)) +path = Path(__file__).parents[1] / 'units' / 'iam_units' / 'data' +_REGISTRY.load_definitions(str(path / 'definitions.txt')) def convert_unit(df, current, to, factor=None, registry=None, context=None, From 347cf0fa66e2ce8c1e7a9ac982eccb112cead954 Mon Sep 17 00:00:00 2001 From: Daniel Huppmann Date: Mon, 6 Apr 2020 12:14:54 +0200 Subject: [PATCH 3/3] update paths to `units` in package_data after refactoring --- setup.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 47096caaf..724eb0a99 100755 --- a/setup.py +++ b/setup.py @@ -81,8 +81,9 @@ def main(): ], } package_data = { - 'pyam': ['region_mappings/*', '../units/definitions.txt', - '../units/modules/**/*.txt'], + 'pyam': ['region_mappings/*', + '../units/iam_units/data/definitions.txt', + '../units/iam_units/data/**/*.txt'], } install_requirements = REQUIREMENTS extra_requirements = EXTRA_REQUIREMENTS