From 5317d47e6ea812e8ef1a8bc27faf057dc4d1c0b0 Mon Sep 17 00:00:00 2001 From: "Sebastian M. Ernst" Date: Fri, 24 Jul 2020 16:02:45 +0200 Subject: [PATCH 1/5] new release cycle --- CHANGES.md | 4 ++++ src/abgleich/__init__.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 53fae85..d2275e3 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,9 @@ # Changes +## 0.0.6 (2020-XX-XX) + +- (TBD) + ## 0.0.5 (2020-07-24) - FEATURE: Version shown in GUI diff --git a/src/abgleich/__init__.py b/src/abgleich/__init__.py index d9e5eec..a17d78c 100644 --- a/src/abgleich/__init__.py +++ b/src/abgleich/__init__.py @@ -28,4 +28,4 @@ # META # +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -__version__ = "0.0.5" +__version__ = "0.0.6" From e19a038ea3cd419b943d7e72afe60ad4d0e3b5de Mon Sep 17 00:00:00 2001 From: "Sebastian M. Ernst" Date: Fri, 24 Jul 2020 22:52:49 +0200 Subject: [PATCH 2/5] fix #17 importing __version__ failed when running make install --- setup.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 53d1708..0c5d394 100644 --- a/setup.py +++ b/setup.py @@ -33,10 +33,9 @@ find_packages, setup, ) +import ast import os -from abgleich import __version__ - # +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # SETUP # +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @@ -56,6 +55,20 @@ # Define source directory (path) SRC_DIR = "src" +# Version +def get_version(code): + tree = ast.parse(code) + for item in tree.body: + if not isinstance(item, ast.Assign): + continue + if len(item.targets) != 1: + continue + if item.targets[0].id != '__version__': + continue + return item.value.s +with open(os.path.join(SRC_DIR, 'abgleich', '__init__.py'), 'r', encoding = 'utf-8') as f: + __version__ = get_version(f.read()) + # Requirements extras_require = { "dev": ["black", "python-language-server[all]", "setuptools", "twine", "wheel",], From 7c4e7090ef1750b45e5a147fd72f93c8287ff7fc Mon Sep 17 00:00:00 2001 From: "Sebastian M. Ernst" Date: Fri, 24 Jul 2020 23:07:00 +0200 Subject: [PATCH 3/5] fix #16 type check issue int python older than 3.7.2 --- src/abgleich/core/dataset.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/abgleich/core/dataset.py b/src/abgleich/core/dataset.py index 16ac245..ca0de90 100644 --- a/src/abgleich/core/dataset.py +++ b/src/abgleich/core/dataset.py @@ -31,6 +31,12 @@ import datetime import typing +# Python <= 3.7.1 "fix" +try: + from typing import OrderedDict as DictType +except ImportError: + from typing import Dict as DictType + import typeguard from .abc import ConfigABC, DatasetABC, PropertyABC, TransactionABC, SnapshotABC @@ -205,7 +211,7 @@ def _new_snapshot_name(self) -> str: def from_entities( cls, name: str, - entities: typing.OrderedDict[str, typing.List[typing.List[str]]], + entities: DictType[str, typing.List[typing.List[str]]], side: str, config: ConfigABC, ) -> DatasetABC: From 8f1b369479fb86fcb0ef1a4aefd5c5fd55f4c781 Mon Sep 17 00:00:00 2001 From: "Sebastian M. Ernst" Date: Fri, 24 Jul 2020 23:13:21 +0200 Subject: [PATCH 4/5] logged changes --- CHANGES.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index d2275e3..fb45a44 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,7 +2,8 @@ ## 0.0.6 (2020-XX-XX) -- (TBD) +- FIX: Development installs with `make install` do no longer fail, see #17. +- FIX: Python up to 3.7.1 does not handle type checks for `OrderedDict` properly and either causes exceptions or crashes. Fixed with workaround, see #16. ## 0.0.5 (2020-07-24) From 9e5535229ef480f64a45766be1b027565c93d1c6 Mon Sep 17 00:00:00 2001 From: "Sebastian M. Ernst" Date: Fri, 24 Jul 2020 23:13:38 +0200 Subject: [PATCH 5/5] prepare for release --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index fb45a44..550d143 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,6 @@ # Changes -## 0.0.6 (2020-XX-XX) +## 0.0.6 (2020-07-24) - FIX: Development installs with `make install` do no longer fail, see #17. - FIX: Python up to 3.7.1 does not handle type checks for `OrderedDict` properly and either causes exceptions or crashes. Fixed with workaround, see #16.