From 9c8581e27caa28a36d9abc62dcaf3160090ae7a7 Mon Sep 17 00:00:00 2001 From: "c.winger" Date: Mon, 17 Jul 2023 10:48:05 +0200 Subject: [PATCH] need requirements.txt --- .github/workflows/publish.yml | 2 +- data_disaggregation/base.py | 5 ++++- requirements-dev.txt => requirements.txt | 0 3 files changed, 5 insertions(+), 2 deletions(-) rename requirements-dev.txt => requirements.txt (100%) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 091f4f2..ef38c7f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -19,7 +19,7 @@ jobs: with: python-version: "3.x" cache: "pip" # caching pip dependencies - - run: pip install --upgrade -r requirements-dev.txt + - run: pip install --upgrade -r requirements.txt - run: python -m build --sdist --wheel --outdir dist/ - run: mkdocs gh-deploy --force - uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/data_disaggregation/base.py b/data_disaggregation/base.py index c14ebdf..f42ed52 100644 --- a/data_disaggregation/base.py +++ b/data_disaggregation/base.py @@ -113,7 +113,10 @@ def transform( # scale extensive => intensive if vtype == VT_NumericExt: - data = dict((f, v / size_in[f]) for f, v in data.items()) + try: + data = dict((f, v / size_in[f]) for f, v in data.items()) + except TypeError: + raise Exception(data) # filter unused in weight_map: input: weight_map = dict(((f, t), w) for (f, t), w in weight_map.items() if f in data) diff --git a/requirements-dev.txt b/requirements.txt similarity index 100% rename from requirements-dev.txt rename to requirements.txt