Skip to content

Commit

Permalink
Update units submodule after refactoring to package (#360)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhuppmann committed Apr 7, 2020
1 parent 1170b00 commit 9e7ef4b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pyam/units.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9e7ef4b

Please sign in to comment.